Home Forums SQL Server 2005 Development Dynamic Stored Proc to generate Create Table Script ,taking table_name as parameter RE: Dynamic Stored Proc to generate Create Table Script ,taking table_name as parameter

  • Hi,

    SMO is currently not supported in CLR extended stored procedures. If you try to construct an extended stored proc to call SMO and install it into SQL 2005, you will get the error:

    [font="Courier New"]

    Assembly 'xxxxxxxx' references assembly 'microsoft.sqlserver.batchparser, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.

    [/font]

    For which there is no workaround. Please refer to the Microsoft issue below, and add your vote to have Microsoft add this feature.

    http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126386

    GrayB