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 2008 Forums
 Transact-SQL (2008)
 Restoring a stored procedure using a BAK file

Author  Topic 

sorlecha
Starting Member

1 Post

Posted - 2012-02-16 : 14:59:25
Hi all

I have a full backup from my database and I want to know if it's possible to restore just the stored procedures to their previous state using that BAK file, leaving the tables and data intact. May be this is a stupid question but I need help.

X002548
Not Just a Number

15586 Posts

Posted - 2012-02-16 : 15:08:08
no.

You need to restore it to a database with a different name, then script out the sproc and drop the new database

And just ANOTHER Reason to use Version Control



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-02-16 : 15:11:08
Redgate has a product called Virtual Restore that allows you to do this type of thing. But, it is not a free tool, so may be that is not the solution for you.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2012-02-17 : 04:10:32
quote:
Originally posted by sorlecha

May be this is a stupid question but I need help.


The only stupid question is the one you do NOT ask
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-02-17 : 09:51:08
quote:
Originally posted by X002548

no.



What's worse, a stupid question or the wrong answer to a stupid question?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-02-17 : 10:21:10
quote:

What's worse, a stupid question or the wrong answer to a stupid question?


In my opinion, neither is so bad.

People ask stupid questions, or questions that may appear to be stupid to the SQL-savvy because the person asking the question is not familiar with SQL. But isn't that the point of this forum?

Wrong answers to questions are not so bad because almost always, someone else points that out, so both the person who asked the question and the person who gave the incorrect answer learn something new.

The worst thing in my book is someone being rude, condescending, sarcastic, or disrespectful to someone who asks a question. Before they respond in that manner, if only they remembered the old adage about "If you have nothing good to say, say nothing at all".
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2012-02-17 : 13:32:37
quote:
Originally posted by X002548

quote:
Originally posted by X002548

no.



What's worse, a stupid question or the wrong answer to a stupid question?


Quoting yourself, and answering yourself, is right up there Brett !!!
Go to Top of Page
   

- Advertisement -