dbTalk Databases Forums  

Re: DTS copy of stored procedures to multiple databases

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: DTS copy of stored procedures to multiple databases in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS copy of stored procedures to multiple databases - 07-13-2004 , 01:21 AM






In article <7FFA5634-05E8-435A-87C5-CBCD7B4C0ACF (AT) microsoft (DOT) com>, Studen77 wrote:
Quote:
Hello everyone, and thanks in advance to anyone who can help:

SImple question: I'd like to copy stored procedures across multiple databases. DTS wizard seems to allow only DB to DB transports. Is this possible? and if so, how can I do this?

So you want to take 1 procedure and apply it to multiple databases?

Will this be a different SP every time or the same one?


An easy way is to use the Transfer Objects task and simply specify your proc(s) in there.
You would need multiple instances of the task for each server (or you can use a loop)




--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
www.konesans.com - for all your consultancy needs





Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS copy of stored procedures to multiple databases - 07-13-2004 , 02:21 PM






Then you can easily set this up in designer. If the stored procs are
the same and the destinations are the same you can simply add the tasks
to designer, choose to take over the stored procs only, choose to drop
the destination objects first and make sure that you haven't specified
anything like "Logins" as well.

No code, no object model.


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
www.konesans.com - for all your consultancy needs




Reply With Quote
  #3  
Old   
studen77
 
Posts: n/a

Default Re: DTS copy of stored procedures to multiple databases - 07-13-2004 , 04:56 PM



Thanks very much, Allan. In the case where one would like to transfer stored procedures from a single DB to thousands of other DB's, what would you consider to be the most efficient method in doing so?
(BTW, I hadn't used DTS designer up to this point (I'm a new developer) and found it powerful and intuitive.)

"Allan Mitchell" wrote:

Quote:
Then you can easily set this up in designer. If the stored procs are
the same and the destinations are the same you can simply add the tasks
to designer, choose to take over the stored procs only, choose to drop
the destination objects first and make sure that you haven't specified
anything like "Logins" as well.

No code, no object model.


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
www.konesans.com - for all your consultancy needs





Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS copy of stored procedures to multiple databases - 07-14-2004 , 12:37 AM



In article <34AF9BA4-69BA-4882-9653-3CBACA793281 (AT) microsoft (DOT) com>, Studen77 wrote:
Quote:
Thanks very much, Allan. In the case where one would like to transfer stored procedures from a single DB to thousands of other DB's, what would you consider to be the most efficient method in doing so?
(BTW, I hadn't used DTS designer up to this point (I'm a new developer) and found it powerful and intuitive.)

"Allan Mitchell" wrote:

Then you can easily set this up in designer. If the stored procs are
the same and the destinations are the same you can simply add the tasks
to designer, choose to take over the stored procs only, choose to drop
the destination objects first and make sure that you haven't specified
anything like "Logins" as well.

No code, no object model.


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
www.konesans.com - for all your consultancy needs





I am glad you find the designer intuitive. How about you look at the object model and see the property names for the
destination server. You can then create a loop over say a recordset and chage the destination for each loop.

Have a look at our looping example here

Looping, Importing and Archiving
(http://www.sqldts.com/Default.aspx?246)


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
www.konesans.com - for all your consultancy needs





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.