After you install the driver, you configure data sources to connect to the database. See Chapter 1 “Quick Start Connect” for an explanation of different types of data sources. The data source contains connection options that allow you to tune the driver for specific performance. If you want to use a data source but need to change some of its values, you can either modify the data source or override its values at connection time through a connection string.
Data sources for UNIX and Linux are stored in the system information file (by default, odbc.ini). If you have a Motif GUI environment on Linux, you can configure and modify data sources through the DataDirect ODBC Data Source Administrator for Linux (the Linux ODBC Administrator) using a driver Setup dialog box. (See
“Configuration Through the Administrator” for a detailed explanation of the Administrator.)
If you do not have a GUI environment, you can configure and modify data sources directly by editing the odbc.ini file and storing default connection values there. See
“Configuration Through the System Information (odbc.ini) File” for detailed information about the specific steps necessary to configure a data source.
Table 8-1 lists driver connection string attributes that must be used in the odbc.ini file to set the value of the attributes. Note that only the long name of the attribute can be used in the file. The default listed in the table is the initial default value when the driver is installed.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in this section.
NOTE: This book shows dialog box images that are specific to Windows. If you are using the drivers in the Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear on the driver Setup dialog box tabs when you create a new data source. You can change these default values by modifying the data source. In the following procedure, the description of each tab is followed by a table that lists the connection options for that tab and their initial default values. This table links you to a complete description of the options and their connection string attribute equivalents. The connection string attributes are used to override the default values of the data source if you want to change these values at connection time.
where install_dir is the path to the product installation directory.
■
|
User DSN: If you are configuring an existing user data source, select the data source name and click Configure to display the driver Setup dialog box.
|
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver and click
Finish to display the driver Setup dialog box.
■
|
System DSN: If you are configuring an existing system data source, select the data source name and click Configure to display the driver Setup dialog box.
|
If you are configuring a new system data source, click Add to display a list of installed drivers. Select the driver and click
Finish to display the driver Setup dialog box.
■
|
File DSN: If you are configuring an existing file data source, select the data source file and click Configure to display the driver Setup dialog box.
|
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select a driver. Click
Advanced if you want to specify attributes; otherwise, click
Next to proceed. Specify a name for the data source and click
Next. Verify the data source information; then, click
Finish to display the driver Setup dialog box.
Translate: Click
Translate to display the Select Translator dialog box, which lists the translators specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
See “Using Security” for a general description of authentication and encryption and their configuration requirements.
See “OS Authentication” for a discussion of Oracle and SLL encryption.
See “Using Failover” for a general description of failover and its related connection options.
See “Using DataDirect Connection Pooling” for a general description of connection pooling.
See “Using DataDirect Bulk Load” for a general description of DataDirect Bulk Load.
If your application is already coded to use parameter array batch functionality, you can leverage DataDirect Bulk Load features through the Enable Bulk Load connection option. Enabling this option automatically converts the parameter array batch operation to use the database bulk load protocol.
If you are not using parameter array batch functionality, you can export data to a bulk load data file, verify the metadata of the bulk load configuration file against the structure of the target table, and bulk load data to a table. Use the following steps to accomplish these tasks.
Both a bulk data file and a bulk configuration file are produced by exporting a table. The configuration file has the same name as the data file, but with an XML extension. See
“Using DataDirect Bulk Load” for details about these files.
Table Name: A string that specifies the name of the source database table containing the data to be exported.
Export Filename: A string that specifies the path (relative or absolute) and file of the bulk load data file to which the data is to be exported. It also specifies the file name of the bulk configuration file. These files must not already exist; if one of both of them already exists, an error is returned.
Log Filename: A string that specifies the path (relative or absolute) and file name of the bulk log file. The log file is created if it does not exist. Events logged to this file are:
Error Tolerance: A value that specifies the number of errors to tolerate before an operation terminates. A value of 0 indicates that no errors are tolerated; the operation fails when the first error is encountered.
Warning Tolerance: A value that specifies the number of warnings to tolerate before an operation terminates. A value of 0 indicates that no warnings are tolerated; the operation fails when the first warning is encountered.
Code Page: A value that specifies the code page value to which the driver must convert all data for storage in the bulk data file. See
“Character Set Conversions” for more information.
Click Export Table to connect to the database and export data to the bulk data file or click
Cancel.
Click Export Table to connect to the database and export data to the bulk data file or click
Cancel.
Table Name: A string that specifies the name of the target database table into which the data is to be loaded.
Configuration Filename: A string that specifies the path (relative or absolute) and file name of the bulk configuration file.
Click Verify to verify table structure or click
Cancel.
The load operation can create a log file and can also create a discard file that contains rows rejected during the load. The discard file is in the same format as the bulk load data file. After fixing reported issues in the discard file, the bulk load can be reissued using the discard file as the bulk load data file.
Table Name: A string that specifies the name of the target database table into which the data is loaded.
Load Data Filename: A string that specifies the path (relative or absolute) and file name of the bulk data file from which the data is loaded.
Configuration Filename: A string that specifies the path (relative or absolute) and file name of the bulk configuration file.
Log Filename: A string that specifies the path (relative or absolute) and file name of the bulk log file. Specifying a value for Log Filename creates the file if it does not already exist. Events logged to this file are:
●
|
Total number of rows read
|
●
|
Message for each row that failed to load
|
●
|
Total number of rows successfully loaded
|
Discard Filename: A string that specifies the path (relative or absolute) and file name of the bulk discard file. Any row that cannot be inserted into database as result of bulk load is added to this file, with the last row rejected added to the end of the file.
Error Tolerance: A value that specifies the number of errors to tolerate before an operation terminates. A value of 0 indicates that no errors are tolerated; the operation fails when the first error is encountered.
Load Start: A value that specifies the first row to be loaded from the data file. Rows are numbered starting with 1. For example, when Load Start is 10, the first 9 rows of the file are skipped and the first row loaded is row 10. This option can be used to restart a load after a failure.
Read Buffer Size (KB): A value that specifies the size, in KB, of the buffer that is used to read the bulk data file for a bulk load operation.
Warning Tolerance: A value that specifies the number of warnings to tolerate before an operation terminates. A value of 0 indicates that no warnings are tolerated; the operation fails when the first warning is encountered.
Load Count: A value that specifies the number of rows to be loaded from the data file. The bulk load operation loads rows up to the value of Load Count from the file to the database. It is valid for Load Count to specify more rows than exist in the data file. The bulk load operation completes successfully when either the number of rows specified by the Load Count value has been loaded or the end of the data file is reached. This option can be used in conjunction with Load Start to restart a load after a failure.
Click Load Table to connect to the database and load the table or click
Cancel.
Optionally, click the Client Monitoring tab to specify additional data source settings.
See “Using Client Information” for additional information about client monitoring.
NOTE: If you are configuring alternate servers for use with the connection failover feature, be aware that the Test Connect button tests only the primary server, not the alternate servers.
11
|
Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect to the data source. You can change these defaults by using this procedure to reconfigure your data source. You can override these defaults by connecting to the data source using a connection string with alternate values.
|
If you want to use a connection string for connecting to a database, or if your application requires it, you must specify either a DSN (data source name), a File DSN, or a DSN-less connection in the string. The difference is whether you use the DSN=, FILEDSN=, or the DRIVER= keyword in the connection string, as described in the ODBC specification. A DSN or FILEDSN connection string tells the driver where to find the default connection information. Optionally, you may specify
attribute=value pairs in the connection string to override the default values stored in the data source.
DSN=data_source_name[;
attribute=value[;
attribute=value]...]
FILEDSN=filename.dsn[;
attribute=value[;
attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be entered in the connection string because the information is not stored in a data source.
DRIVER=[{]driver_name[}][;
attribute=value[;
attribute=value]...]
Table 8-1 lists the long and short names for each attribute, as well as the initial default value when the driver is first installed. You can specify either long or short names in the connection string.
8
|
Click OK to log on to the Oracle database installed on the server you specified and to update the values in the Registry.
|