This article applies to:
OS: Not applicable
Product edition: Phoenix
Problem Description:
When attempting to configure SQL backup using Phoenix, the SQL discovery fails with ODBC SQL Server errors. The following common causes are often the reason for this failure:
Non-supported SQL version.
Issues with sqlcmd or incorrect sqlcmd configuration.
TLS 1.0 being disabled.
Insufficient permissions to access the SQL Server.
This article discusses these issues in detail, how to identify them, and how to resolve them.
Cause 1: Non-Supported SQL Version
The SQL Server version you are using may not be supported by Phoenix for backup operations. This can result in an error while trying to establish a connection during the discovery process.
Traceback:
[2018-08-14 18:59:42,328] [INFO] Error[('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBMSLPCN]SSL Security error (18) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBMSLPCN]ConnectionOpen (SECCreateCredentials()). (1)')] while connecting with instance [BACKUP01\DISCOVERY]
This ODBC error occurs while trying to connect to the SQL instance and indicates an SSL security error. The issue may stem from the SQL version being incompatible or unsupported.
Resolution:
Check the supported SQL Server versions in the Phoenix System Requirements documentation.
Ensure that you are using a supported SQL version for your Phoenix backup. If necessary, upgrade or install the supported SQL version.
Cause 2: Issues with sqlcmd or Disabled TLS 1.0
If sqlcmd is not configured correctly or if TLS 1.0 is disabled on your SQL Server, discovery can fail due to connection errors.
Traceback:
[2018-07-15 19:01:19,101] [INFO] Error[('08001', '[08001] [Microsoft][ODBC SQL Server Driver][Shared Memory]SSL Security error (18) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (SECDoClientHandshake()). (772)')] while connecting with instance [USCAW3-CLSECP01]
This error indicates an SSL security issue while attempting to connect via Shared Memory or SQL Driver. It is often caused by incorrect sqlcmd configuration, missing configuration, or issues related to TLS settings.
Resolution:
Verify sqlcmd Configuration:
Open a command prompt on the server.
Run the command sqlcmd to check if sqlcmd is configured correctly.
If the command returns an error, troubleshoot the sqlcmd configuration. Ensure that it is properly installed and configured for your SQL Server environment.
Check TLS Settings:
If TLS 1.0 is disabled and TLS 1.1 or TLS 1.2 is enabled, ensure that the SQL Server Native Client 11.0 driver is installed.
Without this driver, backups will fail even if TLS 1.1 or TLS 1.2 is enabled.
Install SQL Server Native Client Driver 11.0:
If TLS 1.0 is disabled, ensure that the SQL Server Native Client driver 11.0 is installed.
You can download it from Microsoft's official website.
Cause 3: Insufficient Permissions to Access the SQL Server
The SQL discovery or backup operation may fail if the NT AUTHORITY\SYSTEM account (or another service account) does not have sufficient permissions to access the SQL Server database.
Traceback:
PYODBC library error [('08004', '[08004] [Microsoft][ODBC SQL Server Driver][SQL Server]The server principal "NT AUTHORITY\\SYSTEM" is not able to access the database "LOEBI" under the current security context. (916) (SQLExecDirectW)')]
This error occurs because the service account (in this case, NT AUTHORITY\SYSTEM) does not have the required permissions to access the SQL database for backup.
Resolution:
Grant sysadmin Permissions:
To resolve this, assign sysadmin permissions to the account running the Phoenix Agent (typically NT AUTHORITY\SYSTEM or the relevant service account).
Execute the following query in SQL Server Management Studio (SSMS) to grant the necessary permissions:
EXEC sp_addsrvrolemember 'NT AUTHORITY\SYSTEM', 'sysadmin';
This will ensure that the account has the sysadmin role and can access the SQL databases for backup.
Verify Permissions:
You can also use the following query to check if the account has the necessary privileges:
SELECT *
FROM sys.syslogins
WHERE name = 'NT AUTHORITY\SYSTEM';
Ensure that the account is listed with the sysadmin role.
Cause-4: unable to open tcp connection with host <SQL_SERVER_HOSTNAME>:1433
Traceback: mssqldiscovery.log
level=error ts=2025-03-28T16:39:28.7652904Z filename=helper.go:57 layer=discovery message="Failed to fetch product edition." Error="unable to open tcp connection with host 'SQL_SERVER_HOSTNAME:1433': dial tcp [fe80::3188:c22d:6731:845c]:1433: connectex: No connection could be made because the target machine actively refused it."
Resolution:
Refer the System requirements section of Phoenix documentation and install or upgrade to the supported SQL version
Check if the Affected SQL Server is listening on port 1433
telnet <SQL_Server_IP> 1433
Try disabling the IPV6 on the affected SQL server and retry the SQL discovery
Conclusion:
SQL discovery failures with ODBC SQL Server errors can typically be attributed to one of the following issues:
Non-supported SQL Server version: Ensure that your SQL version is supported by Phoenix.
sqlcmd configuration issues or disabled TLS 1.0: Verify the correct configuration of sqlcmd and ensure that the SQL Server Native Client 11.0 is installed if needed.
Insufficient permissions: Grant sysadmin permissions to the service account used for SQL discovery to ensure it can access the SQL databases.
unable to open tcp connection with host <SQL_SERVER_HOSTNAME>:1433
By following these steps, you can resolve the ODBC SQL Server errors and ensure that SQL discovery and backups proceed successfully with Phoenix.