Creating Databases

 

Like other tasks in JMap Admin, you create a new database by following a wizard. To start creating a new database, press the Create button in the page listing the databases and follow the required steps.

Identification

Name

Enter a name for the new database. The name must be unique.

Description

Optionally enter a description for the new database. Used for administrative purposes.

 

Database type

Database driver

Select the database driver that matches the database system that needs to be accessed. New drivers can be added by creating new configuration files in directory JMAP_HOME/conf/db on the server.

Note that when using the ODBC driver, an existing ODBC data source must exist in the Windows System menu. This ODBC data source is referenced in the JMap Admin connection string.

Connection string

This string provides the necessary parameters to connect to the database. The parameters vary from one driver to another. The structure is presented but the parts between brackets need to be replaced by the actual values (the brackets must be removed in the end). E.g. jdbc:mysql://[HOST]:3306/[DATABASE]?useCursorFetch=true becomes jdbc:mysql://192.168.0.6:3306/mydatabase?useCursorFetch=true

Username

Enter the username to connect to the database.

Password

Enter the password used to connect to the database.

Test

Each database must be tested. Press this button to do a connection test. If the test fails, an error message will provide a description of the error.

 

Connections

Number of connections

Enter the initial size of the pool of connections. This determines how many connections to the database will be kept open.

Maximum connections

Enter the maximum number of connections allowed for this pool. It must be equal to or greater than the initial number of connections. If the pool needs to be increased, new database connections will be created automatically until the maximum value is reached. The maximum value can be disabled using the check box, allowing the pool to increase as needed.

Advanced parameters

The following advanced parameters usually don't need to be modified.

Parameters

Additional parameters

In some rare cases, database systems may require additional parameters. They can be entered here.

Validation query

JMap uses a query validation mechanism to validate database connections. This query is used to test the connection each time a query needs to be executed. If the validation query fails, which typically means that the connection to the database system is broken, JMap Server will try to establish a new connection automatically. This mechanism ensures the database connections are always working.

The query must be valid and very quick to execute. In order to reduce the impact on performance, make sure you minimize the number of returned records (zero is perfect) and use indexed fields in the WHERE clause.

Default queries are provided. They normally don't need to be changed.

Inactivity timeout

The connection inactivity timeout is used to close and reopen connections that are inactive for a long period. This mechanism ensures that the database system does not close inactive connections. Make sure that this value is lesser than the connection timeout of your database system. A default value of 2 hours is appropriate most of the time.

Connection type

Specify the connection type to create. Generic connections are all created with the same user information (username and password) defined earlier. From the perspective of the database system, it is as if the same user performed all queries. This type of connection is used most of the time.

Identified connections are created on the fly for each user connected to JMap Server. The same connection is reused during the session for each user. From the perspective of the database management system, each query is done by the user who is connected to JMap Server. This connection mode is useful in environments where security is managed at the database level. In order for the identified connection mode to work, it is required that JMap and the database system share the same list of users. This can be the case when the Oracle user manager module is used to manage users.