Re: script search for "dbo" in a database.



Hi Grazyna

dbo is not a role, it is a user and in SQL 2005, it is also a schema.
Do you mean that you want to find members of the db_owner role?
If so, you use the following stored procedure:

EXEC sp_helprolemember db_owner

--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com


"Grazyna" <Grazyna@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:31129F0B-2C16-48CE-905B-93803F11D42B@xxxxxxxxxxxxxxxx
I am looking for a script to find out all userid's in a database that have
"dbo" role.


.



Relevant Pages

  • Re: Access 2007, SQL 2000
    ... Since users are not dbo, and SQL 2000 used the user name as the schema identifier, you have to make sure that every reference to a SQL Server object is fully qualified with the dbo. ... Normally a user should not be able to create any new objects in the db, but if they do, those new objects will be in the userName schema, not the dbo schema, assuming the user is not a db owner. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: exporting into a SQL Server schema
    ... inside of the schema. ... The thing that's most confusing is that the dbo schema isn't ... take a look at the way the objects in the AdventureWorks database are ... It turns out that I'm moving some tables to a web hosted solution with sql ...
    (microsoft.public.access.externaldata)
  • Re: Please help with deleting a user.
    ... it says that it can not alter "dbo" schema. ... the login is the owner of a database. ... Links for SQL Server Books Online: ...
    (microsoft.public.sqlserver.security)
  • Re: Please help with deleting a user.
    ... it says that it can not alter "dbo" schema. ... the login is the owner of a database. ... Links for SQL Server Books Online: ...
    (microsoft.public.sqlserver.security)
  • Re: Default User
    ... Members of db_owner and db_ddladmin can create objects owned ... dbo owner. ... I can change the owner in each wizard, or create code, but I usually ... Which version of SQL Server are you on? ...
    (microsoft.public.sqlserver.security)