How do I get SQL tests to work with Joval?

Supported Engines

Joval is capable of supporting SQL tests for the following set of database engines/versions, using the associated JDBC drivers:

Engine Version(s) JDBC Driver
DB2 ≥8.1 IBM
MSSQL Azure, 2005, 2008, 2008 R2, 2012 jTDS
MySQL ≥4.1 Connector/J
Oracle 9.0.1, 9.2.0, 10.1.0, 10.2.0, 11.1.0, 11.2.0 Oracle
PostgreSQL ≥7.2 PostgreSQL
Sybase 10, 11, 12, 15 jTDS

Joval Professional Edition ships with the Oracle, jTDS and PostgreSQL drivers installed. To add DB2 and MySQL support, end-users can download the desired drivers and copy them to Joval’s lib/ directory (e.g., “C:\Program Files\Joval\Joval_5.11.2-1_SR2\lib” on Windows).

Joval-Utilities.jar does not bundle any JDBC drivers. To use the sql_object with the Joval Utilities, you must download the JDBC drivers, set up a Java CLASSPATH, and reference the main utility class, org.joval.enterprise.utilities.Main, from the command-line.

Connection String

The connection_string entity of your sql_object is treated as a semicolon-delimited list of name/value pairs. The property names are case-sensitive. The database username and password can be set using properties called “user” or “userName”, and “password”. The properties “port” and “portNumber” can be used to specify a non-standard port number for the database connection. The properties “database”, “databaseName” and “SID” can all be used to set the database name. The JDBC connection URL will be constructed as:

[prefix]:[host]:[port]/[database name]

With the exception of the username and password, all property name/value pairs are passed directly to the JDBC driver as connection properties (e.g., you can specify a Windows login domain for MSSQL using the “domain” property).

For MSSQL only, if no username and password are specified in the connection_string, single-sign-on (SSO) will be used for host-based scans, and the target host username and password will be used for network/remote scans.

For Oracle, MSSQL and Sybase, the version entity of your sql_object must match one of the supported enumerated versions from the table above.