Showing posts with label sysadmin. Show all posts
Showing posts with label sysadmin. Show all posts

Sunday, February 19, 2012

Amendment to question.

Is there a way to remove the rights to add a new server login from a sys
admin server role member?
TIA,
JoeYou can't deny anything to a sysadmin - they can literally do anything on
the instance and any other permissions are ignored
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"jaylou" <jaylou@.discussions.microsoft.com> wrote in message
news:45188460-768D-4806-9F6F-A9A53B9AC84A@.microsoft.com...
> Is there a way to remove the rights to add a new server login from a sys
> admin server role member?
> TIA,
> Joe
>

Monday, February 13, 2012

Am I a sysadmin member?

Hi,

I want to check if the currently connected user is a sysadmin(or securityadmin) member. Could I only check whether the user has the CONTROL SERVER permission or not? Is there a straight way to test it?

Try using

SELECT IS_SRVROLEMEMBER( 'sysadmin', 'UserName' )

Returns 1 for true, 0 for false.

|||Thanks