Ad una nuova installazione di Sql Server e quando faccio l’attach di un DB proveniente da Sql 2000 ho sempre il solito errore nel momento in cui cerco di aprire i diagrammi:
“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.”
Vi posto il codice da eseguire per ovviare a questo fastidioso problema che non viene via nemmeno impostando la compatibilità su Sql 2005 nelle option del DB
use [master] EXEC sp_dbcmptlevel 'TuoDatabase', '90';
go
ALTER AUTHORIZATION ON DATABASE::TuoDatabase TO tuoLogin
go
use [TuoDatabase]
go
EXECUTE AS USER = N'dbo' REVERT
go
Spero vi sia utile![]()



Facebook
LinkedIn
Twitter
RSS