Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / July 2008

Tip: Looking for answers? Try searching our database.

SQLServer2005\DatabaseDiagram\Owner

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gh - 03 Jul 2008 13:24 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.