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
No comments:
Post a Comment