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
Uri Dimant - 03 Jul 2008 13:38 GMT
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?
>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
[quoted text clipped - 15 lines]
>
> TIA
gh - 03 Jul 2008 14:36 GMT
> gh
> What is the db owner? I think you do not have a logi mapped to the db
[quoted text clipped - 22 lines]
>>
>> TIA
Yes it is a SQL Server 2005 DB. It has SA as the ownwer.
TIA
Ekrem Önsoy - 03 Jul 2008 14:14 GMT
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

Signature
Ekrem Önsoy
>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
[quoted text clipped - 15 lines]
>
> TIA