how to get list of database users in sql server code example Example: sql server get users select * from master.sys.server_principals