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
 SQL Server Administration (2000)
 Backup / Restore of a Stored Procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-11-10 : 07:23:18
Rao writes "I am looking for a way to Backup a Stored Procedure (with or without encryption but preferably with encryption) from SQL Server 7 / 2000. Similarly to restore the same Stored Procedure back in to the database.

Any suggestions on this will be a great relief.

Thanks in anticipation.

Rao"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-11-10 : 07:26:18
All of your stored procedure and view definitions should be stored in a source control program of some kind. Visual Source Safe and CVS are two examples of source control. This allows you to manage your code and track changes, and allows for you to restore any version of the code, even an earlier one, and helps you to "fix" a procedure that was overwritten by someone else. It is also mandatory for any stored procedures that are encrypted (if you are encrypting stored procedures without source control, it will hurt you some day)

If you search these forums for "source control" you'll find a great deal more discussion about its benefits.
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-11-10 : 07:31:16
And for some reason or the other, you don't use Source Control, at least generate SQL Scripts for the procedures and views in your database. Right-click on the Database in Enterprise Manager -> Generate SQL Script. IMHO, that is one of the very few things that EM is good for, so you might as well use it

With those scripts, you should be able to recreate the procedures and views, assuming nothing else has changed in your database which will cause the creation of the procedures and views to fail (like dropping a table). That is why a co-ordinated source control system is so important.

Owais


Where there's a will, I want to be in it.
Go to Top of Page
   

- Advertisement -