Create a New Database Connection
To connect to a database, you must first create and setup a Database Connection.
Create a database connection
Database connections are created using the Database → Create Database Connection main menu or using the plus icon in the Databases tab toolbar.
The first choice, Create Database Connection, opens a window in which the driver type should be selected by double-click:
The second choice, Create Database Connection from Database URL shows a dialog in which a JDBC URL is edited or pasted from clipboard. Based on the URL, the driver type is selected automatically:
Next step is to setup the connection details:
- Enter a name for the connection in the Name field, and optionally enter a description of the connection in the Notes field,
- Leave the Database Type as Auto Detect,
- If the selected driver in Driver Type is marked with a green checkmark then it is ready to use. If it is not marked with a green checkmark, you may have to configure the driver in the Driver Manager (see Installing a JDBC Driver how to install a JDBC driver),
- Enter information about the database server in the remaining fields,
- Verify that a network connection can be established to the specified address and port by clicking the Ping Server button,
- If the result from Ping Server shows that the server can be reached, click Connect to connect to the database server.
See Fixing Connection Issues for some tips if you have problems connecting to the database.
Alternatively, you can set the Settings Format to Database URL (this is the only choice for some JDBC drivers). This replaces the fields for information about the database server with a single Database URL field, where you can enter the JDBC URL.
The information about the database server that needs to be entered depends on the which JDBC driver you use. For most drivers, you need to specify:
Field | Description |
---|---|
Database Server | The IP address or DNS name for the server where the database runs. |
Database Port | The TCP/IP port used by the database. |
Database Userid | The database user account name. Enter (null) to not send an account name. |
Database Password | The database user account password. Enter (null) to not send a password. |
For some database such as Oracle, you may use a TNS name instead of specifying the server and port. Other drivers may add more fields that are driver specific.
You may also optionally specify SSH tunneling information and Options, such as:
Option | Description |
---|---|
Auto Commit | Check if you want to enable auto commit in the SQL Commander by default for the connection. |
Save Database Password | Check if you want the password to be saved (encrypted) during the session, between sessions, or cleared when you disconnect. |
Permission Mode | One of Development, Test or or Production to select which set of Permissions to use. |
See the Configuring Connection Properties page for related topics.