> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/fr/knowledge-base/troubleshooting-articles/sql-server-connection-timeout.md).

# Délai d'expiration de connexion SQL Server

Les délais d'expiration de connexion avec un SQL Server peuvent prendre plusieurs formes. Voici quelques-uns des plus courants :

`System.Data.SqlClient.SqlException : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.`

`System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out.`

`Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.)`

`Microsoft.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=5018; handshake=12;`

Consultez la liste complète des erreurs dans [Timeout expired messages when connecting to SQL Server](https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/timeout-expired-error#verify-timeout-expired-errors).

### Solution 1

Pour résoudre ce problème, la première approche à envisager est d'[augmenter votre délai d'expiration de connexion](https://docs.devolutions.net/fr/rdm/workspaces/workspace-types/native-workspaces/microsoft-sql-server/#advanced).

1. Dans Remote Desktop Manager, accédez à ***Fichier – Espaces de travail*** et modifiez votre espace de travail Microsoft SQL Server en cliquant sur l'icône ***Modifier l'espace de travail***.
2. Dans l'onglet ***Avancé***, augmentez le délai de ***Délai d'expiration de connexion***.
3. Enregistrez vos modifications.

### Solution 2

Si l'ajustement de la durée du délai d'expiration de connexion n'a pas résolu le problème, vérifiez vos paramètres de pare-feu. SQL Server fonctionne sur des ports dynamiques, ce qui nécessite l'ouverture des ports appropriés pour une communication fluide entre Remote Desktop Manager et votre SQL Server. Pour savoir quels ports activer, consultez la section « Ports used by the Database Engine » dans [Configure the Windows Firewall to allow SQL Server access](https://learn.microsoft.com/en-us/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access?view=sql-server-ver16#ports-used-by-the-database-engine).

### Solution 3

Si vous continuez à rencontrer des problèmes de délai d'expiration de connexion, la cause principale pourrait être liée au SQL Listener ou aux groupes de disponibilité. Dans ce cas, essayez de définir la valeur ***MultiSubnetFailover*** sur ***True***.

1. Dans Remote Desktop Manager, accédez à ***Fichier – Espaces de travail*** et modifiez votre espace de travail Microsoft SQL Server en cliquant sur l'icône ***Modifier l'espace de travail***.
2. Dans l'onglet ***Avancé***, cliquez sur ***Plus de paramètres***.
3. Recherchez le paramètre MultiSubnetFailover et définissez sa valeur sur ***True***.

   <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><p>Il est recommandé d'utiliser soit <em><strong>Failover Partner</strong></em>, soit <em><strong>MultiSubnetFailover</strong></em>, mais pas les deux simultanément. Assurez-vous que la valeur <em><strong>Failover Partner</strong></em> est effacée.</p></div>
4. Cliquez sur ***OK***, puis enregistrez vos modifications.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Consultez cet article Microsoft pour plus d'informations : <a href="https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/availability-groups/listener-connection-times-out">Timeout occurs when you connect to an Always On listener in multi-subnet environment</a>.</p></div>

### Solution 4

[Problèmes de validation de certificat](https://docs.devolutions.net/fr/rdm/kb/troubleshooting-articles/unable-to-connect-to-the-workspace/).

### Autres solutions possibles

Si les solutions mentionnées ci-dessus n'ont pas résolu le problème, des correctifs supplémentaires peuvent être trouvés dans les articles Microsoft suivants :

* [Timeout expired messages when connecting to SQL Server](https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/timeout-expired-error)
* [A network-related or instance-specific error occurred while establishing a connection to SQL Server](https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/network-related-or-instance-specific-error-occurred-while-establishing-connection)

N'hésitez pas à [contacter notre équipe de support client](mailto:service@devolutions.net) pour obtenir de l'aide supplémentaire.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/rdm/fr/knowledge-base/troubleshooting-articles/sql-server-connection-timeout.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
