Tuesday, January 13, 2009

SQL Server 2005 Database Diagrams After RESTORE Operation

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

Problem

After a RESTORE of a database with SQL Server 2005 database diagram creation & access is often disabled, with the following error message.

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

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

No comments: