Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Roles

Status
Not open for further replies.

svagelis

Programmer
May 2, 2001
121
GR
I m trying to find out if there is a way to detect the user's assigned role ( SQL Server Role ) from my vb application in order to enable or disable some features.

P.S. I m using NT Authentication

PLz help
 
There is a table in the master DB called syslogins. Within that table there are integer fields: (sysadmin, securityadmin, serveradmin, setupadmin, processadmin, diskadmin, dbcreator). If a user is a member of one or more of these roles, he/she will have a '1' in that field. Otherwise the field will be populated with a '0'.

If you use the syslogins table along with the sysusers table in your user DB(s), you should be able to retrieve any data you need to...

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top