April 29, 2015 at 11:13 am
Is it possible to identify/map application users inside sql 2005 database?If yes, how?
April 29, 2015 at 11:59 am
metroman17 (4/29/2015)
Is it possible to identify/map application users inside sql 2005 database?If yes, how?
Yes, you can query the users from the database. When you say you want to map them, I presume you mean map them to their SQL login. This should give you want you're after.
SELECT logins.name, logins.type_desc, users.name
FROM sys.database_principals users
INNER JOIN sys.server_principals logins ON logins.sid = users.sid
WHERE logins.type IN ('S', 'U')
ORDER BY logins.type_desc, logins.name;
April 29, 2015 at 12:37 pm
The answers from Lowell in the duplicate thread are located here: http://www.sqlservercentral.com/Forums/Topic1681290-359-1.aspx
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply