Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Can we restore databases from database other than 'master' database? Expand / Collapse
Author
Message
Posted Monday, March 16, 2009 11:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 18, 2013 5:47 PM
Points: 7, Visits: 19
Hi,

We have a requirement where we need to restore databases programmatically. For this, we have executed few customized SPs in 'master' database to restore other databases which is definitely a bad idea. One of my colleauge says - The restore database stored procedure will only run on the master database. My question is can we do DB restore from any other DB (other than master) as long as the user has permission to do it? If so, how and what permission needs to be set for the user.

Thanks
Naveen
Post #676764
Posted Monday, March 16, 2009 11:35 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 4:07 PM
Points: 31,277, Visits: 15,735
This isn't a database level issue, it's a server permissions issue to create a db. The context doesn't, AFAIK, need to be master. I suppose you could restore these from msdb, or model, but you need a context on a new server.

In a DR situation, you won't have the proc there, unless it's in a backup of master or msdb (or model if you restore that).

what not have a script that does this, connect to the server (master or msdb) and then start the restores?







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #676776
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse