locked
Login failed for user 'AQBID\psdbiduser'. Reason: Failed to open the explicitly specified database. [CLIENT: 10.1.15x.xx] RRS feed

  • Question

  • I am getting the error below in the SQL Server Error logs

    Login failed for user 'AQBID\psdbiduser'. Reason: Failed to open the explicitly specified database. [CLIENT: 10.1.15x.xx]

    I am getting the error for multiple logins. The error does not specify which database failed to open. I need to findout which specific database is cannot be openned. I have about 190 databases on the server, including over 150 sharepoint databases.

    Is there any script i can run against the Dynamic Management Views(DMVs) to reveal what the specific databases the logins failed to open? Or any other method i can use to findout the specific databases. Thanks.


    • Edited by SQLScript Wednesday, July 11, 2012 1:21 PM
    Wednesday, July 11, 2012 1:09 PM

Answers

  • Please share the login failure messages coming in SQL server error log.

    Two possible reasons :-

    • USer is not having rights on mention database
    • Database you are trying to access it not online

    Please click the Mark as Answer or Vote As Helpful if a post solves your problem or is helpful!

    Wednesday, July 11, 2012 2:43 PM
  • It could be a database that is offline or in single_user, this you can investigate in sys.databases. But it could also be a spelling error or somesuch in the connection string, and in this the database is not is sys.databases.

    There is an IP address in the error message. That looks like it could be a lead.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Wednesday, July 11, 2012 5:46 PM

All replies

  • Please share the login failure messages coming in SQL server error log.

    Two possible reasons :-

    • USer is not having rights on mention database
    • Database you are trying to access it not online

    Please click the Mark as Answer or Vote As Helpful if a post solves your problem or is helpful!

    Wednesday, July 11, 2012 2:43 PM
  • It could be a database that is offline or in single_user, this you can investigate in sys.databases. But it could also be a spelling error or somesuch in the connection string, and in this the database is not is sys.databases.

    There is an IP address in the error message. That looks like it could be a lead.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Wednesday, July 11, 2012 5:46 PM
  • Login failed for user 'AQBID\psdbiduser'. Reason: Failed to open the explicitly specified database. [CLIENT: 10.1.15x.xx]

    >>How that user is connecting i,e directly to SSMS on the database server or he is using the connection string with the different database as an default for the login where he donot have the accesses on that particular database,I guess that also part of analyzing purpose will be useful...

    the other cases will be like ->as name indicates explicitly specified database ->May be database is offline/suspect or dropped...

    other useful for the similar issue you can refer the below one-

    http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/792afadc-5e82-41e9-921e-85880fdcbd96


    Rama Udaya.K ramaudaya.blogspot.com ---------------------------------------- Please remember to mark the replies as answers if they help and un-mark them if they provide no help.


    • Edited by Rama Udaya Wednesday, July 11, 2012 8:44 PM
    Wednesday, July 11, 2012 8:43 PM
  • Hi SQLScript,

    You can try to trace requested database name with SQL Server Profiler (Please click here to know how to start SQL Server Profiler), and select “User Error Message” under “Errors and Warnings”.

    If your trace is active and the login error occurs, you will see a message like: Can’t open database “XYZ” requested by the login. The login failed.

    Besides, this issue may be fixed in the SQL Server 2012, for more details, please refer to here.


    Best Regards, Ray Chen

    Thursday, July 12, 2012 7:58 AM
  • Right click on this login, and chenge the default database to master or change to which database this user has access and then click OK.


    Nareshkar Pakanati 

    MCTS, MCITP IT Specialist
    My Blog: www.mssqlfix.com
    Twitter: @mssqlfix
    -------------------------------------------------------
    Please mark the post as Answered if it answers your question.
    -------------------------------------------------------

    Friday, July 13, 2012 5:14 AM