Project

General

Profile

External Database » History » Version 1

Luke Murphey, 04/03/2010 01:30 PM

1 1 Luke Murphey
h1. External Database
2 1 Luke Murphey
3 1 Luke Murphey
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.
4 1 Luke Murphey
5 1 Luke Murphey
h2. Configuring the Database
6 1 Luke Murphey
7 1 Luke Murphey
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).
8 1 Luke Murphey
9 1 Luke Murphey
h2. Configuring NSIA to use the Database
10 1 Luke Murphey
11 1 Luke Murphey
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:
12 1 Luke Murphey
13 1 Luke Murphey
<pre>
14 1 Luke Murphey
Database.Location=jdbc:derby://localhost:1527/NSIADB
15 1 Luke Murphey
Database.Password=pa55w0rd
16 1 Luke Murphey
Database.Driver=org.apache.derby.jdbc.ClientDriver
17 1 Luke Murphey
</pre>
18 1 Luke Murphey
19 1 Luke Murphey
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.
20 1 Luke Murphey
21 1 Luke Murphey
Open a command prompt within the NSIA install directory and start the application. Note any error messages that indicate the database connection failed.