Login failed for user 'abc\mssqlsrv'. Reason: Failed to open the explicitly specified database

  • Hi,

    We have sql server 2008 x64 instance with SP1. When ever SQL Serve instance got restarted, I'm seeing the below error in log:

    Error: 18456, Severity: 14, State: 38.

    2011-07-04 17:38:57.95 Logon Login failed for user 'abc\mssqlsrv'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]

    Could you please advice

    Thanks

  • What did you do before you restarted the Server?

    Check the default database for the User.

    Is it offline or in suspect mode, etc?

    Did you restore the database and have orphan users.

    If you change the default database can the user log on?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • What did you do before you restarted the Server?

    Nothing Just a restart of the sql service

    Check the default database for the User.

    Master database

    Is it offline or in suspect mode, etc?

    No

    Did you restore the database and have orphan users.

    No

    If you change the default database can the user log on?

    It's a service account. The default database is Master and I did not try changing it

    Thanks

  • Why did you restart the service?

    It is an account for what service?

    Is this user account the only that you are having problems with?

    What else is in the log? Did the master database start before the login attempt?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • There's a good change this is some proces that is using the 'abc\mssqlsrv' account to connect to a database that has not yet been brought on line.

    One hint is the fact that it says "the explicitly specified database". This implies the connection sting requests an initial catalog and isn't relying on the default. Since it's comming from the local machine you need to check what all on the server is running uner this account. If it's a service you may need toput in some sort of control to prevent it from starting so quickly, or just ignore the error if it isn't fatle for the app.

    On Windows 2003 servers it's a real pain getting services to start after a delay. You typlically have to put them in manual mode, then use a scheduled task to start them, and have a special batch process to delay the start. This is a lot easier in Windows 2008, you still need to use a scheduled task, but the scheduler has a delay option.

    Cheers

    Leo

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

  • Did you find out what was causing the problem?

  • My organization has just started to transition to 2008 R2 and I have seen this error on a couple of our legacy databases.

    I have tried the following to no avail:

    Change default database to the user database.

    Given the account explicit connect rights to Master

    Synch'd the user with the sp_change_users_login.

    So, for now those databases are going to stay on the legacy 2005 instance until we can resolve the issue. MS and googling for 18456 state 38 does not provide much in the way of useful information.

  • stephen.lappe (7/28/2011)


    My organization has just started to transition to 2008 R2 and I have seen this error on a couple of our legacy databases.

    I have tried the following to no avail:

    Change default database to the user database.

    Given the account explicit connect rights to Master

    Synch'd the user with the sp_change_users_login.

    So, for now those databases are going to stay on the legacy 2005 instance until we can resolve the issue. MS and googling for 18456 state 38 does not provide much in the way of useful information.

    Have you tried connecting to the SQL Server using that domain account?

  • account connects just fine through SSMS(domain account), but when credentials (domain account) are presented through an application connection string we get the state 38 error

  • Ignacio A. Salom Rangel (7/28/2011)


    stephen.lappe (7/28/2011)


    My organization has just started to transition to 2008 R2 and I have seen this error on a couple of our legacy databases.

    I have tried the following to no avail:

    Change default database to the user database.

    Given the account explicit connect rights to Master

    Synch'd the user with the sp_change_users_login.

    So, for now those databases are going to stay on the legacy 2005 instance until we can resolve the issue. MS and googling for 18456 state 38 does not provide much in the way of useful information.

    Have you tried connecting to the SQL Server using that domain account?

    Have you checked the order of events in the event log? Did you try confirm that some of the databases are still not available when this error occures? This is what it looks like, and if the connection string is using an initial-cataloge, then none of the changes you have tried above will help because you would need to chane the applications connection request.

    I've seen this a number of times, if you can identify the application and if it comes on line once the database is available, then the error is normaly nothing more than an iritation. There are a lot of apps out there that should be stopped when their underlying SQL server is stopped. If you don't they sit trying to connect until the server comes back.

    Cheers

    Leo

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

  • Negative. Databases are up. Application connection strings coded properly. When the app tries to connect we get a 18456 state 38 error. Application has no problem connecting to the orginal 2005 instance. We have no problem logging into the databserver using the application service account through SSMS on the new 2008 instance. Other applications that are coded with the same .NET framework and connect to the DB without a problem.

  • stephen.lappe (8/1/2011)


    Negative. Databases are up. Application connection strings coded properly. When the app tries to connect we get a 18456 state 38 error. Application has no problem connecting to the orginal 2005 instance. We have no problem logging into the databserver using the application service account through SSMS on the new 2008 instance. Other applications that are coded with the same .NET framework and connect to the DB without a problem.

    Maybe it is time to get your system administrators (AD administrators & network administrators) involved!

  • We have SQL 2008 R2 (x64) on MS Server 2008 R2 with all the SP including SP2 for SQL Server 10.50.4000.

    This is a new server and we started using it yesterday.

    The service account starting the services giving "Error: 18456, Severity: 14, State: 38" numerous times during last day.

    Service account is sysadmin, Local admin and have all the rights it needs, still error.

    Tried restart service, restart server still reporting error in the log.

    Microsoft said this would be solved by SP1 for SQL server but parently not.

    Any one out there who can come up with a solution for this.

    I have an exactly the same configuration on another SQL Server only using SP1 so far. There I do not have this problem.

    So what is causing this.

  • webtomte (9/6/2012)


    We have SQL 2008 R2 (x64) on MS Server 2008 R2 with all the SP including SP2 for SQL Server 10.50.4000.

    This is a new server and we started using it yesterday.

    The service account starting the services giving "Error: 18456, Severity: 14, State: 38" numerous times during last day.

    Service account is sysadmin, Local admin and have all the rights it needs, still error.

    Tried restart service, restart server still reporting error in the log.

    Microsoft said this would be solved by SP1 for SQL server but parently not.

    Any one out there who can come up with a solution for this.

    I have an exactly the same configuration on another SQL Server only using SP1 so far. There I do not have this problem.

    So what is causing this.

    Which service are you starting with the service account?

  • All services used in SQL is using the same service account

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic. Login to reply