Skip to main content

Troubleshooting Error: "Unable to connect to source database "MyDatabase" using the provided credentials" (KBA1030)





Troubleshooting Error "Unable to connect to source database "MyDatabase" using the provided credentials"

When attempting to link a SQL Server dSource, the following error is displayed when validating the database user credentials:

Unable to connect to source database "MyDatabase" using the provided credentials, due to: Failed to query source database "master" over JDBC.

Earlier releases of the Delphix Engine may instead have the message "The TCP/IP Connection to the Host <HOSTNAME>, Port <PORT> has Failed."

Cause & Resolution

The error may have one or more of the following causes:

  • Incorrect username and/or password
  • Granular access restrictions, such as SQL Server log on triggers
  • Unable to connect to the SQL Server port from the Delphix Engine

A logical approach to troubleshooting this issue includes the following steps:

1. Check the SQL Server Error Log

The SQL Server Error Log for the involved Source Database can be accessed by one of the following methods:

  • Using SQL Server Management Studio (Management → SQL Server Logs → Current)
  • Opening the SQL Server ERRORLOG file using a text editor such as notepad
  • Checking the Application Log in the Windows Event Viewer

Failed logon attempts should be visible in each of the above locations.

Common error messages include:

  • Password did not match that for the login provided, which suggests that there is an error in the provided username or password.
  • Attempting to use an NT account name with SQL Server Authentication, which suggests that the Database User (SQL Login) option has been selected when adding the dSource, instead of the Domain User with Password Credential option (available in Delphix Engine and later).

Other error messages should provide sufficient troubleshooting information to resolve the log on issue.

If no error is visible when the log on attempt fails, this suggests that the issue may be related to connectivity.

2. Use the Delphix Command Line Interface (CLI) to test connectivity from the Delphix Engine

Using the Delphix CLI, as described in Testing Connectivity to a Specific TCP Port From the Delphix Engine (KBA1732), can help to identify network-related issues that might affect connectivity from the Delphix Engine to the Source SQL Server Instance.

  • To find the appropriate address to use, check the Host Address in the Details tab of the Manage → Environments screen, or the Server Name in the Databases tab for clustered Source Databases.
  • To find the appropriate port, check the Port for the relevant instance in the Databases tab of the Manage → Environments screen.

The following test will attempt to connect with the SQL Server instance on port 1433:

mydelphixengine> connectivity
mydelphixengine connectivity> ssh
mydelphixengine connectivity ssh *> set
mydelphixengine connectivity ssh *> set port=1433
mydelphixengine connectivity ssh *> set username=dummyuser
mydelphixengine connectivity ssh *> set credentials.type=PasswordCredential
mydelphixengine connectivity ssh *> set credentials.password=test
mydelphixengine connectivity ssh *> commit

Common error messages include:

  • Server closed connection during identification exchange, which identifies that a TCP connection was successfully established, and that this may not be a networking issue.
  •, which indicates that the Delphix Engine is no longer able to resolve the provided server address using its configured DNS servers.
  • Connection timed out (Connection timed out), which suggests that a Windows or network firewall may be affecting connectivity to the SQL Server instance.

If a connectivity issue is identified, system or network administrators may be required to confirm exactly what is and is not configured on any firewalls between the Delphix Engine and the SQL Server host. 

3. Verify that logon is possible from another host using SQL Server Management Studio 

Using another Windows Server, ideally on the same subnet as the Delphix Engine, use SQL Server Management Studio to logon to the SQL Server instance using the same hostname, port, username and password as you have used for the Add dSource workflow.

If this fails, this provides further evidence of a connectivity or credential issue, and may provide your database, network, or system administrators with more information to troubleshoot.