Database Diagram generation issue

Description: For the SQL DB, I was trying to generate the Database Diagram in Microsoft SQL Server Management Studio Express
          But the application is throwing some error related to ownership of the database as given below...

"TITLE: Microsoft SQL Server Management Studio Express
------------------------------

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, and then add the database diagram support objects.


Please resolve the error and install the necessary support objects to generate the diagrams.


Solution:

Issue due to recent restore of database from sql2000 to sql2005.We need to do run below steps to resolve the issue.

EXEC sp_dbcmptlevel 'yourdatabasename', '90';
go
ALTER AUTHORIZATION ON DATABASE::yourdatabasename TO "dbusername"
go


Comments

Popular posts from this blog

SSIS2008R2 Error: 0xC0209303 at Package:

SQL2008R2 Error: The remote copy of database "XXXXX" has not been rolled forward to a point in time that is encompassed in the local copy of the database log. (Microsoft SQL Server, Error: 1412)