The following four standard JDBC configuration properties can be specified in the XML configuration file (or using the Database Configuration Editor) or you can configure the connections directly on the database communication points and filters.
When they are configured directly on the communication points or filters using one of the standard databases, the JDBC URL is generated.
Property |
Description |
---|---|
Driver |
The fully qualified name of a JDBC driver class. |
URL |
The JDBC URL of the database to connect to. |
Username |
The database user to connect as. |
Password |
The password for that user. |
SYNTAX:
<driver>driver name</driver> <url>database url</url> <username>database username</username> <password>database password</password>
or
<driver>driver name</driver> <url>database url</url> <username>$(database_username)</username> <password>$(database_password)</password>
Database Drivers and URLs
To find the correct database URL, look at the list of URLs in the following tables and follow these steps:
- Choose the database
- Use the given driver name
- Select the URL from the listed options. Use the top entry in the listed options unless:
- The port number is not defaulted, in which case, select the URL which specifies the port number (the default port numbers are given below).
- The database is a SQL Server instance, in which case, select the URL which specifies the instance.
MS SQL Server (Microsoft Driver)
- {host}: Required: the hostname or IP address of the database server.
- {database}: Required: the name of the database.
- {port}: Required if a non-default port is being used: the port number which the database is using.
- {databaseName}: Required if the database is on an instance: the name of the database.
- {domain}: Required if the user belongs to an Active Directory domain: the name of the Active Directory domain.
Property |
Description |
---|---|
Default Port |
|
Driver |
|
URL Choices |
You can connect to SQL Server using Active Directory credentials using:
|
Examples |
|
MS SQL Server (jTDS Driver)
- {host}: Required: the hostname or IP address of the database server.
- {database}: Required: the name of the database.
- {port}: Required if the non-default port is being used: the port number which the database is using.
- {instance}: Required if the database is on an instance: the name of the instance.
- {domain}: Required if the user belongs to an Active Directory domain: the name of the Active Directory domain.
Property |
Description |
---|---|
Default Port |
|
Driver |
|
URL Choices |
You can connect to SQL Server using Active Directory credentials using:
|
Examples |
|
Currently, an MS SQL server that has SSL connections enabled will not let Rhapsody modules connect to it with the default jTDS driver. This can be remedied by adding the ssl=request
parameter to the JDBC URL as follows:
jdbc:jtds:sqlserver://{host}:{port};ssl=request
jdbc:jtds:sqlserver://{host}:{port}/{database};instance={instance};
ssl=request
Examples:
jdbc:jtds:sqlserver://devsql:1433;ssl=request
jdbc:jtds:sqlserver://DatabaseServer:5400/PatientRecords;instance=Live;
ssl=request
Oracle
- {host}: Required: The hostname or IP address of the database server.
- {service name}: Required: The database service name.
- {port}: Required if the non-default port is being used: The port number which the database is using.
Property |
Description |
---|---|
Default Port |
|
Driver |
|
URL Choices |
|
Examples |
|
PostgreSQL
- {host}: Required: The host name or IP address of the database server.
- {database}: Required: The database name.
- {port}: Required if non-default port is being used: The port number which the database is using.
Property |
Description |
---|---|
Default Port |
|
Driver |
|
URL Choices |
|
Examples |
|
MySQL
Due to GPL restrictions, the MySQL driver is not included with Rhapsody. You must obtain the MySQL driver from http://www.mysql.com.
- {host}: The hostname or IP address of the database server. If the hostname is not specified, it defaults to 127.0.0.1.
- {database}: Required: The database name.
- {port}: Required if the non-default port is being used: The port number which the database is using.
Property |
Description |
---|---|
Default Port |
|
Driver |
|
URL Choices |
[]Square brackets indicate optional parameters |
Examples |
|
Microsoft Access
- {database}: Required. The data source. The data source must be a System Data Source, that is available to all users.
Driver |
|
URL Choices |
|
Examples |
|
Custom Drivers
- Databases other than MS SQL server, Oracle, ODBC.
- Alternative drivers for the databases that are bundled with Rhapsody.
Custom drivers must be placed in the data\lib
directory. On Windows®, the default directory is:
C:\Program Files\Rhapsody\Rhapsody Engine 6\rhapsody\data\lib
Alternatively, the drivers can be attached as an auxiliary file to the communication point or filter that needs it (this is useful if deferent versions of the same driver are needed for different connections).
Important!
Custom database drivers must be added to both the data\lib
and <Rhapsody IDE>\DatabaseStructureReader
directories. Refer to Using Custom Database Drivers for details.