Database diagrams on disconnected devices

If you try to use the database diagram feature in SQL Server Management Studio and the owner of the database is a domain id but you are disconnected from the domain (notebook users!), you’ll get an error like this:

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.

What you need to do is change ownership of the database:

 

 

 

/* replace the database name parameters with [CTRL]+[SHIFT]+[M] */

use master

go

ALTER AUTHORIZATION ON DATABASE::<Database_Name, sysname, Database_Name> TO “sa”

go

use <Database_Name, sysname, Database_Name>

go

EXECUTE AS USER = N’dbo’ REVERT

go

 

 

Categories: SQL Server Management Studio

Post navigation

Proudly powered by WordPress Theme: Adventure Journal by Contexture International.