After restoring the database backed up by SQL2000 to sql2005, the "database relationship diagram" prompt: the database does not have a valid owner, so you cannot install the database relationship diagram support object "SOLUTION
After restoring the database backed up by SQL2000 to sql2005, the "database relationship diagram" prompt: the database does not have a valid owner, so you cannot install the database relationship diagram support object. To continue, first set the database owner to a valid login name using the "file" page or the alter authorization statement in the "database properties" dialog box, and then add a database relational diagram support object.
The solution is as follows:
1. Set the compatibility level to 90 (2005 to 90)
Use [Master]
Go
Exec DBO. sp_dbcmptlevel @ dbname = 'database name', @ new_cmptlevel = 90
Go
Or select the database you want to restore, right-click it, select Properties-> options-> Compatibility Level, select sqlserver2005 (90), and then click OK,
When you expand the "database relationship diagram" node under the database, you will be prompted, "This database lacks one or more support objects required to use the database relationship diagram, whether to create ", select "yes.
2. If the problem persists after performing the above operations, continue as follows:
Select your database, select "security"-> "user", and select DBO to open the attribute page. If the logon name is empty, create a new query and
Use [your database name]
Exec sp_changedbowner 'sa'
After the execution is successful, select the "database relationship diagram" node and prompt "this database lacks one or more support objects required to use the database relationship diagram, whether to create ", select "yes. You can see the previously created graph.
# Database Technology