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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy a stored procedure 1

Status
Not open for further replies.

pgaliardo

MIS
Joined
Nov 30, 2004
Messages
887
I need to copy a stored procedure on a SQL 2000 server to a SQL 2005 server. What is the best way to do this? I know I can generate a script from the SQL 2000 Server, but how do I save it as a stored procedure on the SQL 2005 Server?
 
You generate a CREATE script to a new query window. Cut-n-paste it to a SQL 2005 query window and run it. The CREATE script will create the Proc in the database it is run against.



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Stupid me. I did everything right except EXECUTE the script. Thanks for the reply. I got it to work.
 
NP. Always glad to help. @=)



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top