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.Do you want copy store procedures at run time?
you may try sp_helptext 'sp-Name' . it ruturns the source code.
Then connect to second server and run the code generated from sp_helptext.|||Loads of ways DTS, sp_helptext to name but two methods.|||How can I use DTS to do this?|||Remember stored procs are nothing more than text in a database table. Literally.
Friday, February 24, 2012
Coping 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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment