Thursday, March 8, 2012

Database Diagrams

TITLE: Microsoft SQL Server Management Studio

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.


BUTTONS:

OK

I don't know what is the meaning of the above message, which I get when I 'right click' the Database Diagrams node of the Northwind database. Every thing seems OK, since I am the owner of this database.

I am using the trial version of MS SQL Server 2005.

Hi there,

Check the database compatability level for your database. To do this:

1) Right click on the desired database and select "Properties" from the context menu that appears

2) The "Database Properties" dialog box will appear on your screen. There will be an item on the left hand side of the dialog called "Options". Click on this.

3) The "Database Properties" dialog will change its appearance. There should be an entry in the dialog called "Compatability Level".

Now, from my experience, if the database compatability level is set to anything other than "SQL Server 2005 (90)" then diagramming won't work. You need to change the compatability level to "SQL Server 2005 (90)" if it is not currently set to this.

If that was your problem then after changing the compatability level you should be able to create database diagrams.

Also, while you have the "Database Properties" dialog open, it wouldn't hurt just to check that the owner is valid (if you have not already done so). You can check and edit the database owner by clicking on the "Files" item on the left hand side of the "Database Properties" dialog.

Hope that helps a bit, but sorry if it doesn't
|||

Thanks a lot for your reply

But unfortunately it did not work

I am using Windows Authentication when I log in. And when I click Files in the Database properties windows I find the owner is the same as the log in user.

|||did you create your database with detach/attach?|||

I did not create it

I do not remember, either I imported the database, or it came with the engine.

|||

you might want to eliminate the issue from your local instance by creating a new dummy database. If you have no problem with the new database, the issue might be caused by the source database you got.

I have noticed a similar issue after I shared my database in another machine.

|||

Nate -

Thanks for this post! That worked perfectly for me.

Regards,

Tim

|||

If there is no issue with a fresh database locally, the issue could be likely caused by credential inherited from external database when attached. I found out the similar issue in this scenario and resolved by doing the following,

Alter authorization on database::issue_database_name_here to [domain\user]

Just share my experience.

|||

Sorry, I was offline for few days.

Thank you for your replies. I'll try your solution.

Somebody suggested the following solution to me:

Use Northwind
EXEC sp_helpdb Northwind
EXEC Sp_ChangeDBOwner 'sa'
EXEC sp_helpdb Northwind

I don't have enough experience with SQL Server. So I wish to get your views about the above solution.

No comments:

Post a Comment