The Gateway ADCs have a great many configuration options that are specified in the DP4 configuration file. Most of these are set on a per-database basis, though for some you can also set default values to be used for all databases. AUXWINST (the installation aid program for the ODBC Gateway ADC) will create a .INI file whose sections can be merged into your existing DP4 configuration file. Although geared to AUXWODBC this program may be useful for creating the corresponding information for the Oracle Gateway ADC.
Although AUXWINST will generate some of the information needed for the DP4 configuration file, it is very likely that you will want to edit this information, or override the the default value for one or more configuration options. For a full technical specification of the DP4 configuration file entries please refer to the appropriate sections of the Guide to DP4 configuration. Most of the links on this page are to relevant pages in this document, and will not work if it is not available.
The information in the .INI files created by AUXWINST is for the following sections:
[sql]
- this section is mandatory and contains one or more entries specifying the DP4 database to ODBC data source (or Oracle) connection details. When using AUXOWDBC you may never need to edit this section because you can run the installation aid program to specify new DP4 to ODBC data source connections and to amend existing ones. When using AUXORACL you must set this information up - the information set up by AUXWINST is not in the correct format.[sql.config DP4_database_name]
- this section allows you to configure the Gateway ADC on a per-database basis. The options that are configurable vary according to which Gateway ADC is used.[sql.remote DP4_database_name]
- this section allows you to override the default local/remote table scheme and specify whether tables are held on the non-DP4 database or the DP4 database.[sql.xlat DP4_database_name]
- this section allows you to specify name translation between a DP4 database and another database. Entries take the form: DP4_name=sql_name. The Gateway ADC uses this entries in this table to decide on the appropriate column name for a field on the DP4 databasesql.xlat2 DP4_database_name]
- this section allows you to specify name translation between another database and a DP4 database. Entries take the form: oem_name=DP4_name
. The DP4 SQL Engine uses entries in this table to translate names submitted to it. Entries in this table can be used to work around problems caused by third party software submitting incorrect column names to the DP4 SQL Engine.Use a text editor to merge the .INI file information generated into the DP4 configuration file.
As well as these sections entries in either [AUXWODBC], [ORACLE] or [SYBASE] sections sections are used to configure the various Gateway ADCs.
There are also several options in the [sql.config dbname] section that you can use to change the deafult behavior of the Gateway ADC in various ways, and you may wish to change some values in other sections as well (for diagnostic purposes for example). The [sql]
page has a useful summary of how all the various SQL related sections are used by different DP4 components.
The DP4 ODBC gateway generates table and field names for the SQL database which, by default, are the same as the names on the DP4 database.
In the case of fields which have a role, the SQL field name is "FIELD_ROLE". Multi-occurs fields are treated as several separate SQL fields with names, such as "FIELD_ROLE_0", "FIELD_ROLE_1" and so on.
If the names on the SQL database are not the same as on the DP4 database, you must supply a translation table to translate the DP4 names to the SQL names. This table is set up in the DP4 configuration file, in the [sql.xlat DP4_database_name]
section.
Each entry in the translation table takes the form DP4_name=sql_name
where DP4_name
is a table or field name formed as described above, and sql_name
is the name into which it is to be translated.
In DP4, names must be unique within the set of table and field names on the database. This may not be so in the foreign DBMS. However, the installation aid program detects duplicate names and automatically creates translation table entries to accommodate them, using the following naming convention:
sql_name@1=sql_name
for the first duplicate
sql_name@2=sql_name
for the second
sql_name@n=sql_name
for the nth
Note that the installation aid program changes any duplicate names in the COPYDB-format file to reflect the translation table entries it creates.
In DP4, names may be up to 16 characters in length. The installation aid program detects any names in the foreign database that exceed this limit and automatically creates translation table entries as follows:
truncated_sql_name=sql_name_over_16_characters_long
If the resulting truncated_sql_name would not be unique, in the same way as before, @1, @2 and so on is appended to the duplicates.
Entries in the [sql.config DP4_database_name]
section can be used to modify, role and field name order, role separator choice and occurs starting number.