Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to migrate Stored Procedures ?

Status
Not open for further replies.

citrixnl

Technical User
Jan 6, 2003
25
0
0
NL
I have an existing SQL 7 Database server that i want to migrate to a new server with also SQL 7 installed. I did a backup and restore of the databases needed and that worked fine. All the data is on the new server. But i also need to migrate the Stored Procedures.

Is there an easy way to migrate these stored procedures ?
 
The stored procedures should have been backed up and restored just like your tables, views, data ... May want to double check and see.

If you did some sort of backup I am unaware of, you could go into Enterprise Manager and drill down to the stored procedures of the DB you need them copied out of. The select all of the stored procedure by highlighting them. Then right-click on the group of SPs and choose to script them out to a text file.

once that is done, open Query Analyzer on the target server and choose the drop down DB selection in QA to choose where the SPs are to be created. Then open your script file in QA and execute it. You may need to refresh the stored procedures folder to see the new additions.




Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top