• opc.three (10/23/2013)


    No, it does't. A member of the sysadmin Role can simply enable it.

    You're conflating multiple issues. There is a difference between trusting someone to do all operations within the scope of the database engine, e.g. see all data in all tables within all databases, and trusting someone to do all operations on the server on which SQL Server is hosted, e.g. have access to xp_cmdshell to reach a cmd-shell command line on the host server.

    The privileges obtainable using XP_CMDSHELL are limited to those of the SQL Server Service account. If these are not sufficient to do all operations on the machine, xp_cmdshell doesn't allow a SQL Server admin to do all operations on it. Of course if you choose to run the SQL Service under an enterprise adminiistrator, or domain administrator, or even a local administrator you are giving SQL Admins a lot of privileges, but why would you want to run it that way? Is it too much effort to set up an account specifically to run the SQL Service under and not give it excessive privileges? I found it easy to do that with SQL 2008 and SQL 2008 R2, and SQL 2012 appears to do it for me unless I override it, making it even easier. It was of course a nightmare in SQL 2000, and I never used 2005 so I don't know what it was like there.

    The other thing to remember is that if you run SQL Server Agent under a privileged account then everyone with access to sp_add_jobstep can use those privileges (unless you set up an agent proxy, but of course that won't stop SA); that's another account that ideally shouldn't be a member of any administrator group.

    Tom