Before using the database to create the diagram, the results reported this error. Then search for it.
Transfer from http://www.cnblogs.com/muer/archive/2010/04/14/1711778.html
This database does not have a valid owner and therefore cannot install database diagram support Objects. To continue, first use the file page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, and then add the database diagram support object.
The first way to change is not possible, and the owner of the file is also SA. In the csdn for half a day, a comrade gave a second solution, using SSMS. Run the following command specifically in SSMs:
alter AUTHORIZATION on Database:: Mydbname to sa
changes the mydbname to the actual database name so that the owner can be set to SA.
After some effort has not found ssms[hehe, I in the new query execution success, but did not solve the problem], hey. It's gone too. Mind with the idea of a re-grid system.
Imagine the trouble with the grid system, followed by Baidu. The solution was found in a forum:
The workaround is as follows:
1, set compatibility level 90 (2005 = 90) (2000)
use master
go
EXEC dbo.sp_dbcmptlevel @dbname = ' database name ', @new_cmptlevel = 90
go
Before running this code will be an error, because the use of master may be in Chinese, I beat it again, through.
[This command is complete: the report ' DBCC execution is complete.] If the DBCC output error message, please contact the system administrator ", regardless of it, then click on the" database Diagram ", reported that" This database is missing one or more of the supporting objects required to use the database diagram, whether to create ", select" Yes ", the problem is resolved)
Or select the database you restored, right-click, select Properties----- compatibility level , choose sqlserver2005 (90) and then OK. (hehe, that's how I solved it.) Oh, a little happy for a moment)
At this point, you will be prompted when you expand the database Diagram node under the database, "This database is missing one or more of the supporting objects required to use the database diagram, whether to create", and select "Yes".
2, through the above methods of operation, if the problem persists, proceed as follows
Select your database and choose Security, Users, select dbo, open the property page, create a new query if the login name is empty, and then
Use [your database name]
EXEC sp_changedbowner ' sa '
After successful execution, you then select the database diagram node, prompting "This database is missing one or more of the supporting objects required to use the database diagram, create", and select "Yes". You can see the diagram that was originally built.
If the execution code does not pass, it may be a coding problem, self-tapping can pass.