|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Copy SPROCs to different databaseIs there a manual or code way to copy stored procedures from 1one sql db to
another without opening each one, copying, creating a new SPROC in target db and pasting? Can DTS accomplish this? You can use DTS. If you have enterprise manager, you can also just
right-click on a database and choose to import or export data. When you get into the wizard, choose to "Copy objects and data betwen SQL Server databases". You can then save this entire thing as a DTS package, which you can manipulate, schedule, etc. -- Show quoteMeanOldDBA derricklegg***@hotmail.com http://weblogs.sqlteam.com/derrickl When life gives you a lemon, fire the DBA. "scott" wrote: > Is there a manual or code way to copy stored procedures from 1one sql db to > another without opening each one, copying, creating a new SPROC in target db > and pasting? > > Can DTS accomplish this? > > > You can use Enterprise Manager and right click on the db and choose "All
Tasks - Generate SQL Script". Then choose all the sp's and you will get one script for all the sps. Just run that in the other db. -- Show quoteAndrew J. Kelly SQL MVP "scott" <sbai***@mileslumber.com> wrote in message news:e45c5eteGHA.5104@TK2MSFTNGP04.phx.gbl... > Is there a manual or code way to copy stored procedures from 1one sql db > to another without opening each one, copying, creating a new SPROC in > target db and pasting? > > Can DTS accomplish this? > You can use DTS to copy database objects from one database to another.
Are you using Sql Server 2000 or Sql Server 2005? I think, if I rememer correctly, there is a copy database or copy database objects task in 2000. 2005 makes it a whole lot easier. -Tim Show quote "scott" <sbai***@mileslumber.com> wrote in message news:e45c5eteGHA.5104@TK2MSFTNGP04.phx.gbl... > Is there a manual or code way to copy stored procedures from 1one sql db > to another without opening each one, copying, creating a new SPROC in > target db and pasting? > > Can DTS accomplish this? > |
|||||||||||||||||||||||