Troubleshooting Database Connections
This article presents solutions to common configuration and connectivity errors that database testers might encounter. Users should first follow the steps in Direct to Database Testing including for database target creation, as well as for clip creation and editing.
- Connection Failure
There are many factors that can cause a database connection failure. Sometimes the error code returned from the database is unclear. Below is a checklist for troubleshooting:
- Host name or IP address of the database in the database URL
Ensure that the host name (or the IP address) of the database server to connect is the correct one. Also, note that the host name or the IP address must be routable to CloudTest.
- Port number of the database in the database URL
Ensure that the port number of the database server to which CloudTest will connect is the correct one.
- Database name in the database URL
Ensure that the database name is the correct one. A database name is the identifying name when the database is created.
Some databases, such as Microsoft SQL Server, allow the database connection to the database server (or database instance). For those databases, the database name can be omitted in the database URL. Then the user can access to a database on the database instance by a SQL statement.
- Database user name
Ensure that the database user name is correct and that the database user has the permission/privilege for such a database connection.
- Database password
Ensure that the corresponding password is correct. The password is case sensitive.
- Database firewall settings
Ensure that the database server is accessible to CloudTest. For example, the public IP address(es) of CloudTest instance(s) must be added to the firewall settings of the network on which the database instance is running. When there are multiple CloudTest instances, the IP range(s) of the public IP addresses can be added to the firewall settings. Note that this pertains to the public IP address(es) of the CloudTest instance(s). The command nslookup may show an internal IP address, which is not the public IP address. There are a number of ways to find the public IP address of a server. If a browser can be launched from the server, opening a page of www.whatismyip.org can get the public IP address. If no browser is available, some commands (i.e.,
) can help find the public IP address by decoding the ASCII values in the returned HTML source.
- No Permission/Privilege
A database user can have different permissions and privileges (or privilege roles). A database user must be granted the proper permissions and privileges (or privilege roles) for executing some or all of the SQL statements or commands.