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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 export stored proc

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 name
how I can do that?

Veiko

P.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.
Go to Top of Page

atsik
Starting Member

7 Posts

Posted - 2004-10-13 : 01:54:16
thanks
I'll try before dts import/export...
Go to Top of Page

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...
Go to Top of Page

atsik
Starting Member

7 Posts

Posted - 2004-10-13 : 04:05:22
I tried
result = thank god I made backup
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-10-13 : 04:20:22
quote:
Originally posted by atsik

I tried
result = thank god I made backup




lol

wise decision...

--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -