January 14, 2009 at 8:31 am
On a database you can right click the database and set the owner to be
Myuser.
Or you can select the user in the database and right click and set role member as db_owner
What is the difference between the two ways.
Thanks
January 14, 2009 at 8:43 am
There can only be one owner (creator of the database), and I actually was not aware that you could change it through SSMS (though I assume there is a backend hack to it somewhere).
You can give as many people as you would like the role of db_owner.
January 14, 2009 at 8:46 am
The difference is what is displayed when you look at the database properties. As far as who has what access to the database, there's no difference.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 14, 2009 at 8:59 am
I am aware of one owner and many users can be db_owner.
I wasn't sure if there are specific differences or why even do database owner and not just use
user...and set db_owner
Just curious...
January 14, 2009 at 10:10 am
The user who creates the database is set to as the owner of the database, which you can see in the options tab of properties...and yes, it can be changed from here. Usually this needs to be 'sa' or in some specific applications it can be a particular user or dbo.
Where any user can be adder to a role as db_owner for a database..
you can drop a user by taking it off the db_owner role, but you cannot drop a user if it owns the databse...
Pretty much its the same when it comes to deleting but with regards to creation of a database and assigning the owner it differs as I explained above..
Thanks!!
The_SQL_DBA
MCTS
"Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."
January 14, 2009 at 10:42 am
FYI.
We cannot change the database owner by rightclicking the database and selecting properties.
We can change it by this command.
exec sp_changedbowner 'sa'
January 14, 2009 at 12:06 pm
Actually that makes sense you could have the owner be one user (sometimes app need this set).
Example Owner APPUSER owner
Then you could have dev/programmers who need db_owner to create add/delete procs but they couldn't infact delete the DB itself because it is owned by APPUSER.
Now that makes sense to me....
Good explaination....
January 15, 2009 at 1:48 am
Hi - could you tell me how to change the DB owner by right-ckicking the DB in SSMS please? I've looked at the Options (SQL Sever Standard) tab as The_SQL_DBA suggests, but I can't see it - probably need coffee ... Thank you.
January 15, 2009 at 6:30 am
you cant change it by rightclicking anything....
use have to use this SP
exec sp_changedbowner 'sa'
January 15, 2009 at 7:24 am
In sql 2000 you can't but sql 2005 you can by right click database, and click Files, for the owner
January 15, 2009 at 8:41 am
Thank you Tracey.
January 15, 2009 at 9:06 am
To be a little clearer, if you are changing the owner through SSMS the sequence is
Right-click on the database
Select properties
Select files
You will see the owner appear in a field which can be edited.
January 15, 2009 at 2:06 pm
+1 for above
You can do the same thing (change owner) to a SQL Agent Job as well
as sometimes it won't run without the "correct" owner who has permission
January 17, 2009 at 7:29 am
It just like users and group concept in any operating system. db_owner is like administrator who deploy do anything in favour of db, even could delete add or modify
January 19, 2009 at 5:07 pm
From BO:
If the database exists, RESTORE permissions default to members of the sysadmin and dbcreator fixed server roles and the owner (dbo) of the database.
Because fixed database role membership can be checked only when the database is accessible and undamaged, which is not always the case when RESTORE is executed, members of the db_owner fixed database role do not have RESTORE permissions.
MJ
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply