Sql-server – Error: 18456, Severity: 14, State: 46

loginsSecuritysql serversql server 2014

I am facing the below error :

  • Login failed for user 'NT AUTHORITY\SYSTEM' :

  • Reason: Failed to open the explicitly specified database.

  • Reason: Failed to open the database configured in the login object while revalidating the login on the connection.

Few points here :

  1. Login NT AUTHORITY\SYSTEM has SYSADMIN Role along with Public Role
  2. Default Database is Master for NT AUTHORITY\SYSTEM Login .
  3. Master DB is Online and AutoClose is False
  4. The Database which the login is trying to access is a temporary Database and is in Single user mode for last 15 days failing with above error.
  5. When I check SP_HELPDB it doesnot show the Database where as SYS.Database shows the database in name column ?
  6. When I tried to set MULTI_USER it says DB is already open and can have only one user at a time and database is in single user mode .

I have checked Aaron Bertrands post on login issues and found below :

enter image description here

Please help me what else I am missing ?

Do I need to change the default database to the database which the login is trying to access ?

Please advice .

Best Answer

Reason: Failed to open the explicitly specified database.

...

The Database which the login is trying to access is a temporary Database and is in Single user mode for last 15 days failing with above error.

The error clearly says that the database specified in the connection string cannot be accessed.

So you have these possibilities:

  • change the connection string with master database
  • make your database accessible, put it in multi_user