Thursday, March 22, 2012

Can't set the owner to the current login

I'm using express edition, compatibility set to 2005.

I'm logged in as DOMAIN\user, using windows authentication.

When I try to set the owner to this login, I get a "login does not exist on the server" error. Setting the owner to sa works fine.

Any fix to this problem ? Also - can I just work with the owner set to sa or can this cause problems in the future ?

Thanks.

If you could supply a little code that reproduces the error we could probably get an answer for you. What objects are you trying to own?

Yes, you can set the owner to sa, but then you have to work with the object as that login. It would be better to have that object owned by someone with only the rights that they absolutely need.

|||

The property that I'm trying to set is the database owner - in the database properties' files page. I need to do this in order to use diagrams, which are not available without a valid owner.

|||I see. Express doesn't allow diagrams.|||

Buck,

Thank you for trying to help.

The diagrams work fine - but the thing is that I have to set the owner to sa in order to work with them. The problem is that although I am logged in as DOMAIN\user, the server claims there is no such login when I try to set the database owner to that login.

|||

u may be login as Domain/User but in the database the user mapped to this login may be different .. check that...

SP_helpLogins 'Domian/Username' -- to get all the users mapped to this login

Madhu

|||

You know what - you're right! I was working on the older Express versions.

http://blogs.msdn.com/vsdata/archive/2004/09/30/236215.aspx

They have indeed put the diagrams back into Express.

Anyway, you seem to have a different issue, then. Have you tried putting the domain\user in the sysadmins group in SQL Server? I don't suggest leaving them there, but that might help you narrow the problem down. You only need to be in the db_owner role, but you can go high and bring the user account to that role later.

What message are you getting in the logs about this?

|||

I'm sorry, but I'm a newbie to sqlserver.

I guess I need to do some more reading before I can try to do these things (like putting the domain\user in the sysadmins group or using SP_helpLogins). I'm using Mannagement Studio Express and I can't find the correct way to do it.

sql

No comments:

Post a Comment