Copying Stored Procedures

  • I have and ASP.NET and VB.NET application that needs to copy selected stored procedures from one SQL Server to another SQL Server. The scenerio is that the user will select a source server from a drop down list then the source database from another dropdown listbox which then populates a listbox with the stored procedures in the database. They can select multiple stored procedures from the listbox.

    Once selected, they select a target SQL Server from a dropdownlist and then a target database from another dropwdown list. I have a command button that they need to do the actual move but I am not sure how to get the selected source stored procedures copied to the target database. Any ideas would be greatly appreciated.


    Arthur Lorenzini

  • You might want to look up "StoredProcedure object" in sql server books online. I've never used this, and there may be an easier method but...


    :wq

  • DMO could script the proc and then you'd execute this on the target server. Or select the source code from syscomments and execute on the target server. Be wary of permissions.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply