Re: Check User in Role?
From: Partha Mandayam (mcp111_at_hotmail.com)
Date: 08/26/04
- Next message: Willianto: "SQL Server slows down when after the apps runs for several hours."
- Previous message: Adam Machanic: "Re: Group By Count"
- In reply to: John Rugo: "Check User in Role?"
- Next in thread: David Portas: "Re: Check User in Role?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 26 Aug 2004 12:02:08 -0700
use IS_SRVROLEMEMBER.
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'
ELSE IF IS_SRVROLEMEMBER ('sysadmin') IS NULL
print 'ERROR: Invalid server role specified'
Regards
Partha Mandayam
Software Consultant
Home page: http://partha.tripod.com
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Willianto: "SQL Server slows down when after the apps runs for several hours."
- Previous message: Adam Machanic: "Re: Group By Count"
- In reply to: John Rugo: "Check User in Role?"
- Next in thread: David Portas: "Re: Check User in Role?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|