Database does not have a valid owner
-
I am new to SQL Server, but not to Programming or Databases, and am stuck, though I have an inkling what is wrong and I don't know how to correct it !!! I'll describe things in detail below ... I am running this software on a stand-alone PC with myself as the only user. When I try to add a diagram to my Database I get a message telling me that "This database does not have a valid dbo user, or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming ?" If I then reply "Yes" it says "This server does not have one or more of the database objects required to use database diagramming. Do you wish to create them ?" Again, I reply "Yes" and this is where I get the error, "Could not obtain information about Windows NT group/user 'Gary-PC\Gary', error code 0x534." If I then try to do similar in MS SQL Server Management Studio I get a different message - "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." Now, I think this is something to do with my PC being renamed, because it is called, and has been for ages, MeDesktop, but at one point I seem to recall it was called Gary-PC, so it could be that something just needs a pointer changed, but I don't know where or how to do that !!! In MS SQL Server Management Studio, Object Explorer, the Connection Name is "MEDESKTOP (MEDESKTOP\Gary)", Display Name is "MEDESKTOP", Login Name is "MEDESKTOP\Gary" & Server Name is MEDESKTOP. I have 4 System Databases, "master", "model", "msdb" & "tempdb", all of which have a Status of "Normal" and an Owner of "sa" ... I seem to remember something about "sa" from when I first installed this stuff, but it was a long time ago !!! I then have my own new (and very small) database, called "myKADB" and this is where I have the problem. I can add and amend Tables & Columns, and I can access the database via my C# program, so most things appear to be working just fine, bar these error messages above. Now, if I look at the Properties of myKADB, I see that again the Status is "Normal", but the Owner is "Gary-PC\Gary", so I think this needs to be changed ... though I could of course be wrong !!! In the Files option of Prop
-
I am new to SQL Server, but not to Programming or Databases, and am stuck, though I have an inkling what is wrong and I don't know how to correct it !!! I'll describe things in detail below ... I am running this software on a stand-alone PC with myself as the only user. When I try to add a diagram to my Database I get a message telling me that "This database does not have a valid dbo user, or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming ?" If I then reply "Yes" it says "This server does not have one or more of the database objects required to use database diagramming. Do you wish to create them ?" Again, I reply "Yes" and this is where I get the error, "Could not obtain information about Windows NT group/user 'Gary-PC\Gary', error code 0x534." If I then try to do similar in MS SQL Server Management Studio I get a different message - "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." Now, I think this is something to do with my PC being renamed, because it is called, and has been for ages, MeDesktop, but at one point I seem to recall it was called Gary-PC, so it could be that something just needs a pointer changed, but I don't know where or how to do that !!! In MS SQL Server Management Studio, Object Explorer, the Connection Name is "MEDESKTOP (MEDESKTOP\Gary)", Display Name is "MEDESKTOP", Login Name is "MEDESKTOP\Gary" & Server Name is MEDESKTOP. I have 4 System Databases, "master", "model", "msdb" & "tempdb", all of which have a Status of "Normal" and an Owner of "sa" ... I seem to remember something about "sa" from when I first installed this stuff, but it was a long time ago !!! I then have my own new (and very small) database, called "myKADB" and this is where I have the problem. I can add and amend Tables & Columns, and I can access the database via my C# program, so most things appear to be working just fine, bar these error messages above. Now, if I look at the Properties of myKADB, I see that again the Status is "Normal", but the Owner is "Gary-PC\Gary", so I think this needs to be changed ... though I could of course be wrong !!! In the Files option of Prop
Gary Heath wrote:
what do I need to do
Your answer might be found here, http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/f7f7f166-c035-41b2-88c3-b49fe67d480d/[^]
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns
-
Gary Heath wrote:
what do I need to do
Your answer might be found here, http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/f7f7f166-c035-41b2-88c3-b49fe67d480d/[^]
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns
Thanks, but I've uninstalled and re-installed SQL Server now and it's all working fine.