list user of a database sql code example Example: sql server get users select * from master.sys.server_principals