SQL EXPLORER
About Me
Mohamed Faizal
Barking, Essex, United Kingdom
MCITP DBA ,MCITP BI & Oracle OCP 11G
View my complete profile
Friday, February 28, 2014
To check sysadmin for the current session user in SSMS
IF
IS_SRVROLEMEMBER
(
'sysadmin'
)
=
1
print
'Current user''s login is a member of the sysadmin role'
ELSE
IF
IS_SRVROLEMEMBER
(
'sysadmin'
)
=
0
print
'Current user''s login is NOT a member of the sysadmin role'
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment