locked
Login failed for user 'abc'. Reason: Failed to open the explicitly specified database RRS feed

  • Question

  • Date  5/27/2011 10:59:55 AM
    Log  SQL Server (Current - 5/27/2011 10:59:00 AM)

    Source  Logon

    Message
    Login failed for user 'abc'. Reason: Failed to open the explicitly specified database. [CLIENT: 10.12.226.1]

    Friday, May 27, 2011 6:14 PM

Answers

  • When you connect to SQL Server you have the option to specify the name of the database that you want to be connected to. This is optional. If you don't provide a database, you will be connected to the master database. Then you will have to change databases to get to the db that you want. You have probably asked for a database that you do not have permission to access, or which does not exist on the server, or which is somehow stuck, such as in a recovering state. Try connecting to the SQL Server without specifying the database, and then look around.
    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty
    • Proposed as answer by Mr. Wharty Monday, May 30, 2011 3:11 AM
    • Marked as answer by Peja Tao Friday, June 3, 2011 12:56 AM
    Friday, May 27, 2011 7:41 PM
  • Hi Ronsql,

    Adding to Rick's comments , this error simple means that the initial catalog database mentioned in your connection string doesn't exist in the SQL server or the account accessing doesn't have permissions to do so. Check the account's permissions in database and retry accessing it from the application


    Thanks, Leks
    • Proposed as answer by Mr. Wharty Monday, May 30, 2011 3:11 AM
    • Marked as answer by Peja Tao Friday, June 3, 2011 12:56 AM
    Saturday, May 28, 2011 7:25 AM

All replies

  • When you connect to SQL Server you have the option to specify the name of the database that you want to be connected to. This is optional. If you don't provide a database, you will be connected to the master database. Then you will have to change databases to get to the db that you want. You have probably asked for a database that you do not have permission to access, or which does not exist on the server, or which is somehow stuck, such as in a recovering state. Try connecting to the SQL Server without specifying the database, and then look around.
    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty
    • Proposed as answer by Mr. Wharty Monday, May 30, 2011 3:11 AM
    • Marked as answer by Peja Tao Friday, June 3, 2011 12:56 AM
    Friday, May 27, 2011 7:41 PM
  • Hi Ronsql,

    Adding to Rick's comments , this error simple means that the initial catalog database mentioned in your connection string doesn't exist in the SQL server or the account accessing doesn't have permissions to do so. Check the account's permissions in database and retry accessing it from the application


    Thanks, Leks
    • Proposed as answer by Mr. Wharty Monday, May 30, 2011 3:11 AM
    • Marked as answer by Peja Tao Friday, June 3, 2011 12:56 AM
    Saturday, May 28, 2011 7:25 AM