Query to give db owner

Query to give db owner

Post by Jim Trowbridg » Tue, 24 Sep 2002 09:28:21



Has anyone got an SQL query that will display a given
database' owner ?

I'm looking to get the same value that you see when
displaying Properties on a database, from the database
list in Enterprise Manager.

TIA

 
 
 

Query to give db owner

Post by Dejan Sark » Tue, 24 Sep 2002 09:36:21


Hi!

You can use the sp_helpdb system SP or INFORMATION_SCHEMA.SCHEMATA view.

--
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.
PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


Quote:> Has anyone got an SQL query that will display a given
> database' owner ?

> I'm looking to get the same value that you see when
> displaying Properties on a database, from the database
> list in Enterprise Manager.

> TIA


 
 
 

1. Change DB owner/Table owner

I know it is possible to change the database owner, but am I able to
change
the owner of a table as well?  Currently, the owner of the database and
tables
is EXAV.  The problem is for the programmers...  this is the only table
owned by
anyone other than DBO.  We've got some code that is supposed to work
for both tables and it causes them some coding problems because that
qualifier
isn't the same.  For the tables owned by EXAV, they have to code it
EXAV.tablename
and for the tables owned by DBO, they just code the tablename.

Is there anything I can do short of creating a new database and copying
the data over?
Thanks for the advice!
Toni Eibner

2. RETURN_VALUE in stored procedure parameter list

3. join queries with jet linked db on guid field gives incorrect result

4. pgsql/src/backend/catalog (heap.c)

5. A database owner is not reconized as a database owner

6. Transfering data from Sybase to Oracle

7. SP2 blues: owner object not seen by owner unless fully qualified

8. Modem settings for 8-port serial board on ap/pro

9. owner name listed for OWNER column

10. HELP!: DB/2 Query Manager (DB/2 v1.0) not available under DB/2 v2.1

11. DB Object Owner BUG!!!

12. DB Owners cannot create/edit Diagrams

13. Problem with db table owners and access