Administration Guide > Configuring TDV Data Connections > Using the ODBC Driver on UNIX > Creating a DSN with driverConfig on UNIX
 
Creating a DSN with driverConfig on UNIX
A DSN is the logical name that is used by ODBC to access data. You can use an ODBC DSN entry to store the connection string values externally, to minimize the complexity of the connection string that you must define in your program.
You can create a DSN using the configuration utility driverConfig. This configuration utility helps you to reconfigure the driver files and create, edit, list, or delete DSN entries. You can use it when the driver file location has changed or is to be changed after installation.
On UNIX platforms, SysV semaphores are used to synchronize the read and write operations, and they are never deleted by ODBC drivers. The ODBC driver might run into an error if it is unable to create a new one because the maximum SysV count has been reached.
You can clean up semaphores using the ipcrm command.
To create a DSN using driverConfig
1. Make sure that you have Read and Write permissions on the following files:
odbc.ini
odbcinst.ini
 
2. Locate driverConfig.
3. Run the utility using the following command:
driverConfig
 
For example:
./home/release/apps/odbc/linux64/bin/driverConfig
./odbc/linux64/bin/driverConfig
./bin/driverConfig
 
4. Supply driverConfig with responses to set configurations in the odbc.ini and odbcinst.ini.
The Usage instructions of driverConfig is given below:
Usage: driverConfig [options]
where options are:
[-help]
[-view]
[-deleteDSN <name>]
[-uninstallDriver]
[-installDriver <driver path>]
[-configDSN <DSN attributes>]
The table below describes the different options:
Option
Description
help
Show this information and exit
view
View configuration and DSNs on this system and exit
deleteDSN <name>
Delete the named DSN
uninstallDriver
Uninstall ODBC 3.5 64-bit Driver
installDriver <driver path>
Install ODBC 3.5 64-bit Driver
configDSN <DSN attributes>
Create a new ODBC 3.5 DSN, where DSN attributes are of the form:
"DSN=test;host=localhost;port=9401;uid=userId;pwd=password;domain=composite;datasource=ds;catalog=cat"
Note:
If this utility is executed without any options then it will run in interactive mode using Terminal I/O
All option names are case-insensitive.
If -help or -view is one of the options used, then no other options that are included, will be executed.
The utility accepts more than one option.
The order of actions that will be executed is:
-deletedsn
-uninstallDriver
-installDriver
-configDSN
If the environment variable COMPOSITE_HOME is defined, then it is used for evaluating the default ODBC driver path. COMPOSITE_HOME is used for evaluation only during driver installation in interactive mode.