Problem mapping login to database

Last Post 05 Dec 2007 03:57 AM by gilou28. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
gilou28
New Member
New Member

--
04 Dec 2007 10:48 AM
I must be missing something here, but been doing this for a while and it's only since yesterday that I encounter the following problem.

Using the management studio, I map a user to a database in the login property, user mapping window. when I come back, its not mapped, but I can see that the role is there (grayed, since the user is not mapped to that DB).

I've tried the exec sp_change_users_login 'Report' and exec sp_change_users_login 'Auto_Fix', 'username' to fix the problem with no luck.

The only way of fixing this is to drop the login and the corresponding DB users and schemas (they do not own anything, lucky me) and then recreate them.

Any ideas ?

Thanks.
gilou28
New Member
New Member

--
05 Dec 2007 03:57 AM
Hy Pete

It's a Windows Login, security is set to Windows auth.

When you map a login to a database, you first check the chekbox in the to section of the user mapping screen (you select the DB). Then in the bottom part, you assign a db role (db_owner in this case).

By default the user is mapped to the login, you click on Ok and it's "normally" done. Then problem is when I go back, the login is not mapped to the DB (the checkbox is not selected), but I can see that db_owner is still checked in the db role section. Since the DB is not checked in the top part, the bottom part is grayed (disabled), but I still can see that db_owner is checked.

If I re-check the checkbox for that DB (top section) and then click on ok (the db_owner is already selected), it does not change a thing. If I try to script that last action, I'm being notified that there is nothing to script.

This happends on different DBs and different users. My only work around is complete destruction of the logins/users/schemas.

The accounts gets created on the DB.



Acceptable Use Policy
---