Nucleus ODBC Setup Guide for UNIX Clients

 

Previous Topic:
Setting Environment Variables for the ODBC Driver
Chapter Index
Next Topic:
Using an ODBC Connection String

 

Entries in the odbc.ini and nucleus.ini Files


odbc.ini

The odbc.ini file is used by both the ODBC driver manager and the ODBC driver to find information needed to connect to a database instance. The ODBC driver manager looks for the odbc.ini file in the following locations, in the following order:

1. The location specified in the ODBCINI environment variable (see above)
2. The user's home directory (as defined by $HOME); if located here, the file name must be preceded by a period (.odbc.ini)
3. The /etc directory.
Each named ODBC data source (DSN) must have its own section in the odbc.ini file, with a header specifying the name of the data source in the following format:
[DSN-name]

Each [DSN-name] section contains the following required parameters:
CONNECTION= Connection-name corresponding to a [CONNECTION connection-name] section in the nucleus.ini file (see below). This indicates the host name of the computer on which the database instance is running and the port number for connecting to the database instance.
DATABASE= Name of the database instance (real database or virtual instance) to which the user is connecting
DRIVER= Full file name of the Nucleus ODBC driver, including the path to the file (/path/libsando.so or /path/libsando64.so)


Each [DSN-name] section may also contain the following optional parameters:

AUTOCOMMIT=

The Nucleus ODBC Driver can be set to automatically execute a COMMIT WORK command after each SQL statement that changes the database. The possible values are the following: 1 (on) or 0 (off) (equivalently true or false; equivalently yes or no).

Default: 0

AUTOREFRESH=

The Nucleus ODBC Driver can be set to execute automatically either a COMMIT WORK or ROLLBACK WORK command before each SELECT statement. This ensures that the client queries the most recent "view" of the database instance, which may be altered by other concurrent user connections. Some front-end applications (such as MicroStrategies DSS Agent) may require that this special option be set.

The possible values are the following: 0 (off), 1 or COMMIT (COMMIT WORK), and 2 or ROLLBACK (ROLLBACK WORK).

Default: 0

UID= The user ID that will be used to log in to the database instance.
PWD= The user password associated with the user ID specified by the UID parameter.

 

Sample Entry:

[DBTEST_DSN]
DRIVER=/usr/sand/libsando.so
DATABASE=dbtest
CONNECTION=server1_dbtest

 

nucleus.ini

The nucleus.ini file specifies the host name and port number used when connecting to a given database instance. The nucleus.ini file must reside in the SUPPORT directory specified in the NUCLEUS environment variable (that is, in the same location as the SAND CDBMS executable files and the ndb.n00 file).

Each [DSN-name] entry in the odbc.ini file (see above) contains a CONNECTION parameter that specifies a connection-name. Each connection-name must have a section in the nucleus.ini file with a header in the following format:
[CONNECTION connection-name]

Each [CONNECTION connection-name] section must contain the following parameters:
HOST= Host name of the computer on which the database instance is running
PORT= Port number for connection to the database instance

Sample entry:
[CONNECTION server1_dbtest]
Host=server1
Port=6000

Note:
This entry supplies connection information for the DBTEST_DSN data source as configured in the sample odbc.ini file entry above.

 
Previous Topic:
Setting Environment Variables for the ODBC Driver
Chapter Index
Next Topic:
Using an ODBC Connection String