Failed to open the explicitly specified database ошибка

title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic helpviewer_keywords

MSSQLSERVER_18456

A connection attempt is rejected due to a failure with a bad password or username in SQL Server. See an explanation of the error and possible resolutions.

MashaMSFT

mathoma

jopilov, randolphwest

01/16/2023

sql

supportability

reference

18456 (Database Engine error)

MSSQLSERVER_18456

[!INCLUDE SQL Server]

Details

Attribute Value
Product Name SQL Server
Event ID 18456
Event Source MSSQLSERVER
Component SQLEngine
Symbolic Name LOGON_FAILED
Message Text Login failed for user ‘%.*ls’.%.*ls

Explanation

You get this error message when a connection attempt is rejected because of an authentication failure. User logins can fail for many reasons, such as invalid credentials, password expiration, and enabling the wrong authentication mode. In many cases, error codes include descriptions.

User action

The following examples are some of the common login failures. Select the exact error that you’re experiencing to troubleshoot the issue:

  • Login failed for user ‘<username>’ or login failed for user ‘<domain><username>’

  • Login failed for user ‘NT AUTHORITYANONYMOUS’ LOGON

  • Login failed for user ’empty’

  • Login failed for user ‘(null)’

Login failed for user ‘<username>’ or login failed for user ‘<domain><username>’

If the domain name isn’t specified, the problem is a failing SQL Server login attempt. If the domain name is specified, the problem is a failing Windows user account login. For potential causes and suggested resolutions, see:

Potential cause Suggested resolution
You’re trying to use SQL Server Authentication, but the SQL server instance is configured for Windows Authentication mode. Verify that SQL Server is configured to use SQL Server and Windows Authentication mode. You can review and change the authentication mode for your SQL Server instance on the Security page under Properties for the corresponding instance in SQL Server Management Studio (SSMS). For more information, see Change server authentication mode. Alternatively, you can change your application to use Windows Authentication mode to connect to SQL Server.
Note: You can see a message like the following one in the SQL Server Error log for this scenario:
Login failed for user '<UserName>'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only.
Login doesn’t exist on the SQL Server instance you’re trying to connect to. Verify that the SQL Server login exists and that you’ve spelled it properly. If the login doesn’t exist, create it. If it’s present but misspelled, correct that in the application connection string. The SQL Server Errorlog will have one of the following messages:
Login failed for user 'username'. Reason: Could not find a login matching the name provided.
Login failed for user 'Domainusername'. Reason: Could not find a login matching the name provided.This can be a common issue if you deploy an application that uses a DEV or QA server into production and you fail to update the connection string. To resolve this issue, validate that you are connecting to the appropriate server. If not, correct the connection string. If it is, grant the login access to your SQL Server. Or if it’s a windows login grant access directly or add it to a local or domain group that is allowed to connect to the database server. For more information, see Create a Login.
You’re using SQL Server Authentication, but the password you specified for SQL Server login is incorrect. Check the SQL error log for messages like «Reason: Password did not match that for the login provided» to confirm the cause. To fix the issue, use the correct password in your application or use a different account if you can’t remember the password. Alternatively, work with your SQL Server administrator to reset the password for the account.
If the application is SQL Server Integration Services (SSIS), there may be multiple levels of a Configuration file for the job, which may override the Connection Manager settings for the package.
If the application was written by your company and the connection string is programmatically generated, engage the development team to resolve the issue. As a temporary workaround, hard-code the connection string and test. Use a UDL file or a script to prove a connection is possible with a hard-coded connection string.
Server name is incorrect. Ensure you’re connecting to the correct server.
You’re trying to connect using Windows authentication but are logged into an incorrect domain. Verify that you’re properly logged into the correct domain. The error message usually displays the domain name.
You aren’t running your application (for example, SSMS) as an administrator. If you’re trying to connect using your administrator credentials, start your application by using the Run as Administrator option. When connected, add your Windows user as an individual login.
Login is deleted after a migration to a contained database user. If the Database Engine supports contained databases, confirm that the login wasn’t deleted after migration to a contained database user. For more information, see Contained Database Authentication: Introduction.
Login’s default database is offline or otherwise not available. Check with your SQL Server administrator and resolve issues related to database availability. If the login has permissions to other databases on the server and you don’t need to access the currently configured default database in your application, use one of the following options:
— Request the administrator to change the default database for the login using ALTER LOGIN statement or SSMS.
— Explicitly specify a different database in your application connection string. Or if you’re using SSMS switch to the Connection Properties tab to specify a database that is currently available.Applications like SSMS may show an error message like the following one:
Cannot open user default database. Login failed.
Login failed for user <user name>. (Microsoft SQL Server, Error: 4064)
SQL Server Errorlog will have an error message like the following one:
Login failed for user '<user name>'. Reason: Failed to open the database '<dbname>' specified in the login properties [CLIENT: <ip address>]
For more information, see MSSQLSERVER_4064.
The database explicitly specified in the connection string or in SSMS is incorrectly spelled, offline, or otherwise not available. — Fix the database name in the connection string. Pay attention to case sensitivity if using a case sensitive collation on the server.
— If the database name is correct, check with your SQL Server administrator and resolve issues related to database availability. Check if the database is offline, not recovered, and so on.
— If the login has been mapped to users with permissions to other databases on the server and you don’t need to access the currently configured database in your application, then specify a different database in your connection string. Or if you’re connecting with SSMS, use the Connection Properties tab to specify a database that is currently available.
SQL Server Errorlog will have an error message like the following one:
Login failed for user <UserName>. Reason: Failed to open the explicitly specified database 'dbname'. [CLIENT: <ip address>]
Note: If the login’s default database is available, SQL Server allows the connection to succeed. For more information, see MSSQLSERVER_4064.
The user doesn’t have permissions to the requested database. — Try connecting as another user that has sysadmin rights to see if connectivity can be established.
— Grant the login access to the database by creating the corresponding user (for example, CREATE USER [<UserName>] FOR LOGIN [UserName])

Also, check the extensive list of error codes at Troubleshooting Error 18456.

For more troubleshooting help, see Troubleshooting SQL Client / Server Connectivity Issues.

Login failed for user NT AUTHORITYANONYMOUS LOGON

There are at least four scenarios for this issue. In the following table, examine each applicable potential cause, and use the appropriate resolution:
See the note below the table for an explanation of the term double hop.

Potential causes Suggested resolutions
You’re trying to pass NT LAN Manager (NTLM) credentials from one service to another service on the same computer (for example: from IIS to SQL server), but a failure occurs in the process. Add the DisableLoopbackCheck or BackConnectionHostNames registry entries.
There are double-hop (constraint delegation) scenarios across multiple computers. The error could occur if the Kerberos connection fails because of Service Principal Names (SPN) issues. Run SQLCheck on each SQL Server and the web server. Use the troubleshooting guides: 0600 Credential Delegation Issue and 0650 SQL Server Linked Server Delegation Issues.
If no double-hop (constraint delegation) is involved, then likely duplicate SPNs exist, and the client is running as a LocalSystem or another machine account that gets NTLM credentials instead of Kerberos credentials. Use SQLCheck or Setspn.exe to diagnose and fix any SPN-related issues. Also review Overview of the Kerberos Configuration Manager for SQL Server.
Windows Local Security policy may have been configured to prevent the use of the machine account for remote authentication requests. Navigate to Local Security Policy > Local Policies > Security Options > Network security: Allow Local System to use computer identity for NTLM, select the Enabled option if the setting is disabled, and then select OK.
Note: As detailed on the Explain tab, this policy is enabled in Windows 7 and later versions by default.
Intermittent occurrence of this issue when using constrained delegation can indicate presence of an expired ticket that can’t be renewed by middle tier. This is an expected behavior with either linked server scenario or any application that is holding a logon session for more than 10 hours. Change delegation settings on your middle-tier server from Trust this computer for delegation to specified services only – Use Kerberos Only to Trust this computer for delegation to specified services only — Use any protocol. For more information review Intermittent ANONYMOUS LOGON of SQL Server linked server double hop.

[!NOTE]
A double-hop typically involves delegation of user credentials across multiple remote computers. For example, assume you have a SQL Server instance named SQL1 where you created a linked server for a remote SQL Server named SQL2. In linked server security configuration, you selected the option Be made using the login’s current security context. When using this configuration, if you execute a linked server query on SQL1 from a remote client computer named Client1, the windows credentials will first have to hop from Client1 to SQL1 and then from SQL1 to SQL2 (hence, it’s called a double-hop). For more information, see Understanding Kerberos Double Hop and Kerberos Constrained Delegation Overview

Login failed for user (empty)

This error occurs when a user tries unsuccessfully to log in. This error might occur if your computer isn’t connected to the network. For example, you may receive an error message that resembles the following one:

Source: NETLOGON
Date: 8/12/2012 8:22:16 PM
Event ID: 5719
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: <computer name>
Description: This computer was not able to set up a secure session with a domain controller in domain due to the following: The remote procedure call was cancelled.
This may lead to authentication problems. Make sure that this computer is connected to the network. If the problem persists, please contact your domain administrator.

An empty string means that SQL Server tried to hand off the credentials to the Local Security Authority Subsystem Service (LSASS) but couldn’t because of some problem. Either LSASS wasn’t available, or the domain controller couldn’t be contacted.

Check the event logs on the client and the server for any network-related or Active Directory-related messages that were logged around the time of the failure. If you find any, work with your domain administrator to fix the issues.

Login failed for user ‘(null)’

An indication of «null» could mean that LSASS can’t decrypt the security token by using the SQL Server service account credentials. The main reason for this condition is that the SPN is associated with the wrong account.

To fix the issue, follow these steps:

  1. Use the SQLCheck or Setspn.exe to diagnose and fix SPN-related issues.

  2. Use SQLCheck to check whether the SQL Service account is trusted for delegation. If the output indicates that the account isn’t trusted for delegation, work with your Active Directory administrator to enable delegation for the account.

  3. Diagnose and fix Domain Name System (DNS) name resolution issues. For example:

    • Ping IP address by using PowerShell scripts:

      • ping -a <your_target_machine> (use -4 for IPv4 and -6 IPv6 specifically)
      • ping -a <your_remote_IPAddress>
    • Use NSLookup to enter your local and remote computer name and IP address multiple times.

  4. Look for any discrepancies and mismatches in the returned results. The accuracy of the DNS configuration on the network is important for a successful SQL Server connection. An incorrect DNS entry could cause numerous connectivity issues later.

  5. Make sure that firewalls or other network devices don’t block a client from connecting to the domain controller. SPNs are stored in Active Directory. If the clients can’t communicate with the directory, the connection can’t succeed.

Additional error information

To increase security, the error message that is returned to the client deliberately hides the nature of the authentication error. However, in the [!INCLUDEssNoVersion] error log, a corresponding error contains an error state that maps to an authentication failure condition. Compare the error state to the following list to determine the reason for the login failure.

State Description
1 Error information isn’t available. This state usually means you don’t have permission to receive the error details. Contact your [!INCLUDEssNoVersion] administrator for more information.
2 User ID isn’t valid.
5 User ID isn’t valid.
6 An attempt was made to use a Windows login name with SQL Server Authentication.
7 Login is disabled, and the password is incorrect.
8 The password is incorrect.
9 Password isn’t valid.
11 Login is valid, but server access failed. One possible cause of this error is when the Windows user has access to [!INCLUDEssNoVersion] as a member of the local administrators’ group, but Windows isn’t providing administrator credentials. To connect, start the connecting program using the Run as administrator option, and then add the Windows user to [!INCLUDEssNoVersion] as a specific login.
12 Login is valid login, but server access failed.
18 Password must be changed.
38, 46 Couldn’t find database requested by user.
58 When SQL Server is set to use Windows Authentication only, and a client attempts to log in using SQL authentication. Another cause is when SIDs don’t match.
102 — 111 Azure AD failure.
122 — 124 Failure due to empty user name or password.
126 Database requested by user doesn’t exist.
132 — 133 Azure AD failure.

Other error states exist and signify an unexpected internal processing error.

More rare possible cause

The error reason An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. can be returned in the following situations.

  • When the server is configured for mixed mode authentication, and an ODBC connection uses the TCP protocol, and the connection doesn’t explicitly specify that the connection should use a trusted connection.

  • When SQL server is configured for mixed mode authentication, and an ODBC connection uses named pipes, and the credentials the client used to open the named pipe are used to automatically impersonate the user, and the connection string doesn’t explicitly specify the use of a trusted authentication.

To resolve this issue, include TRUSTED_CONNECTION = TRUE in the connection string.

Examples

In this example, the authentication error state is 8. This indicates that the password is incorrect.

Date Source Message
2007-12-05 20:12:56.34 Logon Error: 18456, Severity: 14, State: 8.
2007-12-05 20:12:56.34 Logon Login failed for user ‘<user_name>’. [CLIENT: <ip address>]

[!NOTE]
When [!INCLUDEssNoVersion] is installed using Windows Authentication mode and is later changed to [!INCLUDEssNoVersion] and Windows Authentication mode, the sa login is initially disabled. This causes the state 7 error: «Login failed for user ‘sa’.» To enable the sa login, see Change Server Authentication Mode.

See also

  • 0420 Reasons for Consistent Auth Issues
  • Remove From My Forums
  • Вопрос

  • We have an application loading data into a SQL Server 2008 R2 Express database. The application runs about half way through then terminates with an error saying that SQL login failed for the current Windows user. We are using Windows authentication
    and it works for the part of the data.

    The error log has this information

    Event xmlns=»http://schemas.microsoft.com/win/2004/08/events/event»>
    — <System>
      <Provider Name=»MSSQL$AURORAXMP» />
      <EventID Qualifiers=»49152″>18456</EventID>
      <Level>0</Level>
      <Task>4</Task>
      <Keywords>0x90000000000000</Keywords>
      <TimeCreated SystemTime=»2012-06-27T02:17:41.000000000Z» />
      <EventRecordID>27743</EventRecordID>
      <Channel>Application</Channel>
      <Computer>D0101026.idacorp.local</Computer>
      <Security UserID=»S-1-5-21-140328221-716536946-747242864-6054″ />
      </System>
    — <EventData>
      <Data>IPCOSLW5493</Data>
      <Data>Reason: Failed to open the explicitly specified database.</Data>

      <Data>[CLIENT: <local machine>]</Data>
      <Binary>184800000E00000013000000440030003100300031003000320036005C004100550052004F005200410058004D0050000000070000006D00610073007400650072000000</Binary>

      </EventData>
      </Event>

    Can somebody suggest where to look for the problem?

    Thanks,

Ответы

  • This error means in most cases that the target database to connect to has been renamed.


    Arthur My Blog

    • Предложено в качестве ответа

      28 ноября 2013 г. 15:26

    • Помечено в качестве ответа
      Olaf HelperMVP
      5 января 2014 г. 9:36

  • Remove From My Forums
  • Question

  • Hi,
    I’ve just installed a new SQL Server 2008 on Windows Server 2008 x64 (and SQL 2008 SP1), while it seems to be running well, I keep getting the same error appearing in the event log:

    Login failed for user 'domainusername'. Reason: Failed to open the explicitly specified database. [CLIENT: x.x.x.x]

    The Admin user name comes up once every 20 seconds or so, and the NT AUTHORITYSYSTEM account appears twice every 5-6 seconds, obviously this is filling the event log pretty quickly…

    The SQL Server event log has:

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

    Then the above login failed message, the Windows event log has:

    - System 
    
      - Provider 
    
       [ Name]  MSSQLSERVER 
     
      - EventID 18456 
    
       [ Qualifiers]  49152 
     
       Level 0 
     
       Task 4 
     
       Keywords 0x90000000000000 
     
      - TimeCreated 
    
       [ SystemTime]  2009-05-07T15:53:26.000Z 
     
       EventRecordID 20656 
     
       Channel Application 
     
       Computer servername 
     
      - Security 
    
       [ UserID]  S-1-5-18 
     
    
    - EventData 
    
       NT AUTHORITYSYSTEM 
       Reason: Failed to open the explicitly specified database. 
       [CLIENT: x.x.x.x] 
       184800000E000000080000004B004100420030003100530050000000070000006D00610073007400650072000000 
    
    
    --------------------------------------------------------------------------------
    
    Binary data:
    
    
    In Words
    
    0000: 00004818 0000000E 00000008 0041004B 
    0008: 00300042 00530031 00000050 00000007 
    0010: 0061006D 00740073 00720065 0000 
    
    
    In Bytes
    
    0000: 18 48 00 00 0E 00 00 00   .H......
    0008: 08 00 00 00 4B 00 41 00   ....S.V.
    0010: 42 00 30 00 31 00 53 00   R.N.A.M.
    0018: 50 00 00 00 07 00 00 00   E.......
    0020: 6D 00 61 00 73 00 74 00   m.a.s.t.
    0028: 65 00 72 00 00 00         e.r...
    
    

    I’m fairly sure that NT AUTHORITYSYSTEM needs some sort of access to the master database, but I’ve tried adding that already and it didn’t work.

    Thanks,
    Matt

Answers

  • Not sure if I would ever add that user as a login with access to master, so I’d advise reversing that.

    Find out what application/process is triggering these failures first — I’ve got a blog entry which describes
    how to trace login failures which should help you do this.

    Once you’ve isolated the cause you can establish the access required, or if it’s even necessary.


    ajmer
    dhariwal || eraofdata.com

    • Marked as answer by

      Thursday, May 14, 2009 9:47 AM

    • Edited by
      Ajmer DhariwalEditor
      Monday, February 21, 2011 3:44 PM
      updated url

This article will help you fixing SQL Server Error: 18456, Severity: 14, State: 38, Reason: Failed to Open the Explicitly Specified Database. We were getting below error in our SQL Server error log for one of our login.

Login Failed – Error: 18456, Severity: 14, State: 38

Reason: Failed to Open the Explicitly Specified Database

Fix Error “Failed to Open the Explicitly Specified Database”

The error log is saying “Failed to Open the Explicitly Specified Database“, it means either your have specified wrong database in your connection string or your login does not have access to the specified database. You can validate below options to isolate this issue.

  • Check whether you have specified correct database in your connection string or not
  • If you are using correct database then whether the login you are using to establish database connection has access to this specified database or not.
  • Correct if you find something in any of the above two options.
  • Check login properties whether it is using correct database as default database configuration or not. If correct database is defined then login has access to that database or not. I will explain about this step in below section as well.
  • You should also check whether number of connections to the database is exhausted or not. Review your maximum number of connections setting.
  • Ensure your database is not set to AUTO CLOSE setting or not inaccessible. Database should be online and healthy state to accept connections.
  • Make sure you have a trust between both machines, database server and the machine from where you are trying to connect. I would suggest you to read below article as well where i have explained various steps to troubleshoot SQL Server connection issues.

Read more articles on SQL error 18456 and connection issues:

  • How to Fix SQL Server Error 18456: A Comprehensive Guide
  • How to fix SQL Server error 53 – Not able to open database connection
  • Fix SQL Server error 18456 – Login failed for user

Let’s learn how to check default database settings for a SQL Server login and a user mapping for any database to the login.

Check Login Properties

The solution to fix this issue can also come by reviewing the properties of this login. Launch its properties window and change the default database to the correct one if this setting is showing wrong database. Sometimes, we drop the databases from the SQL Server instances but never update other objects. If this login is not showing any database and it is showing blank then click at its drop-down to choose your desired database as the default database for this login. Click on Ok button to apply that change. You will stop getting this issue after making this change.

You can open login properties windows by right click at the identified login and then choose properties from dropdown options.

Sometimes, you have chosen the default database as “master” but your login doesn’t have connect permission on master database so ensure you have at least connect permission on the database which you are choosing as the default database for your login. You can click at “User Mapping” tab from left side pane of the login properties window. You will get all databases in top side of right side pane and level of access in bottom side pane. Click at your database from right side pane along with its level of permission which you want to assign. Click at Ok button to apply this change.

Have a look at below screenshot to understand default database of a login and from where you can access User Mapping tab to provide appropriate access to your database. Your login should have access to both databases, the one mentioned as default database for your login and the specified database in connection strings.

SQL Server Login properties window

You can fix SQL error “Failed to Open the Explicitly Specified Database” by following above steps. Write your feedback if you have fixed this issue by other way. I will update this article accordingly with credits.

  • Author
  • Recent Posts

Manvendra Deo Singh

I am working as a Technical Architect in one of the top IT consulting firm. I have expertise on all versions of SQL Server since SQL Server 2000. I have lead multiple SQL Server projects like consolidation, upgrades, migrations, HA & DR. I love to share my knowledge. You can contact me on my social accounts for any consulting work.

Manvendra Deo Singh

Сказка о поломке или что делать, когда проблема не понятна

Время на прочтение
2 мин

Количество просмотров 3K

Я решил рассказать о ситуации, в которую мы попали по стечению обстоятельств при выполнении обычных работ по перенастройке MS SQL. Т.к. нигде не смогли найти информацию о подобных поломках, то имеет смысл это зафиксировать.

Предыстория такова: понадобилось перенести tempdb на новый раздел, подключенный к новому хранилищу.

Задача простая

  1. пишем запрос, показывающий где у нас лежит tempdb:

    use tempdb

    go

    exec sp_helpfile

    go

  2. пишем запрос для изменения настроек хранения tempdb:

    use master

    go

    alter database tempdb

    modify file (name = tempdev, filename = 'Новый_Диск:Новый_Каталогtempdb.mdf')

    go

    alter database tempdb

    modify file (name = templog, filename = 'Новый_Диск:Новый_Каталогtemplog.ldf')

    go

  3. выполняем его и рестартуем службу SQL Server

После перезапуска службы tempdb создается уже на новом месте. Всё просто и понятно, всего два действия — выполнение запроса для переноса и рестарт службы. Ну а если служба не запустится, то идем в логи сервера и смотрим что помешало — места нет под tempdb, прав не хватает у службы SQL Server или неправильно путь указали для tempdb, всякое бывало в работе.

Приступаем. Запрос выполнили, службу перезапустили, служба перезапущена, проверяем коннект и SSMS зависает на попытке подключится к серверу. Идем смотреть  логи сервера Windows и… ничего. Служба запущена без ошибок, проблем нет. 

I am working as a Technical Architect in one of the top IT consulting firm. I have expertise on all versions of SQL Server since SQL Server 2000. I have lead multiple SQL Server projects like consolidation, upgrades, migrations, HA & DR. I love to share my knowledge. You can contact me on my social accounts for any consulting work.

Manvendra Deo Singh

Сказка о поломке или что делать, когда проблема не понятна

Время на прочтение
2 мин

Количество просмотров 3K

Я решил рассказать о ситуации, в которую мы попали по стечению обстоятельств при выполнении обычных работ по перенастройке MS SQL. Т.к. нигде не смогли найти информацию о подобных поломках, то имеет смысл это зафиксировать.

Предыстория такова: понадобилось перенести tempdb на новый раздел, подключенный к новому хранилищу.

Задача простая

  1. пишем запрос, показывающий где у нас лежит tempdb:

    use tempdb

    go

    exec sp_helpfile

    go

  2. пишем запрос для изменения настроек хранения tempdb:

    use master

    go

    alter database tempdb

    modify file (name = tempdev, filename = 'Новый_Диск:Новый_Каталогtempdb.mdf')

    go

    alter database tempdb

    modify file (name = templog, filename = 'Новый_Диск:Новый_Каталогtemplog.ldf')

    go

  3. выполняем его и рестартуем службу SQL Server

После перезапуска службы tempdb создается уже на новом месте. Всё просто и понятно, всего два действия — выполнение запроса для переноса и рестарт службы. Ну а если служба не запустится, то идем в логи сервера и смотрим что помешало — места нет под tempdb, прав не хватает у службы SQL Server или неправильно путь указали для tempdb, всякое бывало в работе.

Приступаем. Запрос выполнили, службу перезапустили, служба перезапущена, проверяем коннект и SSMS зависает на попытке подключится к серверу. Идем смотреть  логи сервера Windows и… ничего. Служба запущена без ошибок, проблем нет. 

Очень сложно исправлять поломку, когда не понимаешь в чём её причина.

В текстовых логах MS SQL были лишь сообщения:

Logon       Login failed for user ‘ADUser’. Reason: Failed to open the explicitly specified database ‘database’. [CLIENT: 10.10.1.10]

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

По коду ошибки было понятно, что есть проблемы с правами на базы данных, но подключится не получалось даже используя sa.

 Т.к. идеи у нас быстро кончились, в интернете пытались найти причины проблемы с правами простым перебором:

  1. Подключили диск для tempdb на раздел, где места с большим запасом. Маловероятно, что tempdb не создался из-за нехватки места и в логе это не указал, но проверить это требовалось. Не помогло.

  2. Запустили SQL Server в минимальной конфигурации (с ключом –f). Файлы tempdb создались в варианте по умолчанию, но на доступ к серверу это не повлияло.

  3. В минимальной конфигурации подключились используя DAC и попытались изменить ещё раз пути для tempdb. Обнаружили, что настройки из базы данных считываются, но не меняются, выдавая ошибку, что данного файла не существует.

Сложив полученное определили, что причиной проблем является повреждение базы master — из базы не могли получить данные о правах пользователя и tempdb, но в логе это никак не отражалось и понять в чем причина не удавалось. После восстановления базы master:

DBCC CHECKALLOC (‘master’,REPAIR_REBUILD);

CHECKALLOC found 0 allocation errors and 0 consistency errors in database ‘master’.

получили возможность подключится к остальными базам. Решение было неочевидным, т.к. на поломку базы master указывали только косвенные признаки, такие как недоступность информации о правах.

Два простых вывода — лог может подвести и понять в чем неисправность можно только по совокупности косвенных признаков и backup служебных баз может сильно сэкономить время на восстановление работы сервиса.

Понравилась статья? Поделить с друзьями:
  • Failed to load il2cpp rust ошибка
  • Failed to launch downloader cisco anyconnect ошибка
  • Failed to install battleye service ошибка
  • Failed to initialize ошибка 3д макс
  • Failed to initialize the authentication interface ошибка