Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Error while scripting SPs

Author  Topic 

govthamb
Starting Member

27 Posts

Posted - 2009-08-24 : 09:18:59
Hi,

I am trying to generate script for all Stored Procedures in 2005 server.

I used the following process.
Rightclick on DB --> Tasks --> Generate Scripts --> Select DB --> Select StoredProcedures --> Select All

I got the following error.

I tried with closing all the existing connections and restarted the services also.

The collation of the server and DB is SQL_Latin1_General_CP850_BIN2.

Please help me.

Error:
-------------------------------------------------------
Generate Script Progress
- Determining objects in database 'AtlasApps' that will be scripted. (Success)

Messages
· Prefetch objects failed for Database 'AtlasApps'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Prefetch+objects+Database&LinkId=20476

ADDITIONAL INFORMATION:

Exception has been thrown by the target of an invocation. (mscorlib)

There is already an open DataReader associated with this Command which must be closed first. (System.Data)
--------------------------------------------------------------

govthamb
Starting Member

27 Posts

Posted - 2009-08-25 : 07:17:53
Hi,

I found that it is a bug in Microsoft for Collation BIN2.
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=248724

I scripted the procedures using SSMSE.

Thanks.
Go to Top of Page
   

- Advertisement -