Saturday, 4 April 2015

List of database users and server level users in SQL Server ?

SELECT * FROM sys.database_principals where (type='S' or type = 'U')

SELECT * FROM sys.server_principals

No comments:

Post a Comment