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.
Author |
Topic |
Shivan86
Starting Member
4 Posts |
Posted - 2013-03-28 : 05:50:49
|
I have working stored procs for backup and restore of DB. i have a question.If i copy these stored procs in respective database folders, how do i execute restore DB? Whats the best practise for keeping stored proc for restore and backup of DB.I am using SQL 2005 express edition.thanks. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-28 : 05:57:22
|
you dont need to copy stored proc files to any folder. once you create proc it will reside within database. then everytime you need to execute it just call the stored procedure asEXEC procedurename parameter1=value1,parameter2=value2,...depending on number of parameters it require------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Shivan86
Starting Member
4 Posts |
Posted - 2013-03-28 : 06:06:02
|
Thanks for the reply!got it but lets say i have one DB by the name 'production'. If i am running a stored procedure from production to restore the same database will it work ? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-28 : 06:24:13
|
nope..you've to run procedure from master.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2013-03-31 : 02:57:22
|
or any other database , except the one the one you're trying to restoreJack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
|
|
|