,

Login Timeout issue when trying to connect Azure SQL database from on-premises Microservice GG system

Posted by

The error message you are encountering is a login timeout issue when trying to connect to the EDH_DEV database using the ODBC Driver 18 for SQL Server from your on-premises Microservice GG system.

Key Points from the Error:

  • Login failed: The system was unable to establish a connection.
  • SQLSTATE S1T00: This error code indicates a timeout occurred.
  • Driver 18 for SQL Server: You’re using ODBC Driver 18, which requires encryption by default.
  • Failed to open data source EDH_DEV for user GG_ADMIN_OCI: The database couldn’t authenticate the user or open the connection.

Potential Causes:

  1. Incorrect Credentials: The username (GG_ADMIN_OCI) or password used may be incorrect. Ensure the credentials match the Azure SQL login details.
  2. Encryption Requirements (TLS): ODBC Driver 18 for SQL Server enforces encryption by default. If your Azure SQL server doesn’t have a valid certificate or encryption is not configured properly, this can cause the connection to fail.
  3. Firewall or Network Issues:
    • Ensure that your on-premises network allows outbound traffic to Azure SQL.
    • Verify that the Azure SQL firewall settings allow incoming traffic from your on-premises IP address. You can configure this in the Azure Portal under SQL Server > Networking > Firewall rules.
  4. Connection Timeout: The connection may be timing out due to network latency or server load. Increasing the timeout setting might help.

Suggested Actions:

  1. Check Credentials:
    • Verify that the login and password for the user GG_ADMIN_OCI are correct.
    • Test the credentials by connecting manually using SQL Server Management Studio (SSMS) or Azure Data Studio.
  2. Update Connection String for Encryption: If encryption is causing the issue, you can either:
    • Disable encryption (not recommended for production): Add Encrypt=false; to your ODBC connection string.Trust the server certificate: Add TrustServerCertificate=yes; to the connection string if you do not have a valid certificate installed but want to bypass the certificate check.
    Example:
Driver={ODBC Driver 18 for SQL Server};Server=EDH_DEV;Database=your_database;Uid=GG_ADMIN_OCI;Pwd=your_password;Encrypt=yes;TrustServerCertificate=yes;

3. Increase Timeout Settings: If the connection timeout is too short, increase it by adding Connection Timeout to your connection string:

Connection Timeout=60;

4. Check Firewall and Network Access:

  • In the Azure Portal, go to SQL Server > Networking > Firewall rules and verify that your on-premises IP address (or IP range) is allowed.
  • Ensure that Port 1433 (the default SQL Server port) is open for outbound traffic from your on-premises environment to Azure SQL.

5. ODBC Driver Update:

  • Ensure that the ODBC Driver 18 for SQL Server is up-to-date on your system, as older versions might have compatibility issues.

Debugging Steps:

  1. Try connecting manually to the Azure SQL server using SSMS or Azure Data Studio with the same credentials to confirm if the issue is with the connection string or firewall settings.
  2. If encryption is enforced, ensure you have the correct configuration to trust the Azure SQL certificate.
  3. Verify all Azure SQL firewall rules to ensure on-premises access.
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x