Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

DB Restore permissions for SQL Stored procedure

$
0
0

I'm not sure if this is at all possible. But if it is, could someone point me in the right direction please?

So I have a SQL server with a hand full of databases on it. Some of which can't be over-written by restores under any circumstances. The others (used for user test playgrounds) can be but only with a specific script run after, and only by specific administrative users.

So, what I've done is create a stored procedure that does all the necessary validations, runs the necessary code after the restore and all that. Makes is pretty fool-proof. (fingers crossed)

Is it possible to deny restore database permissions to user accounts, so they can't manually over-write a DB, but allowing them to restore via that stored procedure?

Ie, somehow grant that stored procedure it's own permissions to restore certain databases?

Thanks!


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>