Using an External Database¶
By default, NSIA uses an internal database. However, NSIA can connect and use an external database server too (as long as it supports JDBC). NSIA currently supports IBM Cloudscape and Apache Derby. Other databases may work but are not officially supported yet and may not work correctly. Note that NSIA will not perform operations such as auto-defragmenting the indexes if an external database is used.
Configuring the Database¶
Before NSIA can use an external database, the database must be updated with the appropriate database schema. Download the appropriate SQL script that matches the database you have installed. Create a database and run the SQL script against the database to initialize the tables. Next, configure NSIA to use the database (see below).
Configuring NSIA to use the Database¶
Once the database is prepared, the NSIA configuration will need to be modified in order to connect to the database. To do this, modify the config.ini file to specify the location, password and driver necessary to connect. Below is an example:
Database.Location=jdbc:derby://localhost:1527/NSIADB Database.Password=pa55w0rd Database.Driver=org.apache.derby.jdbc.ClientDriver
The location field should contain the JDBC connection string. The format of the connection strign depends on the specific type of database you are using, refer to the database documentation to identify what your connection string should be. The JDBC driver must be placed somewhere in the Java Classpath. The easiest way to to add the driver to the classpath is to drop the driver file (probably a JAR file) in a directory that is already included in the classpath.
Open a command prompt within the NSIA install directory and start the application. Note any error messages that indicate the database connection failed.