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.