Wednesday, March 7, 2012

Login succeeded followed by Logon Failed

We are experiencing some strange behaviour on SQL Server 2000. Certain
members of a domain group are unable to login. The error log says something
like
2007-04-27 08:45:14.33 logon Login succeeded for user 'Accounts\joe'.
Connection: Trusted.
2007-04-27 08:45:14.33 logon Login failed for user 'Accounts\joe'.
This is only affecting certain members of the group. (The SQL Server Error
msg says the user can not access their default database).Any suggestions as
to why this might be happening.stu,
If you are granting access to the server through domain groups rather that
to individual user accounts, then Accounts\Joe may be in several groups.
If he is in a group that has been assigned a default database to which he
does not have rights, then he _may_ fail to attach to his default database.
(Why won't everyone fail? Because they are not all members of the same
group and (as far as I have been able to discover) which group will provide
the default database for the user login is not deterministic.)
Actions:
1) Check to see if any Group Logins have a default database assignment to a
database in which they have no rights. If so, correct this.
2) Explicitly set the default database for the logins that are failing.
Even though all rights will still be granted through their group
memberships, the login account default database will have priority over any
group settings.
sp_defaultdb 'Accounts\Joe', 'GoodDefaultDB'
You do not have to create an Accounts\Joe login, but the sp_defaultdb will
create one for you in this case.
RLF
"stu" <stu@.discussions.microsoft.com> wrote in message
news:F8CDE8B3-B206-473A-94C5-F6A408B61064@.microsoft.com...
> We are experiencing some strange behaviour on SQL Server 2000. Certain
> members of a domain group are unable to login. The error log says
> something
> like
> 2007-04-27 08:45:14.33 logon Login succeeded for user 'Accounts\joe'.
> Connection: Trusted.
> 2007-04-27 08:45:14.33 logon Login failed for user 'Accounts\joe'.
> This is only affecting certain members of the group. (The SQL Server Error
> msg says the user can not access their default database).Any suggestions
> as
> to why this might be happening.

No comments:

Post a Comment