May 15, 2006 at 1:50 pm
I log into the Server using a Windows Login. When I create a Database, the Database Owner shows as my Windows Login. I run the sp_changedbowner stored proc to change the DB Owner to 'sa'. Is there anyway to create a database with the owner automatically showing as 'sa' or 'dbo'? I thought this would happen since my Windows Login is set up in the 'Sysadmin' Server Role. When I create DB Objects they are created with 'dbo' as the owner (which is what I want). Is it a 'good practice' to create a Database with an owner other than 'sa' or 'dbo'?
Thanks, Kevin
May 15, 2006 at 2:49 pm
Hi Kevin,
There isn't a way to automatically set a database owner when a database is created. You'd either have to be connected as the login that you want to be owner or run sp_changedbowner after creating the database. The database owner will be the login that created it even if that login is a member of Sysadmin.
We typically use SA as the owner of our production databases. Some may like to use another local login. Here's a forum thread with a pretty good discussion of the subject:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=169032
Greg
Greg
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply