January 30, 2019 at 10:04 am
Hi,
I am keep getting following error in my sql serror log:
Login failed to user "DbUSer" Reason: Failed to open the explicitly open the specified Database 'MyDB' [Client: <Local Machine>]
I tried to troubleshoot as it's a Error: 18456 and State:38.
I found that one of my database is is not exists that which user is trying to connect it means database was dropped earlier when that user was associated, but this user is associated with other database also when i see from the mapping DB in security.
Database is not exists so it's not showing under mapping but somewhere is's trying connect.
How can i find that this user from where trying login as it says Local MAchine?
Thanks
January 31, 2019 at 9:00 am
If any one has any input, really appreciated.
One of account looks like is a service account but that one also associated with other databases so i can't remove or disable it.
January 31, 2019 at 9:49 am
poratips - Thursday, January 31, 2019 9:00 AMIf any one has any input, really appreciated.
One of account looks like is a service account but that one also associated with other databases so i can't remove or disable it.
If it's a service account and it's logging on locally then check the services for anything running under that account.
You can also change the default database for the login if you want to eliminate the errors but keep the account.
Sue
January 31, 2019 at 1:12 pm
Sue_H - Thursday, January 31, 2019 9:49 AMporatips - Thursday, January 31, 2019 9:00 AMIf any one has any input, really appreciated.
One of account looks like is a service account but that one also associated with other databases so i can't remove or disable it.If it's a service account and it's logging on locally then check the services for anything running under that account.
You can also change the default database for the login if you want to eliminate the errors but keep the account.Sue
Thanks Sue.
Actually this account associated with other databases when i see under user mappings and default database is MASTER. i am not finding somehow root application/program or from where is trying to connect as error log says [CLIENT: LOCAL MACHINE] State:38 and Error: 18456.
I have two user keep throwing similar errors and one of the database is OFFLINE and another database is not exists.
January 31, 2019 at 1:29 pm
poratips - Thursday, January 31, 2019 1:12 PMSue_H - Thursday, January 31, 2019 9:49 AMporatips - Thursday, January 31, 2019 9:00 AMIf any one has any input, really appreciated.
One of account looks like is a service account but that one also associated with other databases so i can't remove or disable it.If it's a service account and it's logging on locally then check the services for anything running under that account.
You can also change the default database for the login if you want to eliminate the errors but keep the account.Sue
Thanks Sue.
Actually this account associated with other databases when i see under user mappings and default database is MASTER. i am not finding somehow root application/program or from where is trying to connect as error log says [CLIENT: LOCAL MACHINE] State:38 and Error: 18456.
I have two user keep throwing similar errors and one of the database is OFFLINE and another database is not exists.
Have you tried an extended events session or trace to see more of what is going on when the accounts try to log in? I'd probably try something like that to narrow it down.
Other than checking services on the local machine, other things I can think of would be did you try checking jobs and job owners? Or any other applications that run from that server? Any batch jobs or packages on that server?
Sue
January 31, 2019 at 5:49 pm
Sue_H - Thursday, January 31, 2019 1:29 PMporatips - Thursday, January 31, 2019 1:12 PMSue_H - Thursday, January 31, 2019 9:49 AMporatips - Thursday, January 31, 2019 9:00 AMIf any one has any input, really appreciated.
One of account looks like is a service account but that one also associated with other databases so i can't remove or disable it.If it's a service account and it's logging on locally then check the services for anything running under that account.
You can also change the default database for the login if you want to eliminate the errors but keep the account.Sue
Thanks Sue.
Actually this account associated with other databases when i see under user mappings and default database is MASTER. i am not finding somehow root application/program or from where is trying to connect as error log says [CLIENT: LOCAL MACHINE] State:38 and Error: 18456.
I have two user keep throwing similar errors and one of the database is OFFLINE and another database is not exists.Have you tried an extended events session or trace to see more of what is going on when the accounts try to log in? I'd probably try something like that to narrow it down.
Other than checking services on the local machine, other things I can think of would be did you try checking jobs and job owners? Or any other applications that run from that server? Any batch jobs or packages on that server?Sue
I tried to check the jobs, linked server but couldn't find that user login with this DB although this account used by other DB too.
I also tried to see SSIS packages into sql job but didn't have that user and DB in connection string.
February 3, 2019 at 3:32 pm
Any other tips?
February 3, 2019 at 5:22 pm
poratips - Sunday, February 3, 2019 3:32 PMAny other tips?
Do the errors in the log contain a TCPIP address?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 18, 2019 at 3:30 pm
Jeff Moden - Sunday, February 3, 2019 5:22 PMporatips - Sunday, February 3, 2019 3:32 PMAny other tips?Do the errors in the log contain a TCPIP address?
I couldn't see any TCPIP address.
I think i will be trying to look into EventLog and from that will cross check the PID/SPID through PRocess and which application using to get the root.
February 19, 2019 at 1:09 am
This may help you out. The blog covers the causes of getting this error and the resolution around them.
https://www.systoolsgroup.com/updates/fix-microsoft-sql-server-error-18456-login-failed-for-user/
February 19, 2019 at 9:41 pm
Thank you!
February 23, 2019 at 4:26 pm
Thank you everyone for your help and response.
I was able to trace using EventLog and through TAsk Manager and it helps me out.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply