Hi,
Anyone know how I can export my stored procedures from one sql server to
another over the internet? I tried using the DTS, but kept getting an
"Objects cannot be transferred" error.
ThanksStored procedures will be stored in the sysobjects table .
Goto the query analyzer and select your source-database.
Open a new query-window and run:
Select * from sysobjects where xtype='P'
Query-analyzer will show all stored procedures related to your database.
Within Query-analyzer you can choose save as and save the data in different
ways. When saved it should be simple to send the file to another
administrator, DTS will make it possible to import the file into sysobjects.
The only bug when importing could be the ID's as they might already exist in
the other database!!
Another option is replication to be found in the books online
Greetings
Johan
"sympatico" <feedback@.a1vbcode.com> schreef in bericht
news:5k8jd.28997$dj2.1974131@.news20.bellglobal.com...
> Hi,
> Anyone know how I can export my stored procedures from one sql server to
> another over the internet? I tried using the DTS, but kept getting an
> "Objects cannot be transferred" error.
> Thanks
>|||don't forget these tables also
syscomments (stores the query)
syscolumns
sysdepends (relations to dependent objects like underlying tables in the
query)
If the target database has the same dependent objects and these objects have
a different ID from the source a copy>paste would cause meta-data to lose
its integrity. "Johan Koopmans" <koopmans.johan@.hccnet.nl> wrote in message
news:es6r$QDxEHA.2540@.TK2MSFTNGP09.phx.gbl...
> Stored procedures will be stored in the sysobjects table .
> Goto the query analyzer and select your source-database.
> Open a new query-window and run:
> Select * from sysobjects where xtype='P'
> Query-analyzer will show all stored procedures related to your database.
> Within Query-analyzer you can choose save as and save the data in
different
> ways. When saved it should be simple to send the file to another
> administrator, DTS will make it possible to import the file into
sysobjects.
> The only bug when importing could be the ID's as they might already exist
in
> the other database!!
> Another option is replication to be found in the books online
> Greetings
> Johan
>
> "sympatico" <feedback@.a1vbcode.com> schreef in bericht
> news:5k8jd.28997$dj2.1974131@.news20.bellglobal.com...
> > Hi,
> >
> > Anyone know how I can export my stored procedures from one sql server to
> > another over the internet? I tried using the DTS, but kept getting an
> > "Objects cannot be transferred" error.
> >
> > Thanks
> >
> >
>|||Probably easiest to use Enterprise Manager to script them, and then just
apply the script to the remote server.
Right-click on your database of choice, select All Tasks, then Generate SQL
Script, check the All Stored Procedures box, then click the Preview
button...
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"sympatico" <feedback@.a1vbcode.com> wrote in message
news:5k8jd.28997$dj2.1974131@.news20.bellglobal.com...
> Hi,
> Anyone know how I can export my stored procedures from one sql server to
> another over the internet? I tried using the DTS, but kept getting an
> "Objects cannot be transferred" error.
> Thanks
>
No comments:
Post a Comment