I know the name of the role and want to find all the users in this role. How to do this in SQL Server 2000 (in a SQL script, not in Management Studio or another tool)?
You can use the following stored procedures:
For fixed server roles, the sp_helpsrvrolemember stored procedure :
exec sp_helpsrvrolemember 'role'
For shared roles, the sp_helprolemember stored procedure :
exec sp_helprolemember 'role'
Just use SQL-DMO: Replace the role name with your role
exec sp_helprolemember rolename
Source: https://habr.com/ru/post/1698291/More articles:Good image gallery engines - graphicsusing a named function as a callback for $ .getJSON in jQuery to satisfy Facebook signature requirements - jsonOracle 10gr2: entering entered dates between 9:00 and 17:00? - dateОтключение + файла S в Perforce - perforceHow do I write this 3-level mysql query? - sqlВсплывающие окна оповещений от службы в Python - pythonДоступ к удаленному файлу с помощью веб-части SharePoint - c#JSP's big answer is truncated :( - httpHow to programmatically manipulate DLGTEMPLATE? - winapiWhat is a good website for developers? - development-environmentAll Articles