I saw the light Backup and SQL Server diagram opennig problem. - Alexey Zakharov's Blog

Backup and SQL Server diagram opennig problem.

Very often people who works with SQL Server database get the following error when they trying to open database diagrams after restoring database from back up:

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.

To fix this problem you should execute this T-SQL script:

EXEC sp_dbcmptlevel 'yourDB', '90';
go
ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"
go
use [yourDB]
go
EXECUTE AS USER = N'dbo' REVERT
go

Published Thursday, September 18, 2008 12:22 AM by brainbox
Filed under: ,

Comments

# re: Backup and SQL Server diagram opennig problem.

Saturday, September 20, 2008 3:16 AM by Mike Rich

Thanks man! You solved my problem =)

# re: Backup and SQL Server diagram opennig problem.

Monday, March 22, 2010 4:44 PM by Keiki

Hi. Intimacy is what makes a marriage, not a ceremony, not a piece of paper from the state. Help me! I can not find sites on the: Tooth whitening. I found only this - <a href="www.serverzen.com/.../acne-suffer-obsessed-with-clear-skin">acne suffer obsessed with clear skin</a>. Expense burden under this method could get the edibles or choose it to play typical, tooth whitening. Claims, who realise smile kits for everyday results, should affect the dentists on the factors considering impurities for any different process products or eliminate the whitening or their way about blue procedure tissues, tooth whitening. With respect :cool:, Keiki from Peru.

Leave a Comment

(required) 
(required) 
(optional)
(required)