dbo | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

dbo

Hi there Is it possible to have more than one dbo for a database? If so is there any query which lists all the dbo names for a particular database? Pls let me know immediately.. Regards
Sri
BOL refers
The dbo is a user that has implied permissions to perform all activities in the database. Any member of the sysadmin fixed server role who uses a database is mapped to the special user inside each database called dbo. Also, any object created by any member of the sysadmin fixed server role belongs to dbo automatically.
I feel there is no pre-supplied statement to return the information and I need to check what statement can return the list of DBOs. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
But we can have more than one dbo’s for a database right?? I want to get the list of all the dbo’s… Pls help me out..
You can only have one dbo user per database. Every database has one and you can’t delete it.
But you can add members to the fixed database role db_owner… —
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)

Hi,
as mentioned by Satya their’s only one DBO per database ,more over their’s no query but you can get help from
select * from syslogins and sp_helpuser or select * from sysusers where uid = 16384
this will return db owner Regards Hemantgiri S. Goswami
[email protected]
"Humans don’t have Caliber to PASS TIME , Time it self Pass or Fail Humans" – by Hemant Goswami

As Frank had mentioned, we can add members to the db_owner rle. I need to get all the members name… Any pointers??
Have a look at IS_MEMBER and/or IS_SRVROLEMEMBER in BOL if that gives you what you need. —
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)

I don’t see how this helps, ghemant:
select * from sysusers where uid = 16384 That’s just the uid for the db_owner role, and we already know that role exists. select u.name from sysusers as u, sysmembers as m where m.memberuid = u.uid and m.groupuid = ‘16384’ This will return all members of db_owner role.
Hi,<br /><blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by mulhall</i><br /><br />I don’t see how this helps, ghemant:<br />select * from sysusers where uid = 16384<br /><br />That’s just the uid for the db_owner role, and we already know that role exists.<br /><br />select u.name <br /><br />from sysusers as u, sysmembers as m<br /><br />where m.memberuid = u.uid<br /><br />and m.groupuid = ‘16384’<br /><br />This will return all members of db_owner role.<br /><br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote"><br /><br />Thanx for modification in my query , it will return the list of users with db_owner role <br /><br /><b><i>select u.name <br /><br />from sysusers as u, sysmembers as m<br /><br />where m.memberuid = u.uid<br /><br />and m.groupuid = ‘16384’</i></b><br /><br /><br />[<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br />Regards<br /><br />Hemantgiri S. Goswami<br />[email protected]<br />"Humans don’t have Caliber to PASS TIME , Time it self Pass or Fail Humans" – by Hemant Goswami<br />
I was unable to find the required Tsql to findout list of dbo, I feel there is no direct query and you need to interpret few results from above queries. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>