About 816,000 results
Open links in new tab
  1. SQL SERVER – List Users with System Admin (sysadmin) Rights

    Dec 18, 2017 · Here is the quick script which you can run and list all the users with admin rights. If you find your username there, you know you are an admin. SELECT name,type_desc,is_disabled, create_date FROM master.sys.server_principals WHERE IS_SRVROLEMEMBER ('sysadmin',name) = 1 ORDER BY name

  2. SQL SERVER - Query to Get the List of Logins Having System Admin ...

    Jan 11, 2017 · SELECT 'Name' = sp.NAME ,sp.is_disabled AS [Is_disabled] FROM sys.server_role_members rm ,sys.server_principals sp WHERE rm.role_principal_id = SUSER_ID('Sysadmin') AND rm.member_principal_id = sp.principal_id

  3. How do I find Windows users and groups who have sysadmin access to SQL ...

    Oct 13, 2018 · If you want to list users based on their permissions groups, use sys.server_role_members table. select * from master.sys.server_role_members JOIN them to list all users that have been granted a sysadmin rights :

  4. SQL SERVER – List Users with System Admin (sysadmin) Rights – …

    Dec 20, 2017 · Let's learn how we can fix a specific log shipping error about the sysadmin fixed server role. Yesterday I shared a blog post where I discussed how to list all the users with the System Admin (sysadmin) rights. I have received a quite a …

  5. SQL Server security report to show sysadmins and database …

    Nov 14, 2016 · Knowing who has sysadmin level rights or database owner rights for SQL Server is a critical DBA task. We will create a simple solution that provides you a report so you can quickly see what accounts have these elevated permissions.

  6. How to get the list of all database users - Stack Overflow

    Sep 18, 2013 · SELECT name FROM sys.database_principals WHERE type_desc = 'SQL_USER' AND default_schema_name = 'dbo' This selects all the users in the SQL server that the administrator created!

  7. Listing the existing SQL Server Logins and Users

    Try this one - this will list users, objects and the permissions that they have on those objects: SELECT p.name, o.name, d.* FROM sys.database_principals AS p JOIN sys.database_permissions AS d ON d.grantee_principal_id = p.principal_id JOIN sys.objects AS o ON o.object_id = d.major_id

  8. Query all Databases a User has Access to as Administrator

    Jun 14, 2012 · I'm looking to query all databases mapped to a user, similar to Security > Logins > Properties > User Mapping. This may be done in SQL 2005 if possible. For example, something similar to: SELECT name FROM sys.databases WHERE HAS_DBACCESS(name) = 1

  9. sql server - How to get all the users on a database with SA access ...

    The simplest scenario (a user explicitly granted sysadmin directly) is covered by the following query: SELECT p.name FROM sys.server_principals AS p INNER JOIN sys.server_role_members AS m ON p.principal_id = m.member_principal_id WHERE m.role_principal_id = 3;

  10. PowerShell quick list of SQL Users with SysAdmin Role

    Feb 3, 2012 · Get the SQL Logins information. Search for SQL users with “SysAdmin” Role, and builds a customized information in a PSObject. Export the information to a CSV file.

  11. Some results have been removed
Refresh