posts - 234, comments - 480, trackbacks - 56

My Links

News




I am born in Bangladesh and currently live in Melbourne, Australia. I am a co-founder and core developer of Pageflakes www.pageflakes.com and CEO at Simplexhub, a highly experienced software development company based in Melbourne Australia and Dhaka, Bangladesh.

I also created SmartCodeGenerator

Some of 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

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
Gravatar

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

You are a conversant man
12/6/2008 11:51 PM | ali hourshenas
Gravatar

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

it works, great.
12/16/2008 9:17 PM | ashish
Gravatar

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

Well done Maestro!
12/23/2008 6:39 AM | Nikola
Gravatar

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

Perfect. Works as required.
12/31/2008 3:48 AM | Anil Tumati
Gravatar

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

u r excelent!
Thanx
1/3/2009 5:59 PM | Shaghayegh
Gravatar

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

How can I ever be worthy enough of your perfectness ?

Thanks Man !

Works great !


Erik
AFCC Inc.
1/9/2009 5:42 AM | Erik
Gravatar

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

Really Great
1/19/2009 10:05 PM | Mohamed
Gravatar

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

Hi,

It was really helpful.... thanks a lot...

thanks
Justin
1/28/2009 10:10 PM | Justin
Gravatar

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

Perfect solution! Thanks a lot!
2/5/2009 8:04 PM | Fikre
Gravatar

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

Worked for me as well! Thanks for saving me hours of troubleshooting!
2/8/2009 8:38 AM | Erwin_Br
Gravatar

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

perfect !!! this is very helpful. thx bro , u are genious !!!
2/16/2009 1:55 AM | suryodesign
Gravatar

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

Gud solution; Thanx a lot
2/23/2009 9:16 PM | Musawar
Gravatar

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

Ditto...thanks a bunch! Worked great.
3/23/2009 3:06 AM | CH
Gravatar

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

Thank you!
3/23/2009 7:48 PM | Darryl
Gravatar

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

Thanks, Works like a charm
3/28/2009 9:24 AM | joe
Gravatar

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

Thank you
3/29/2009 6:05 PM | amr tawfik
Gravatar

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

Excellent it worked!
3/31/2009 6:02 AM | Mstrsen
Gravatar

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

Excellent tnx
4/19/2009 5:15 AM | kova
Gravatar

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

Thanks a ton!
5/7/2009 4:39 AM | Chakri Bireddy
Gravatar

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

Thank you !
Mil gracias amigo....
5/16/2009 1:53 AM | Mm0ra
Gravatar

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

thank you
It's working very good
6/1/2009 5:44 PM | Hameed
Gravatar

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

Thanks a lot! The second suggestion works!!
6/4/2009 11:36 AM | Harish
Gravatar

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

Good bro
6/8/2009 2:55 AM | abid hussain
Gravatar

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

i was to trying this and by setting owner name sa i could solve my problem.its good job
6/27/2009 2:52 PM | Raj Kumar Rai
Gravatar

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

it works... thanks a lot bro
7/14/2009 3:10 PM | Shakk
Gravatar

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

thank you guy, you save my life
7/28/2009 6:43 AM | Shiazu
Gravatar

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

thanks a lot,thanks a lot....
8/10/2009 2:14 AM | haiduonghy
Gravatar

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

thanks birkaç ton !!!
9/16/2009 9:51 PM | ömer
Gravatar

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

THANKS. IT WORKS FOR ME.
9/25/2009 6:58 PM | aloalao
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: