I tried to create a database diagramm with SQL Server 2008, but an error occurs:
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.
Then I tried the following:
EXEC sp_dbcmptlevel 'Ariha', '90';
GO
ALTER AUTHORIZATION ON DATABASE::Ariha TO [WIN-NDKPHUPPNFL\Administrator]
GO
USE Ariha
GO
EXECUTE AS USER = N'dbo' REVERT
GO
Next erorr pops up:
Msg 15404, Level 16, State 11, Line 1 Could not obtain information about Windows NT group/user 'WIN-NDKPHUPPNFL\Administrator', error code 0x534.
The Problem is the name of the PC has changed into "DevPC" I also changed this in the update script, but still the same error 15404.
What can I do to fix this annoying error?
ベストアンサー1
In SQL Server Management Studio do the following:
- Right Click on your database, choose properties
- Go to the Options Page
- In the Drop down at right labeled "Compatibility Level" choose "SQL Server 2005(90)" 3-1. choose "SQL Server 2008" if you receive a comparability error.
- Go to the Files Page
- Enter "sa" in the owner textbox. 5-1 or click on the ellipses(...) and choose a rightful owner.
- Hit OK
after doing this, You will now be able to access the Database Diagrams.