Monday, March 26, 2012

Restoring stored procedure HELP!

Someone accidently deleted some of a stored procedure. Is it possible to
restore just that one whole procedure, or do we have to restore DB and copy
that one store procedure?
Hi
Restore the DB as a different DB on the server and copy it over.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:4A8E8BD3-461B-4175-93B2-37F22B9F6B12@.microsoft.com...
> Someone accidently deleted some of a stored procedure. Is it possible to
> restore just that one whole procedure, or do we have to restore DB and
> copy
> that one store procedure?
|||You can't selectively restore objects. Restore the database elsewhere and
then copy the proc.
It's definitely good practice to keep a separate copy of your SQL source
code, just as you would for any other code in C# or VB. Use a source control
system such as Microsoft SourceSafe.
David Portas
SQL Server MVP
|||restore primary filegroup and copy sp
Aleksandar Grbic
MCDBA, Senior Database Administrator
"Mike" wrote:

> Someone accidently deleted some of a stored procedure. Is it possible to
> restore just that one whole procedure, or do we have to restore DB and copy
> that one store procedure?

No comments:

Post a Comment