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.
ALTER AUTHORIZATION ON DATABASE: Database_name TO valid_login
I use SSMS to solve my problem.
In SQL Server Management Studio do the following:
- Right Click on your database, choose properties
- Go to the Options
- In the Dropdown at right labeled "Compatibility Level" choose "SQL Server 2005(90)"
- Go to Files
- Type "sa" in the owner textbox
- Click OK
Alternatively, we can solve it using TSQL:
- My database name: avlDB
- MY Login: sa
EXEC sp_dbcmptlevel 'avlDB', '90';
GO
ALTER AUTHORIZATION ON DATABASE::avlDB TO "sa"
GO
USE [avlDB]
GO
EXECUTE AS USER = N'dbo' REVERT
GO
8 comments:
Thank you! Your suggested procedures workded in SQL 2008 also.
I like to give you 5 stars
Thank you, it sloved my problem.
I will give rating 5 to this.
thanks so much
It's helpful!
Let's have a look with my blog:
http://tcforecast.blogspot.com
The reason for this error is because the database backup was taken from different machine.To fix this issue, we need to add a valid user account as owner for this database... refer to this link for more details
http://www.a2zmenu.com/MySql/SQ-Database-Diagram-Issue.aspx
Thanks very much !
thanks very much !
It did helped heaps. Thanks a bunch.
Works in SQL Server 2012. Thanks.
Post a Comment