Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
atsik
Starting Member
7 Posts |
Posted - 2004-10-12 : 10:39:27
|
| I have two servers both with 'ttrt' database.I want to export only stored procedures without overwriting if destination server already has sp with same namehow I can do that?VeikoP.S.I have a lot sp-s on both server,so I don't want to do it manually:) |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-10-12 : 11:23:14
|
| You can join sysobjects on both databases to find the missing SPs then use dmo to copy the SPs required.See www.nigelrivett.com under dmo for copying a single object.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
atsik
Starting Member
7 Posts |
Posted - 2004-10-13 : 01:54:16
|
| thanksI'll try before dts import/export... |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-10-13 : 02:00:30
|
| i think you have that option in dts, uncheck drop destination objects.you can check for sp existence? if exists(select * from sysobjects where...)--------------------keeping it simple... |
 |
|
|
atsik
Starting Member
7 Posts |
Posted - 2004-10-13 : 04:05:22
|
| I triedresult = thank god I made backup |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-10-13 : 04:20:22
|
quote: Originally posted by atsik I triedresult = thank god I made backup
lol wise decision...--------------------keeping it simple... |
 |
|
|
|
|
|