# CHAPTER 3: Configuration Parameters

## 3.1 Introduction

The Empress Connectivity (ODBC) Server can be started with the command:

      $EMPRESSPATH/bin/empsvadm odbc_server_name start -f odbc_server_configuration_file

This starts an Empress Connectivity (ODBC) Server. The server uses the following configuration files:

- Network Type Configuration File (the default is `$EMPRESSPATH/config/nettype.cfg`

- Network Server Configuration File (the default is `$EMPRESSPATH/config/netserver.cfg`

- Empress Connectivity (ODBC) Server Configuration File (This is an optional file while starting the Empress Connectivity (ODBC) Server)

- Empress Server Password File (This is a file which define the login name and password for Empress Server)

Successful start of an Empress Connectivity (ODBC) Server gives a "success message":

      server 'empodbcsv' : start request ok

Information about the status of the started server will also be shown. A sample is given in: [Sample Connectivity (ODBC) Server status information]

## 3.2 Network Configuration Files

The Empress Server Network Configurations are defined in Network Configuration Files. These are:

1. Network Type Configuration File, with the default in `EMPRESSPATH/config/nettype.cfg`
2. Network Server Configuration File, with the default in `$EMPRESSPATH/config/netserver.cfg`

Refer to Network Configuration for detailed information about these files.

## 3.3 Empress Connectivity (ODBC) Server Configuration File

The Empress Connectivity (ODBC) Server Configuration File is used to define the Empress ODBC connection information for each database. This is an option while starting Empress Connectivity (ODBC) Server. If this file is not specified, the Connectivity (ODBC) Server will use the default values. Here is an example:

              # GLOBAL SECTION.

              PRE_CHECK_DB = X

              PRE_OPEN_DB = X

              TRACEFILE=/tmp/global.out

              TRACELEVEL=1

              QUERY_TIMEOUT = 300

              MAX_ROWS = 0

              # LOCAL SECTION.

              MSODBCDB

                 NAME=testdb

                 LOCATION=/home/foo/testdb

                 PRE_OPEN_DB =

                 PRE_CHECK_DB =

                 PRE_OPEN_TABLE = table1

                 PRE_OPEN_TABLE = table2

                 QUERY_TIMEOUT = 3600

                 MAX_ROWS = 10

              MSODBCDBEND

              MSODBCDB

                 NAME=testdb2

                 LOCATION=/home/foo/testdb2

                 PRE_OPEN_DB =

                 PRE_CHECK_DB =

                 PRE_OPEN_TABLE = table3

                 PRE_OPEN_TABLE = table4

                 QUERY_TIMEOUT = 40

                 MAX_ROWS = 3600

              MSODBCDBEND

This file contains only one "global section" which defines the Empress ODBC connection attributes for all the databases. This file contains multiple "local section" which defines the Empress ODBC connection attributes for a specific database. Each "local section" starts from `MSODBCDB` and ends with `MSODBCDBEND` . The settings in the "local section" overwrite the settings in the "global section" for the specific database defined by the `NAME` attribute in the "local section".

TheEmpress Connectivity (ODBC) Server Configuration File uses the following format to set an entry

       configuration_attribute = value

To unset an entry, just leave it as:

       configuration_attribute =

In this file all spaces and tabs are ignored.

The followings are valid `configuration_attribute`:

| `PRE_CHECK_DB = x` If `PRE_CHECK_DB` is set, the Empress Connectivity (ODBC) Server will check to see if the database defined in the LOCAL SECTION is a valid database. If the database is not valid, the Empress Connectivity (ODBC) Server will fail and give out an error message.
| `PRE_OPEN_DB = x` If `PRE_OPEN_DB` is set, the Empress Connectivity (ODBC) Server will pre-open the tables in the database. This can improve the performance of the Empress ODBC Connection. Pre-open tables are defined in the "local section".
| `TRACEFILE = full_path_filename` If `TRACEFILE`is set, the Empress Connectivity (ODBC) Server will generate an ODBC trace log file for debugging purposes. This option should only be set when debugging.
| `TRACELEVEL =` trace_level_value `TRACELEVEL` can be set to a number from 0 to 3. "0" means no tracing. The more detailed information will be generated if a larger number is set.
| `QUERY_TIMEOUT = query_timeout_value` A `QUERY_TIMEOUT` setting corresponds to the number of seconds an ODBC client application waits for an SQL statement to execute, before returning to the application.
| `MAX_ROW = max_row_value` A `MAX_ROW` setting corresponds to the maximum number of rows (i.e. records) which is returned to the ODBC client application for a SELECT statement. "0" means all results.
| `NAME = database_name` `NAME` defines the logical database name.
| `LOCATION=physical_db_location` `LOCATION` specifies the physical location of database. If it is not set, the database specified in `NAME` will be treated as physical directory name.
| `PRE_OPEN_TABLE = table_name` `PRE_OPEN_TABLE` is used to set the pre-opened table name. Each database could have multiple `PRE_OPEN_TABLE` settings.

## 3.4 Empress Server Password File

Empress Server Password File is used to define the login name and password for Empress Connectivity (ODBC) Server. It also defines the access control list for each login. Please refer to Password File Utility for more detailed information.