SQL Server 2008 Diagram Failure

Problem: Restored a backup of a database from SQL Server 2005 onto a local SQL Server 2008 instance. The process worked but when trying to open the diagrams group, it throws the following error:-

‘Database diagram support objects cannot be installed because this database does not have a valid owner. To..’

Solution: Run the following SQL Script on the database.

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: