Skip to main content

List users with their rights

To list the users with their rights, use below query. You have to system admin (sysadmin) rights to execute this query.
SELECT name,type_desc,is_disabled, create_date FROM master.sys.server_principals
WHERE IS_SRVROLEMEMBER ('sysadmin',name) = 1 ORDER BY name;

Comments

Popular posts from this blog

Get all constraints in Oracle

 To get all the constraints created in Oracle database, use below query.              SELECT * FROM USER_CONSTRAINTS; If you want to get the constraints  created for a particular user then use below SQL query.              SELECT   *   FROM  USER_CONSTRAINTS where owner = 'userName';