Friday, February 24, 2012

dbo user / permissions error.

I had found one or two other questions about this, but neither of them seemed to be the same as my instance, and there solutions were not valid for me.

I purchased the Build a Program Now MS Visual C# 2005 Express Edition book with CD.

This was installed by the auto installer on the disk. which included the SQL Express 2005 version.

I have used the Visual Express C# interface, build a small program, created the database, created tables. all went well. I can even add data, and so forth.

My problem came when I went to click on database Diagrams in the Database Explorer.

I get a Dialog box stating

" 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 the database diagramming?"

two options are Yes and No.

If I choose yes, I get the following dialog box stating,

" This databse does not have a valid dbo user or you do not have permissions to impresonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have imprersonate permission on the dbo account."

One button, OK.

I have searched every where I can think of to try to figure out how to set / alter the dbo user info / permissions.

Can someone guide me on this?

Thanks in advance.

Tom

hi Tom,

try explicitely change the ownerwhip of the database to a valid principal..

start SQL Server Management Studio Express (http://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en), select the database you are interested in, access it's properties and set the ownership to "sa" or another valid Login..

or, execute the statements

USE yorDatabase; GO EXEC sp_changedbowner @.loginame = 'sa', @.map= 'true';

http://msdn2.microsoft.com/en-us/library/ms178630.aspx

regards

|||

Andrea,

Thank you very much for the time and for sharing your knowledge.

I am trying to do as you stated above, however, when i start SMSE, I do not see the Database that i am actually using.

It shows the sql server itself, but does not show anything other than system items in it.

The program i am building is using a CDS.mdf, and I can not locate that anywhere in SMSE.

i am still going over it all, and doing some reading from the first link above that you sent.

If you have any other ideals, please send them my way.

Regards

Tom

|||

Think maybe I have done something wrong when i installed SQL Express or v c# Express?

I have went over every thing i can find over and over,, to no resolve.

Flustered

Tom

|||

Anyone else have any ideals?

Totally lost and stuck

Tom

|||

Hi Tom,

Check out my answer at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=690061&SiteID=1, it will explain why you can't see your database.

Mike

|||

Good Day Mike,

Just wanted to say thanks for the input and info. I am still working to resolve this issue, just been slow as I had some health issues.

Thanks again, and I'll let ya know later today if I can get a resolution using this info.

Regards

Tom

|||

Hey Mike.

I just wanted to let you know that I tried doing what was instructed in the other post.

It has not resolved my issue, I still cant use the manager to locate/attatch the dbase to work with its properties.

However its not a major issue, I am using a back door in Visual to make my relations and FK settings, even if I cant go through the one step because of the permissions error, there working all the same.

Regards

Tom

|||Here is my solution to this problem. I had this same issue. After searching this forum I had the cues I needed to correct the issue but none of the suggested methods worked. I think the problem stemed from the fact that I had renamed the primary windows user account to my name (the original Owner account left from the OS install). In the folder structure some of the folders were still titled "Owner" but further down the tree the new name was used. So this account was previously "Owner" but had been changed to my name. The solution was the create a new Windows account, all of the folders had the new name associated with them. Then I recreated the database and the problem accessing the database diagram didn't reoccur. I hope this helps. Fyi: I am using Visual Basic 2005 Express but I think it is the same issue.|||

There are two options to resolve the dbo owner issue, one is to set a new owner as described in one of the above posts (and in some situations doe not work) and the other is to change the compatability level of your database to "SQL Server 2005 (90)".

In order to do so you should right-click the database in the Management Studio; and then select:

Properties --> Options --> Change "Compatibility level" to "SQL Server 2005 (90)"

Good luck

- Gal Cohen

No comments:

Post a Comment