posts - 218, comments - 222, trackbacks - 68

My Links

News




I am a Microsoft Certified Application Developer MCAD Chartered Member (C# .Net) and born in Bangladesh.
I work for Ocean Informatics Pty Ltd as a Senior Developer - Analyst.
I am also co-founder and core developer of Pageflakes (acquired by LiveUniverse) www.pageflakes.com
and most recently created SmartCodeGenerator

My Articles
Flexible and Plugin based .Net Application..
Mass Emailing Functionality with C#, .NET 2.0, and Microsoft® SQL Server 2005 Service Broker'
Write your own Code Generator or Template Engine in .NET
Smart Code Generator .NET: Usage Overview
Smart Code Generator .NET: Architectural Overview
Smart Code Generator .NET: using with NAnt and Cassini

Archives

Free Programming Language Training

Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

Problem

After restoring DB in SQL Server 2005 db most of the time I get the following error:

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

Solution
This was not new to me and I always used to take the following steps to solve it:

1. Right Click on your database, choose properties
2. Goto the Options Page
3. In the Dropdown at right labeled "Compatibility Level" choose "SQL Server 2005(90)"
4. Goto the Files Page
5. Enter "sa" in the owner textbox.
6. Hit OK

But for some reason today the above steps did not work.... After googling for a while I quickly found
the following suggestion which worked just fine for me....

EXEC sp_dbcmptlevel 'yourDB', '90';
go
ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"
go
use [yourDB]
go
EXECUTE AS USER = N'dbo' REVERT
go

Print | posted on Monday, November 19, 2007 1:06 AM |

Feedback

Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

datbase diagram
11/26/2007 10:22 PM | nilufer tiken
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

You are a genius!!! Thanks a lot!!!!
3/18/2008 1:18 PM | Buloy
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

it is working fine for me

10x a lot.
4/23/2008 5:03 PM | parmesh
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

Thanks,

it's working well ...



5/30/2008 6:26 PM | ranganadh
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

1. Right Click on your database, choose properties
2. Goto the Options Page
3. In the Dropdown at right labeled "Compatibility Level" choose "SQL Server 2005(90)"
4. Goto the Files Page
5. Enter "sa" in the owner textbox.
6. Hit OK

just follows these steps
6/23/2008 5:02 PM | Sajid ali
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

This is great solution. Thanks for this
7/14/2008 8:57 AM | Hiren
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

thank you
8/13/2008 11:09 PM | george batres
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

thank you very very very much.
9/10/2008 2:55 PM | somaieh
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

Just wanted to add that I was able to connect and install the diagram support objects by using Visual Studio rather than SQL Server Management Studio -- without having to do the ALTER AUTHORIZATION statement. Steps below:



*
Opened Visual Studio 2005
*
Added the Server and database to the Data Connections on the Server Explorer tab.
*
Click Database Diagrams to expand
*
Received message box: This server does not have one or more of the databse objects required to use database diagramming. Do you wish to create them? Clicked YES
*
Diagrams showed up - Yay!

10/8/2008 9:18 PM | muhterem
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

Thanks Man
10/10/2008 11:21 PM | Jac
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

thank you for topic
10/23/2008 8:49 PM | abdul quadir saifee
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

mito!!!!!!!!!!!!!!1
10/24/2008 1:10 AM | Ema
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

Thanks, that saved me time!
10/29/2008 4:09 AM | Robb
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

Thanks a lot!!!
11/13/2008 12:41 AM | Vutt
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

thanks a lot!!!
it's working... dziekuje bardzo.
11/17/2008 10:58 PM | michal
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

THank u so much you are genious....
11/26/2008 6:38 PM | Harry
Gravatar

# re: Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

v.good .
thank you so much
11/30/2008 9:15 AM | Mahmoud

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 8 and 7 and type the answer here:

Powered by: