Showing posts with label diagrams. Show all posts
Showing posts with label diagrams. Show all posts

Tuesday, March 27, 2012

Cant get diagrams to work in SQL Management Studio

I can't get diagrams to work in SQL Management Studio. When I try to open that folder in the object browser, I get:
"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."
That's great, but what exactly constitutes a "valid login" and who or what is it supposed to be?
If you follow the first set of steps, click the button with theellipsis next to the owner textbox, and you'll get a list of validlogins that you can choose an owner from. Then save it, andyou should be ready to go.
|||But other than myself (the one it's already set to), there are no otheraccounts other than system accounts. How is me being an owner not goodenough?
|||Huh. Well, if you go to the Security node for your SQL Serverinstance, and look at the Logins, is your account in there? If itis, and you're still getting the error, you might try changing the DBowner to another account, save it, and then change it back toyourself.
|||Tried all of the above. No joy. I am the owner, or so it says.
This is seriously annoying, and in true MS documentation fashion, the docs are not helpful.
|||Was this database by any chance restored from another machine? Maybe a machine on another domain? Or have there been changes tothe domain since the database was created? That's the last thingthat I can think of...That even though the account *looks* to be thesame on the surface, that underneath, it's got a different SID than theaccount that's been granted access to the SQL Server instance. Ifthat's the case, then the remedy would be to delete your accountentirely from list of the database's users, and then re-add it. If that's not the solution, hopefully someone else will have a tip,'cause I'm out of ideas.
|||The database was upgraded from the old 2000 Dev Edition to the 2005 DevEdition. I ended up scripting the database, nuking it, and recreatingit since there was nothing critical about the actual data. All is wellnow. It was still annoying. :)
|||

Solution, you need to go:

Properties of your database
Options
Compatibility level and here select SQL Server 2005
Click OK
Go to Database Diagrams and it will ask you if you want to create it , put yes and you will get your diagrams.
Hope it helps.
Sorry for my english im from Argentine.

|||I think it had to do with the compatibility level. I had the same with a restored 2000 database on 2005. Couldn't access the diagrams. But after setting the compatibility level (properties of database then the options page) to SQL Server 2005 (90), I was able to access them. (some didn't work though)
gr Rc

Wednesday, March 7, 2012

can't create db diagram - 2

i assume that i've got some kind of restrictions here. I can't create diagrams, i don't even have a place to start from. When i right click on "Database diagrams" i get only "working with SQL 2000 diagrams" and "Refresh". No "New".

So my real question is - probably nobody can fix that, i just have to have an idea why it's happening. What kind of restrictions it can be. This way I can be reasonably tough with our admin :)

p.s. oh yeah, i have a SQL 2005 server management studio open.

Are you hitting a SQL Server 2000 server from 2K5 tools or the other way around? They are a bit different.

If you are using 2K5, make sure the database is set to the 9.0 compatibility level. It might be set to 8.0 if you brought it over from SQL Server 2K.

There's more here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vdbref/html/dvhowcreatingdatabasediagram.asp

|||

Buck Woody - MSFT wrote:

Are you hitting a SQL Server 2000 server from 2K5 tools or the other way around? They are a bit different.

If you are using 2K5, make sure the database is set to the 9.0 compatibility level. It might be set to 8.0 if you brought it over from SQL Server 2K.

There's more here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vdbref/html/dvhowcreatingdatabasediagram.asp


other way around MS Server 2000 (data) from MS Server Management Studio

and yes, it sits on 80 - Thanks! I'll do changing right now.

Can't create database diagrams

Hello, I'm using C# express with SQL express.

I can create a database, create tables and I can even delete the database but I cannot create database digrams. I get an error that says I don't have a valid dbo user or permissions to impersonate. It asks me if I would like to impersonate but it just fails. Any Ideas? Thanks

In this case the first course is to consider that the error might be telling you exactly what the problem is. Does the account you're logging into the server with have dbo rights?

Another idea may be that your database doesn't have a valid owner, check out the post at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=120849&SiteID=1 for a discussion about this issue.

Regards,

Mike Wachal
SQL Express team

-
Please mark your thread as Answered when you get your solution.