# eXtremeDB ODBC DSN configuration on Unix-Linux systems

> Please use these links to view an overview of the eXtremeSQLODBC implementation and installation steps. Below are presented the steps to configure the McObject ODBC driver fo connect to eXtremeSQL applications.

> As explained in the ODBC installation guide, all of the ODBC Driver setup procedures are applied via two configuration files. The configuration file

> `~/.odbc.ini` is the user-specific list of DSN (Data Source Names). The following is a sample DSN for the eXtremeSQLODBC driver:

>         [EXDB]
>         Description     = eXtremeSQL data source
>         Driver          = eXtremeSQL
>         #DATABASE        = exdb
>         SERVER          = localhost:5099

> The eXtremeSQL ODBC driver treats the value of option DATABASE or SERVER (they are equivalent) as the name of the database in shared memory if there is no colon ':' in the value. (This is equivalent to the local driver mode in the setup for the Windows version.) If value of option DATABASE (or SERVER) has a colon (':') in it, the driver treats it as server address and port number. Thus it works in remote mode as a RemoteSQL client.

## Connecting to a remote database

> To initiate the remote driver mode (connecting via the RemoteSQL protocol) perform the following steps:

> - Start the xSQL utility as a remote server:

> >         ./target/bin/xsql -dbname exdb -size 100M -p 5099 -debug –i

> - Edit the ODBC DSN configuration file `~/.odbc.ini` as follows:

> >         [EXDB]
> >         Description     = eXtremeSQL data source
> >         Driver          = eXtremeSQL
> >         #DATABASE        = exdb
> >         SERVER          = localhost:5099

> - Export the LD_LIBRARY_PATH environment variable specifying the `odbc/bin.so` and `target/bin.so` directories:

> >         LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/eXtremeDB/odbc/bin.so/:/home/user/eXtremeDB/target/bin.so/

> - Run the unixODBC utility to check the ODBC data source:

> >         isql EXDB -v

## Connecting to a local database

> To initiate the local driver mode (connecting via shared memory) perform the following steps:

> - Start the xSQL utility to create an instance of an eXtremeDB database in shared memory:

> >         ./target/bin/xsql -dbname exdb -size 100M -shared -debug –i

> - Edit the ODBC DSN configuration file `~/.odbc.ini` as follows:

> >         [EXDB]
> >         Description     = eXtremeSQL data source
> >         Driver          = eXtremeSQL
> >         DATABASE        = exdb
> >         #SERVER          = localhost:5099

> - Export the LD_LIBRARY_PATH environment variable specifying the `odbc/bin.so` and `target/bin.so` directories:

> >         LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/eXtremeDB/odbc/bin.so/:/home/user/eXtremeDB/target/bin.so/

> - Run the unixODBC utility to check the ODBC data source:

> >         isql EXDB -v