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.
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.
I know it is possible to change the database owner, but am I able to
the owner of a table as well? Currently, the owner of the database and
is EXAV. The problem is for the programmers... this is the only table
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
isn't the same. For the tables owned by EXAV, they have to code it
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!