November 6, 2002 at 10:05 am
Is there a way to copy a stored procedure from one server to another using T-SQL? I tried writing to the sysobjects table but I get a permission denied error.
November 6, 2002 at 10:13 am
not really. you need to "compile" the object, you cannot copy it. You could write some T-SQL to get the data from syscomments and then exec() this to compile it. Be messy.
Steve Jones
November 6, 2002 at 10:25 am
I presume you are wanting to do this programmatically, since the manual method of scripting the object is straight forward.
Have you considered creating a DTS package to transfer the SQL object(s).
You should then be able to call the DTS package using xp_cmdexec and DTSRun.exe
November 6, 2002 at 10:31 am
Didn't think to use the DTS package, although I was hoping find some simple method (programatically). Thanks for your input.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy