Friday, February 01, 2013 2:52 PM
I was looking at several new databases in one of the servers I am using at my work place. We wanted to find out the user who created those databases, but I didnot find any way to do it. Could someone please help me with this.
Friday, February 01, 2013 2:58 PM
You can only query the current "database owner", but this isn't necessary the user who created the database; the owner can change afterwards:
SELECT D.name as DatabaseName ,P.name as UserName FROM sys.databases AS D INNER JOIN sys.server_principals AS P ON D.owner_sid = P.sid
Olaf HelperBlog Xing
Friday, February 01, 2013 3:05 PMModerator
You may be able to find it in default trace: