Article ID: 229075 - Last Review: March 14, 2006 - Revision: 4.1 FIX: Transfer Objects Fails if SP Preceded by Multi-line CommentThis article was previously published under Q229075 SYMPTOMS
Transfer of objects using the Transfer Manager in SQL 6.5 or Data Transformation Services (DTS) in SQL 7.0 is unable to transfer a stored procedure that is owned by a user other than 'dbo' when the stored procedure is preceded by a multi-line comment. The transfer errors out with the following message in the log file:
::Error:: In file <Server>.<DB>.PRC in statement on line xxxx Transfer Status: Creating Stored Procedures on destination database [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect syntax near '*'. [Microsoft][ODBC SQL Server Driver][SQL Server]'CREATE PROCEDURE' must be the first statement in a query batch. CAUSE
This error occurs any time the stored procedure being transferred is not owned by dbo. For example, the following procedure generates an error during transfer: STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 254561
(http://support.microsoft.com/kb/254561/
)
INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0 For more information, contact your primary support provider.
MORE INFORMATION
To avoid this problem it is recommended that all comments for stored procedures be placed inline with the procedure statements, after the CREATE PROC command as follows:
| Article Translations
|
Back to the top
