How to know the user who created a database in SQL Server?
-
Friday, February 01, 2013 2:52 PM
Hi All,
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.
Thanks
Vineesh
vineesh1701
All Replies
-
Friday, February 01, 2013 2:58 PM
Hello,
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.sidOlaf Helper
Blog Xing- Proposed As Answer by Satheesh Variath Friday, February 01, 2013 3:51 PM
- Marked As Answer by Naomi NMicrosoft Community Contributor, Moderator Sunday, February 10, 2013 3:23 PM
-
Friday, February 01, 2013 3:05 PMModerator
You may be able to find it in default trace:
http://www.sqlusa.com/bestpractices/default-trace/
Kalman Toth SQL 2008 GRAND SLAM
Paperback/Kindle: SQL Server 2012 Pro- Proposed As Answer by Satheesh Variath Friday, February 01, 2013 3:51 PM
- Marked As Answer by Naomi NMicrosoft Community Contributor, Moderator Sunday, February 10, 2013 3:24 PM

