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
 SQL Server Administration (2008)
 execute procedure as sysadmin

Author  Topic 

memaster
Starting Member

3 Posts

Posted - 2011-04-14 : 03:10:11
I want have a procedure that backups of database 1, deletes database 2 and restores the backup to database 2. For this steps you need special rights.
Can I pack this to a stored procedure, that a user without sysadmin rights can run this?
Or is there a other way to do this?

Jahanzaib
Posting Yak Master

115 Posts

Posted - 2011-04-16 : 01:43:48
Give user db_backupoperator rights on a particular or required database

Regards,

Syed Jahanzaib Bin Hassan
MCTS,MCITP,OCA,OCP,OCE,SCJP,IBMCDBA

My Blog
www.aureus-salah.com
Go to Top of Page

memaster
Starting Member

3 Posts

Posted - 2011-04-19 : 02:30:12
I found a way. The use has to be the creator of the database.
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-04-19 : 17:14:34
Would the EXECUTE AS clause be of use to you here? BOL has the details.

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)
Go to Top of Page
   

- Advertisement -