|
dolphin123
Starting Member
USA
44 Posts |
Posted - 07/17/2012 : 16:15:27
|
Hi,
I wrote this query to find the users who created the databases on an instance, but I am getting the wrong user IDs such as dbo.
I like to know the user as in "Security - logins". How can I find that out?
SELECT sd.sid,sd.name,sd.crdate, su.name FROM master..sysdatabases sd inner join master..sysusers su on sd.sid = su.sid
Also, if a user logged in using the windows security (that is "domainname\username", is there any way to list that one?
Appreciated in advance. |
|