Thursday, March 8, 2012

Database Diagrams

I have a SQL 2000 database that I imported into SQL Server 2005 by restoring
the database from a backup. I carefully re-did the Users to make sure there
were corresponding Logins.
I want to create a Database Diagram using the Microsoft SQL Server
Management Studio. When I right click on the Database Diagrams node within
the correct database I get the following error.
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 ALTE AUTHORIZATION statement to set the
database owner to a valid login, then add the database diagram support
objects.
Now I did both of these suggestions and then looked at the owner of the
database, who in fact is a valid Login with sysadmin privileges.
I'm not sure where to go from here since everything seems to be done
correctly.
Any suggestions?
Michael Hockstein
This is covered in section 4.8 in the Readme file that comes with the
product .
To install database diagram support in SQL Server Management Studio,
databases must be in SQL Server 2005 database compatibility level. Database
compatibility level can be reset after diagram support is installed. To
create database diagrams, change the database compatibility level to 2005,
install database diagram support, and then return the database to the
desired database compatibility level. For more information, search for
"sp_dbcmptlevel" in SQL Server Books Online.
So, run the following statement and try the diagram again.
EXEC sp_dbcmptlevel database_name, 90
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"michael" <howlinghound@.nospam.nospam> wrote in message
news:EB3D155A-EC71-4854-BAC6-7B14BE038586@.microsoft.com...
>I have a SQL 2000 database that I imported into SQL Server 2005 by
>restoring
> the database from a backup. I carefully re-did the Users to make sure
> there
> were corresponding Logins.
> I want to create a Database Diagram using the Microsoft SQL Server
> Management Studio. When I right click on the Database Diagrams node
> within
> the correct database I get the following error.
> 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 ALTE AUTHORIZATION statement to set
> the
> database owner to a valid login, then add the database diagram support
> objects.
> Now I did both of these suggestions and then looked at the owner of the
> database, who in fact is a valid Login with sysadmin privileges.
> I'm not sure where to go from here since everything seems to be done
> correctly.
> Any suggestions?
> --
> Michael Hockstein
|||Fantastic. Worked like a charm. Could you also give me a clue as to where to
find the Readme file? I looked in the SQL Server directory and subs but
couldn't locate it. This would be a good one to keep on file.
Michael Hockstein
"Gail Erickson [MS]" wrote:

> This is covered in section 4.8 in the Readme file that comes with the
> product .
> To install database diagram support in SQL Server Management Studio,
> databases must be in SQL Server 2005 database compatibility level. Database
> compatibility level can be reset after diagram support is installed. To
> create database diagrams, change the database compatibility level to 2005,
> install database diagram support, and then return the database to the
> desired database compatibility level. For more information, search for
> "sp_dbcmptlevel" in SQL Server Books Online.
> So, run the following statement and try the diagram again.
> EXEC sp_dbcmptlevel database_name, 90
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> "michael" <howlinghound@.nospam.nospam> wrote in message
> news:EB3D155A-EC71-4854-BAC6-7B14BE038586@.microsoft.com...
>
>
|||michael (howlinghound@.nospam.nospam) writes:
> Fantastic. Worked like a charm. Could you also give me a clue as to
> where to find the Readme file? I looked in the SQL Server directory and
> subs but couldn't locate it. This would be a good one to keep on file.
I happened to have the SQL 2005 server DVD in my player, and I found a
Readme in G:\SQL Server x86\Servers\ReadmeSQL2005.htm. There seem to be
one in every top-level setup directory.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
|||In addition to Erland's response, you can also find the readme here:
http://support.microsoft.com/default...b;en-us;910228
Also, the April update to Books Online will contain this information in the
various topics on database diagrams.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"michael" <howlinghound@.nospam.nospam> wrote in message
news:4885DE6E-B80F-4367-9B2E-D772F090CD7B@.microsoft.com...[vbcol=seagreen]
> Fantastic. Worked like a charm. Could you also give me a clue as to where
> to
> find the Readme file? I looked in the SQL Server directory and subs but
> couldn't locate it. This would be a good one to keep on file.
>
> --
> Michael Hockstein
>
> "Gail Erickson [MS]" wrote:
|||OK! Thanks for the tip.
Michael Hockstein
"Erland Sommarskog" wrote:

> michael (howlinghound@.nospam.nospam) writes:
> I happened to have the SQL 2005 server DVD in my player, and I found a
> Readme in G:\SQL Server x86\Servers\ReadmeSQL2005.htm. There seem to be
> one in every top-level setup directory.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx
>
|||Thanks Gail!
Michael Hockstein
"Gail Erickson [MS]" wrote:

> In addition to Erland's response, you can also find the readme here:
> http://support.microsoft.com/default...b;en-us;910228
> Also, the April update to Books Online will contain this information in the
> various topics on database diagrams.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> "michael" <howlinghound@.nospam.nospam> wrote in message
> news:4885DE6E-B80F-4367-9B2E-D772F090CD7B@.microsoft.com...
>
>

No comments:

Post a Comment