From: gh on
I have a database that my client sent me for testing an application on.
I setup a new database with the same name as my clients server was
using and did a restore to get it installed on my machine. I was
wanting to do a Database Diagram of it, but when I try to open up the
Database Diagram folder I get the following error message.

Database Diagram support objects cannot be installed because this
database does not have a valid owner. To continue first usr the files
pages of the Database Properties dialog box or Alter the Authorization
statement to set the database owner to a valid login, then add the
database diagram support objects.

I have another database I have used the Diagram with, without any
problems. I can get into the Table, views and other folders under this
database, without any problems.

What do I need to change?

TIA
From: Uri Dimant on
gh
What is the db owner? I think you do not have a logi mapped to the db
owner.

Take a look at sp_changedbowner system sp
BTW , is it SS2005?



"gh" <gh(a)att.net> wrote in message
news:eHJhJfQ3IHA.1420(a)TK2MSFTNGP06.phx.gbl...
>I have a database that my client sent me for testing an application on. I
>setup a new database with the same name as my clients server was using and
>did a restore to get it installed on my machine. I was wanting to do a
>Database Diagram of it, but when I try to open up the Database Diagram
>folder I get the following error message.
>
> Database Diagram support objects cannot be installed because this database
> does not have a valid owner. To continue first usr the files pages of the
> Database Properties dialog box or Alter the Authorization statement to set
> the database owner to a valid login, then add the database diagram support
> objects.
>
> I have another database I have used the Diagram with, without any
> problems. I can get into the Table, views and other folders under this
> database, without any problems.
>
> What do I need to change?
>
> TIA


From: Ekrem Önsoy on
Hello,

Probably the database that you attached is at 80 level which means it's a
SQL Server 2000 Database. You should increase its level to 90 to perform the
action you want.

So, you can use the following code to achieve this.

However, I suggest you to test this first using a copy of the database in
question. Because you may experience unexpected problems because of this
elevation.

EXEC sp_dbcmptlevel '<type here your db name>', '90';
go
ALTER AUTHORIZATION ON DATABASE::<type here your db name> TO "<type here
your Login name>"
go
use [<type here your db name>]
go
EXECUTE AS USER = N'dbo' REVERT
go

--
Ekrem �nsoy



"gh" <gh(a)att.net> wrote in message
news:eHJhJfQ3IHA.1420(a)TK2MSFTNGP06.phx.gbl...
>I have a database that my client sent me for testing an application on. I
>setup a new database with the same name as my clients server was using and
>did a restore to get it installed on my machine. I was wanting to do a
>Database Diagram of it, but when I try to open up the Database Diagram
>folder I get the following error message.
>
> Database Diagram support objects cannot be installed because this database
> does not have a valid owner. To continue first usr the files pages of the
> Database Properties dialog box or Alter the Authorization statement to set
> the database owner to a valid login, then add the database diagram support
> objects.
>
> I have another database I have used the Diagram with, without any
> problems. I can get into the Table, views and other folders under this
> database, without any problems.
>
> What do I need to change?
>
> TIA

From: gh on
Uri Dimant wrote:
> gh
> What is the db owner? I think you do not have a logi mapped to the db
> owner.
>
> Take a look at sp_changedbowner system sp
> BTW , is it SS2005?
>
>
>
> "gh" <gh(a)att.net> wrote in message
> news:eHJhJfQ3IHA.1420(a)TK2MSFTNGP06.phx.gbl...
>> I have a database that my client sent me for testing an application on. I
>> setup a new database with the same name as my clients server was using and
>> did a restore to get it installed on my machine. I was wanting to do a
>> Database Diagram of it, but when I try to open up the Database Diagram
>> folder I get the following error message.
>>
>> Database Diagram support objects cannot be installed because this database
>> does not have a valid owner. To continue first usr the files pages of the
>> Database Properties dialog box or Alter the Authorization statement to set
>> the database owner to a valid login, then add the database diagram support
>> objects.
>>
>> I have another database I have used the Diagram with, without any
>> problems. I can get into the Table, views and other folders under this
>> database, without any problems.
>>
>> What do I need to change?
>>
>> TIA
>
>
Yes it is a SQL Server 2005 DB. It has SA as the ownwer.

TIA