Shaji
Shaji

Reputation: 761

SQL Server Database ODBC User List

Is it possible to get a list of ODBC users on a SQL Server database? I can see them using SSMS; but would like get a report for the management.

Thank you!

Upvotes: 0

Views: 236

Answers (1)

marc_s
marc_s

Reputation: 754240

You can easily fetch those using a query something like this:

SELECT 
   name, principal_id, default_schema_name, create_date  -- more columns available
FROM sys.database_principals
WHERE type = 'S'  -- SQL Server users
   OR type = 'W'  -- Windows users

Upvotes: 1

Related Questions