Skip to main content

Defining a JDBC Connection URL

Defining a JDBC Connection URL

A java.sql.Connection URL supplies the connection with information about the host address, port number, and namespace to be accessed. The InterSystems JDBC driver also allows you to use several optional URL parameters.

Required URL Parameters

The minimal required URL syntax is:

   jdbc:IRIS://<host>:<port>/<namespace>

where the required parameters are defined as follows:

  • host — IP address or Fully Qualified Domain Name (FQDN). For example, both 127.0.0.1 and localhost indicate the local machine.

  • port — TCP port number on which the InterSystems IRIS SuperServer is listening. The default is 1972. For more information, see DefaultPort in the Configuration Parameter File Reference).

  • namespace — InterSystems IRIS namespace to be accessed.

For example, the following URL specifies host as 127.0.0.1, port as 1972, and namespace as User:

   jdbc:IRIS://127.0.0.1:1972/User

Optional URL Parameters

In addition to host, port, and namespace, you can also specify several optional URL parameters. The full syntax is:

   jdbc:IRIS://<host>:<port>/<namespace>/<logfile>:<eventclass>:<nodelay>:<ssl>

where the optional parameters are defined as follows:

  • logfile — specifies a JDBC log file (see “JDBC Logging”).

  • eventclass — sets the transaction Event Class for this IRISDataSource object.

  • nodelay — sets the TCP_NODELAY option if connecting via an IRISDataSource object. Toggling this flag can affect the performance of the application. Valid values are true and false. If not set, it defaults to true.

  • ssl — enables TLS for both IRISDriver and IRISDataSource (see “Configuring TLS” in the Security Administration Guide). Valid values are true and false. If not set, it defaults to false.

Each of these optional URL parameters can be defined individually, without specifying the others. For example, the following URL sets only the required parameters and the nodelay option:

   jdbc:IRIS://127.0.0.1:1972/User/::false

Other connection properties can be specified by passing them to DriverManager in a Properties object (see “Using DriverManager to Connect”).

FeedbackOpens in a new tab