[an error occurred while processing this directive]
Call Level Interface Guide and Reference
The keywords are listed in alphabetical order starting
with "APPENDAPINAME". They are also divided into
categories. Each of these categories is presented on a separate tab on
the CLI/ODBC Settings notebook, accessible from the Client Configuration
Assistant (not available on UNIX platforms).
Configuration Keywords by Category
CLI/ODBC Settings General Configuration
Keywords
General keywords.
Compatibility Configuration Keywords
The Compatibility set of options are used to define
DB2 behavior. They can be set to ensure that other applications are compatible
with DB2.
Data Type Configuration Keywords
The Data Type set of options are used to define
how DB2 reports and handles various data types.
Enterprise Configuration Keywords
The Enterprise set of options are used to maximize
the efficiency of connections to large databases.
Environment Configuration Keywords
The Environment set of options are used to define
the location of various files on the server and client machines.
Optimization Configuration Keywords
The Optimization set of options are used to speed
up and reduce the amount of network flow between the CLI/ODBC Driver and
the server.
Service Configuration Keywords
The Service set of options are used to help in
troubleshooting problems with CLI/ODBC connections. Some options can also
be used by programmers to gain a better understanding of how their CLI
programs are translated into calls to the server.
Transaction Configuration Keywords
The Transaction set of options are used to control
and speed up SQL statements used in the application.
APPENDAPINAME
-
Keyword Description:
-
Append the CLI/ODBC function name which generated an
error to the error message.
-
db2cli.ini Keyword Syntax:
-
APPENDAPINAME = 0 | 1
-
Default Setting:
-
Do NOT display DB2 CLI function name.
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
Usage Notes:
-
The DB2 CLI function (API) name that generated an error
is appended to the error message retrieved using SQLGetDiagRec()
or
SQLError(). The function name is enclosed in curly braces {
}.
For example,
[IBM][CLI Driver]" CLIxxxx: < text >
SQLSTATE=XXXXX {SQLGetData}"
-
0 = do NOT append DB2 CLI function name (default)
-
1 = append the DB2 CLI function name
This keyword is only useful for debugging.
ASYNCENABLE
-
Keyword Description:
-
Enable or disable the ability to execute queries asynchronously.
-
db2cli.ini Keyword Syntax:
-
ASYNCENABLE = 1 | 0
-
Default Setting:
-
Execute queries asynchronously.
-
DB2 CLI/ODBC Settings Tab:
-
Transaction
-
Equivalent Statement Attribute:
-
SQL_ATTR_ASYNC_ENABLE
-
Usage Notes:
-
This option allows you to enable or disable the ability
to execute queries asynchronously. This only benefits applications that
were written to take advantage of this feature. Disable it only if your
application does not function properly when enabled. It is placed in the
data source specific section of the db2cli.ini file.
-
1 = Execute queries asynchronously (default)
-
0 = Queries not executed asynchronously
Note: |
The CLI/ODBC driver will act as it did with previous
versions of DB2 that did not support asynchronous ODBC. |
BITDATA
-
Keyword Description:
-
Specify whether binary data types are reported as binary
or character data types.
-
db2cli.ini Keyword Syntax:
-
BITDATA = 1 | 0
-
Default Setting:
-
Report FOR BIT DATA and BLOB data types
as binary data types.
-
DB2 CLI/ODBC Settings Tab:
-
Data Type
-
Usage Notes:
-
This option allows you to specify whether ODBC binary
data types (SQL_BINARY, SQL_VARBINARY, SQL_LONGVARBINARY, and SQL_BLOB),
are reported as binary type data. IBM DBMSs support columns with binary
data types by defining CHAR, VARCHAR, and LONG VARCHAR columns with the
FOR BIT DATA attribute. DB2 Universal Database will also support
binary data via the BLOB data type (in this case it is mapped to a CLOB
data type).
Users may also need to set this option if they are
using a DB2 Version 1 application that retrieves (LONG) (VAR)CHAR data
into SQL_C_CHAR buffer. In DB2 Version 1, data is moved into the SQL_C_CHAR
buffer unchanged; starting in DB2 Version 2, the data is converted into
the ASCII representation of each hexadecimal nibble.
Only set BITDATA = 0 if you are sure that all columns
defined as FOR BIT DATA or BLOB contain only character data, and
the application is incapable of displaying binary data columns.
-
1 = report FOR BIT DATA and BLOB data
types as binary data types (default).
-
0 = report FOR BIT DATA and BLOB data
types as character data types.
CONNECTTYPE
-
Keyword Description:
-
Remote or Distributed unit of work.
-
db2cli.ini Keyword Syntax:
-
CONNECTTYPE = 1 | 2
-
Default Setting:
-
Remote unit of work
-
DB2 CLI/ODBC Settings Tab:
-
Transaction
-
See Also:
-
"SYNCPOINT"
-
Equivalent Connection Attribute:
-
SQL_ATTR_CONNECTTYPE
-
Usage Notes:
-
This option allows you to specify the default connect
type.
-
1 = Remote unit of work. Multiple concurrent connections,
each with its own commit scope. The concurrent transactions are not coordinated.
(default)
-
2 = Distributed unit of work. Coordinated connections
where multiple databases participate under the same distributed unit of
work. This setting works in conjunction with the SYNCPOINT setting to determine
if a Transaction Manager should be used.
CURRENTFUNCTIONPATH
-
Keyword Description:
-
Specify the schema used to resolve function references
and data type references in dynamic SQL statements.
-
db2cli.ini Keyword Syntax:
-
CURRENTFUNCTIONPATH = current_function_path
-
Default Setting:
-
See description below.
-
DB2 CLI/ODBC Settings Tab:
-
Environment
-
Usage Notes:
-
This keyword defines the path used to resolve function
references and data type references that are used in dynamic SQL statements.
It contains a list of one or more schema-names, where schema-names are
enclosed in double quotes and separated by commas.
The default value is "SYSIBM","SYSFUN",X where X is
the value of the USER special register delimited by double quotes. The
schema SYSIBM does not need to be specified. If it is not included in the
function path, then it is implicitly assumed as the first schema.
This keyword is used as part of the process for resolving
unqualified function references that may have been defined in a schema
name other than the current user's schema. The order of the schema names
determines the order in which the function names will be resolved. For
more information on function resolution, refer to the SQL Reference.
CURRENTPACKAGESET
-
Keyword Description:
-
Issue "SET CURRENT PACKAGESET schema" after every connect.
-
db2cli.ini Keyword Syntax:
-
CURRENTPACKAGESET = schema name
-
Default Setting:
-
The clause is not appended.
-
DB2 CLI/ODBC Settings Tab:
-
This keyword cannot be set using the CLI/ODBC Settings
notebook. The db2cli.ini file must be modified directly to make use of
this keyword.
-
Only Applicable when:
-
connecting to a DB2 for MVS/ESA v4.1 or later database.
-
Equivalent Connection Attribute:
-
SQL_ATTR_CURRENT_PACKAGE_SET
-
Usage Notes:
-
This option will issue the command "SET CURRENT PACKAGESET
schema" after every connect to a DB2 for MVS/ESA v4.1 or later database.
By default this clause is not appended.
This statement sets the schema name (collection identifier)
that will be used to select the package to use for subsequent SQL statements.
CLI/ODBC applications issue dynamic SQL statements.
Using this option you can control the privileges used to run these statements:
-
Choose a schema to use when running SQL statements from
CLI/ODBC applications.
-
Ensure the objects in the schema have the desired privileges
and then rebind accordingly.
-
Set the CURRENTPACKAGESET option to this schema.
The SQL statements from the CLI/ODBC applications will
now run under the specified schema and use the privileges defined there.
Refer to the SQL Reference for more information
on the SET CURRENT PACKAGESET command.
CURRENTSQLID
-
Keyword Description:
-
Specify the ID used in a SET CURRENT SQLID statement
sent to the DBMS upon a successful connect.
-
db2cli.ini Keyword Syntax:
-
CURRENTSQLID = current_sqlid
-
Default Setting:
-
No statement is issued.
-
DB2 CLI/ODBC Settings Tab:
-
Enterprise
-
Only Applicable when:
-
connecting to those DB2 DBMS's where SET CURRENT SQLID
is supported (such as DB2 for MVS/ESA).
-
Usage Notes:
-
Upon a successful connect, if this option is set, a SET
CURRENT SQLID statement is sent to the DBMS. This allows the end user and
the application to name SQL objects without having to qualify them by schema
name.
CURSORHOLD
-
Keyword Description:
-
Effect of a transaction completion on open cursors.
-
db2cli.ini Keyword Syntax:
-
CURSORHOLD = 1 | 0
-
Default Setting:
-
Selected--Cursors are not destroyed.
-
DB2 CLI/ODBC Settings Tab:
-
Transaction
-
Equivalent Statement Attribute:
-
SQL_ATTR_CURSOR_HOLD
-
Usage Notes:
-
This option controls the effect of a transaction completion
on open cursors.
-
1 = cursor hold, the cursors are not destroyed when the
transaction is committed (default).
-
0 = cursor no hold, the cursors are destroyed when the
transaction is committed.
Note: |
Cursors are always destroyed when transactions
are rolled back. |
This option affects the result returned by SQLGetInfo()
when called with SQL_CURSOR_COMMIT_BEHAVIOR or SQL_CURSOR_ROLLBACK_BEHAVIOR.
The value of CURSORHOLD is ignored if connecting to DB2 for VSE & VM
where cursor with hold is not supported.
You can use this option to tune performance. It can
be set to cursor no hold (0) if you are sure that your application:
-
Does not have behavior that is dependent on the SQL_CURSOR_COMMIT_BEHAVIOR
or the SQL_CURSOR_ROLLBACK_BEHAVIOR information returned via
SQLGetInfo(),
and
-
Does not require cursors to be preserved from one transaction
to the next.
The DBMS will operate more efficiently, as resources
no longer need to be maintained after the end of a transaction.
DB2DEGREE
-
Keyword Description:
-
Set the degree of parallelism for the execution of SQL
statements.
-
db2cli.ini Keyword Syntax:
-
DB2DEGREE = 0 | integer value from 1
to 32767 | ANY
-
Default Setting:
-
No SET CURRENT DEGREE statement is issued.
-
DB2 CLI/ODBC Settings Tab:
-
Optimization
-
Only Applicable when:
-
connecting to a cluster database system.
-
Usage Notes:
-
This option only applies to a DB2 Version 5 or later
server. If the value specified is anything other than 0 (the default) then
DB2 CLI will issue the following SQL statement after a successful connection:
SET CURRENT DEGREE value
This specifies the degree of parallelism for the execution
of the SQL statements. The database manager will determine the degree of
parallelism if you specify ANY.
For more information, see the SET CURRENT DEGREE statement
in the SQL Reference.
DB2ESTIMATE
-
Keyword Description:
-
Threshold for displaying CLI optimizer estimates after
SQL query statement preparation.
-
db2cli.ini Keyword Syntax:
-
DB2ESTIMATE = 0 | large positive number
-
Default Setting:
-
Estimates are not returned.
-
DB2 CLI/ODBC Settings Tab:
-
Optimization
-
Only Applicable when:
-
a GUI application accesses a DB2 Version 2 or later server.
-
Equivalent Connection Attribute:
-
SQL_ATTR_DB2ESTIMATE
-
Usage Notes:
-
This option determines whether DB2 CLI will display a
dialog box to report estimates returned by the DB2 optimizer at the end
of SQL query statement preparation.
-
0 = Estimates are not returned (default).
-
large positive number = The threshold above which DB2
CLI will display the window to report estimates. This value is compared
against the SQLERRD(4) field in the SQLCA associated with the PREPARE.
If the value in SQLERRD(4) is greater than DB2ESTIMATE, the estimates window
will appear.
The graphic window will display the optimizer
estimates, along with push buttons to allow users to choose whether they
wish to continue with subsequent execution of this query or cancel it.
The recommended value for DB2ESTIMATE is 60000.
This option is only relevant when connecting to a
DB2 version 2 or later database. In order for the window to appear, the
application must have a graphical interface.
If this option is used then the DB2 CLI/ODBC option
DEFERREDPREPARE will be considered off.
DB2EXPLAIN
-
Keyword Description:
-
Determines whether Explain snapshot and/or Explain table
information will be generated by the server.
-
db2cli.ini Keyword Syntax:
-
DB2EXPLAIN = 0 | 1 | 2 |
3
-
Default Setting:
-
Neither Explain snapshot nor Explain table information
will be generated by the server.
-
DB2 CLI/ODBC Settings Tab:
-
Optimization
-
Equivalent Connection Attribute:
-
SQL_ATTR_DB2EXPLAIN
-
Usage Notes:
-
This keyword determines whether Explain snapshot and/or
Explain table information will be generated by the server.
-
0 = both off (default)
A 'SET CURRENT EXPLAIN SNAPSHOT=NO' and a 'SET
CURRENT EXPLAIN MODE=NO' statement will be sent to the server to disable
both the Explain snapshot and the Explain table information capture facilities.
-
1 = Only Explain snapshot facility on
A 'SET CURRENT EXPLAIN SNAPSHOT=YES' and a 'SET
CURRENT EXPLAIN MODE=NO' statement will be sent to the server to enable
the Explain snapshot facility, and disable the Explain table information
capture facility.
-
2 = Only Explain table information capture facility on
A 'SET CURRENT EXPLAIN MODE=YES' and a 'SET CURRENT
EXPLAIN SNAPSHOT=NO' will be sent to the server to enable the Explain table
information capture facility and disable the Explain snapshot facility.
-
3 = Both on
A 'SET CURRENT EXPLAIN MODE=YES' and a 'SET CURRENT
EXPLAIN SNAPSHOT=YES' will be sent to the server to enable both the Explain
snapshot and the Explain table information capture facilities.
Explain information is inserted into Explain tables,
which must be created before the Explain information can be generated.
For more information on these tables, refer to the SQL Reference.
The current authorization ID must have INSERT privilege
for the Explain tables.
Option 1 is only valid when connecting to a DB2 Common
Server version 2.1.0 or later database; options 2 and 3 when connecting
to a DB2 Common Server version 2.1.1 or later database.
DB2OPTIMIZATION
-
Keyword Description:
-
Set the query optimization level.
-
db2cli.ini Keyword Syntax:
-
DB2OPTIMIZATION = integer value from 0 to 9
-
Default Setting:
-
No SET CURRENT QUERY OPTIMIZATION statement issued.
-
DB2 CLI/ODBC Settings Tab:
-
Optimization
-
Only Applicable when:
-
when connecting to a DB2 Version 2 server or later.
-
Usage Notes:
-
If this option is set then DB2 CLI will issue the following
SQL statement after a successful connection:
SET CURRENT QUERY OPTIMIZATION positive number
This specifies the query optimization level at which
the optimizer should operate the SQL queries. Refer to the SQL Reference
for the allowable optimization levels.
DBALIAS
-
Keyword Description:
-
Enables Data Source Names greater than 8 characters.
-
db2cli.ini Keyword Syntax:
-
DBALIAS = dbalias
-
Default Setting:
-
Use the DB2 database alias as the ODBC Data Source Name.
-
DB2 CLI/ODBC Settings Tab:
-
CLI/ODBC Settings General
-
Usage Notes:
-
This keyword allows for Data Source Names of greater
than 8 single byte characters. The Data Source Name (DSN) is the name,
enclosed in square brackets, that denotes the section header in the db2cli.ini
file (on platforms where this is an ASCII file). Typically, this section
header is the database alias name which has a maximum length of 8 bytes.
A user who wishes to refer to the data source with a longer, more meaningful
name, can place the longer name in the section header, and set this keyword
value to the database alias used on the CATALOG command. Here is an example:
; The much longer name maps to an 8 single byte character dbalias
[MyMeaningfulName]
DBALIAS=DB2DBT10
The end user can specify [MyMeaningfulName]
as the name of the data source on connect while the actual database alias
is
DB2DBT10.
In a 16-bit Windows ODBC environment, under the [ODBC
DATA SOURCES] entry in the ODBC.INI file, the following line
must also be updated with the long alias name (dbname).
< alias >=IBM DB2 ODBC DRIVER
DBNAME
-
Keyword Description:
-
Specify the database name to reduce the time it takes
for the application to query MVS table information.
-
db2cli.ini Keyword Syntax:
-
DBNAME = dbname
-
Default Setting:
-
Don't filter on the DBNAME column.
-
DB2 CLI/ODBC Settings Tab:
-
Enterprise
-
Only Applicable when:
-
connecting to DB2 for MVS/ESA.
-
See Also:
-
"SCHEMALIST", "TABLETYPE"
-
Usage Notes:
-
This option is only used when connecting to DB2 for MVS/ESA,
and only if (base) table catalog information is requested by the
application. If a large number of tables exist in the DB2 for MVS/ESA subsystem,
a
dbname can be specified to reduce the time it takes for the application
to query table information, and reduce the number of tables listed by the
application.
This value maps to the DBNAME column in the
DB2 for MVS/ESA system catalog tables. If no value is specified, or if
views, synonyms, system tables, or aliases are also specified via TABLETYPE,
only table information will be restricted; views, aliases, and synonyms
are not restricted with DBNAME. It can be used in conjunction with SCHEMALIST,
and TABLETYPE to further limit the number of tables
for which information will be returned.
DEFAULTPROCLIBRARY
-
Keyword Description:
-
Set default stored procedure library.
-
db2cli.ini Keyword Syntax:
-
DEFAULTPROCLIBRARY = < full path name >
-
Default Setting:
-
Do not add a default stored procedure library to stored
procedure calls.
-
DB2 CLI/ODBC Settings Tab:
-
Environment
-
Only Applicable when:
-
application is not using the stored procedure catalog
table.
-
Usage Notes:
-
This option should only be used on a temporary basis;
the stored procedure catalog table should be used instead. See the SQL
Reference for more information.
The library pointed to by this option will be used
in all stored procedure calls that do not already explicitly specify a
library. Because you are specifying a location on the server machine, you
must use the path format of that operating system, not of the client. For
more information, see the CALL statement in the SQL Reference.
For instance, if the stored procedures are located
on the server in the library file d:\terry\proclib\comstor, you could set
DEFAULTPROCLIBRARY to d:\terry\proclib\comstor, then call the stored procedure
func
without specifying a library. The resulting SQL statement sent would be:
CALL d:\terry\proclib\comstor!func
DEFERREDPREPARE
-
Keyword Description:
-
Minimize network flow by combining the PREPARE request
with the corresponding execute request.
-
db2cli.ini Keyword Syntax:
-
DEFERREDPREPARE = 0 | 1
-
Default Setting:
-
The prepare request will be delayed until the execute
request is sent.
-
DB2 CLI/ODBC Settings Tab:
-
Compatibility
-
Not Applicable when:
-
DB2ESTIMATE is set.
-
Equivalent Statement Attribute:
-
SQL_ATTR_DEFERRED_PREPARE
-
Usage Notes:
-
Defers sending the PREPARE request until the corresponding
execute request is issued. The two requests are then combined into one
command/reply flow (instead of two) to minimize network flow and to improve
performance.
The default behavior has changed from DB2 version
2. Deferred prepare is now the default and must be explicitly turned off
if required.
-
0 = Disable deferred prepare. The PREPARE request will
be executed the moment it is issued.
-
1 (default) = Enable deferred prepare. Defer the execution
of the PREPARE request until the corresponding execute request is issued.
If the target DB2 Common Server database or the
DDCS gateway does not support deferred prepare, the client disables deferred
prepare for that connection.
Note: |
When deferred prepare is enabled, the row and
cost estimates normally returned in the SQLERRD(3) and SQLERRD(4) of the
SQLCA of a PREPARE statement may become zeros. This may be of concern to
users who want to use these values to decide whether or not to continue
the SQL statement. |
This option is turned off if the CLI/ODBC option DB2ESTIMATE
is set to a value other than zero.
DISABLEMULTITHREAD
-
Keyword Description:
-
Disable Multithreading.
-
db2cli.ini Keyword Syntax:
-
DISABLEMULTITHREAD = 0 | 1
-
Default Setting:
-
Multithreading is enabled.
-
DB2 CLI/ODBC Settings Tab:
-
Compatibility
-
Usage Notes:
-
The CLI/ODBC driver is capable of supporting multiple
concurrent threads.
This option is used to enable or disable multi-thread
support.
-
0 = Multithreading is enabled (default).
-
1 = Disable Multithreading.
If multithreading is disabled then all calls for all
threads will be serialized at the process level. Use this setting for multithreaded
applications that require the serialized behavior of DB2 Version 2.
(This option is contained in the Common section of
the initialization file and therefore applies to all connections to DB2.)
EARLYCLOSE
-
Keyword Description:
-
Should the cursor associated with the connection be closed
early by the DB2 server when it encounters the end of the result set?
-
db2cli.ini Keyword Syntax:
-
EARLYCLOSE = 1 | 0
-
Default Setting:
-
EARLYCLOSE behavior is on.
-
DB2 CLI/ODBC Settings Tab:
-
Compatibility
-
Equivalent Statement Attribute:
-
SQL_ATTR_EARLYCLOSE
-
Usage Notes:
-
This option specifies whether or not the temporary cursor
on the server can be automatically closed, without closing the cursor on
the client, when the last record is sent to the client.
-
0 = Do not close the temporary cursor on the server early.
-
1 = Close the temporary cursor on the server early (default).
This saves the CLI/ODBC driver a network request
by not issuing the statement to explicitly close the cursor because it
knows that it has already been closed.
Having this option on will speed up applications that
make use of many small result sets.
The EARLYCLOSE feature is not used if either:
-
The statement disqualifies for blocking.
-
The cursor type is anything other than SQL_CURSOR_FORWARD_ONLY.
Note: |
Although this option can be set at any time,
the option value used is the one that exists when the statement is executed
(when the cursor is opened). |
GATEWAYVERSION
-
Keyword Description:
-
Specify DB2 Connect or DB2 DDCS gateway version being
used.
-
db2cli.ini Keyword Syntax:
-
GATEWAYVERSION = gateway version
-
Default Setting:
-
5
-
DB2 CLI/ODBC Settings Tab:
-
This keyword cannot be set using the CLI/ODBC Settings
notebook. The db2cli.ini file must be modified directly to make use of
this keyword.
-
Only Applicable when:
-
connecting to a data source through a DB2 Connect or
DB2 DDCS gateway.
-
Usage Notes:
-
This option is used to indicate to the DB2 CLI driver
which version of a DB2 Connect or DB2 DDCS gateway is being used. The CLI
driver can then use this information to maximize its interaction with the
data source (supporting stored procedures that return multiple result sets,
for instance).
5 = Indicates that a version 5 DB2 Connect gateway
is being used (default).
2 = Indicates that a version 2 DB2 DDCS gateway is
being used.
GRANTEELIST
-
Keyword Description:
-
Reduce the amount of information returned when the application
gets a list of table or column privileges.
-
db2cli.ini Keyword Syntax:
-
GRANTEELIST = " 'userID1', 'userID2',...
'userIDn' "
-
Default Setting:
-
Do not filter the results.
-
DB2 CLI/ODBC Settings Tab:
-
Enterprise
-
See Also:
-
"GRANTORLIST"
-
Usage Notes:
-
This option can be used to reduce the amount of information
returned when the application gets a list of privileges for tables in a
database, or columns in a table. The list of authorization IDs specified
is used as a filter; the only tables or columns that are returned are those
with privileges that have been granted TO those IDs.
Set this option to a list of one or more authorization
IDs that have been granted privileges, delimited with single quotes, and
separated by commas. The entire string must also be enclosed in double
quotes. For example:
GRANTEELIST=" 'USER1', 'USER2', 'USER8' "
In the above example, if the application gets a list
of privileges for a specific table, only those columns that have a privilege
granted TO USER1, USER2, or USER8 would be returned.
GRANTORLIST
-
Keyword Description:
-
Reduce the amount of information returned when the application
gets a list of table or column privileges.
-
db2cli.ini Keyword Syntax:
-
GRANTORLIST = " 'userID1', 'userID2',...
'userIDn' "
-
Default Setting:
-
Do not filter the results.
-
DB2 CLI/ODBC Settings Tab:
-
Enterprise
-
See Also:
-
"GRANTEELIST"
-
Usage Notes:
-
This option can be used to reduce the amount of information
returned when the application gets a list of privileges for tables in a
database, or columns in a table. The list of authorization IDs specified
is used as a filter; the only tables or columns that are returned are those
with privileges that have been granted BY those IDs.
Set this option to a list of one or more authorization
IDs that have granted privileges, delimited with single quotes, and separated
by commas. The entire string must also be enclosed in double quotes. For
example:
GRANTORLIST=" 'USER1', 'USER2', 'USER8' "
In the above example, if the application gets a list
of privileges for a specific table, only those columns that have a privilege
granted BY USER1, USER2, or USER8 would be returned.
GRAPHIC
-
Keyword Description:
-
Controls whether DB2 CLI reports the IBM GRAPHIC (double
byte character support) as one of the supported data types.
-
db2cli.ini Keyword Syntax:
-
GRAPHIC = 0 | 1 | 2 | 3
-
Default Setting:
-
GRAPHIC is not returned as a supported data type.
-
DB2 CLI/ODBC Settings Tab:
-
Data Type
-
Usage Notes:
-
This option controls how two related pieces of information
are returned by the application:
-
Whether DB2 CLI reports the IBM GRAPHIC (double byte
character support) as one of the supported data types when SQLGetTypeInfo()
is called.
SQLGetTypeInfo() lists the data types supported by
the DB2 database in the current connection.
-
What unit is used to report the length of graphic columns.
This applies to all DB2 CLI/ODBC functions that return length/precision
either on the output argument or as part of the result set.
-
0 = Do not report IBM GRAPHIC data type as a supported
type. Length of graphic columns returned as number of DBCS characters.
(default)
-
1 = Report IBM GRAPHIC data type as supported. Length
of graphic columns returned as number of DBCS characters.
-
2 = Do not report IBM GRAPHIC data type as a supported
type. Length of graphic columns returned as number of bytes. (This is needed
for
Microsoft Access** 1.1-J and Microsoft Query**-J.)
-
3 = Settings 1 and 2 combined. IBM GRAPHIC data type
reported as supported. Length of graphic columns returned as number of
bytes.
The default is that GRAPHIC is not returned since many
off the shelf applications do not recognize this data type and cannot provide
proper handling.
IGNOREWARNINGS
-
Keyword Description:
-
Ignore Warnings.
-
db2cli.ini Keyword Syntax:
-
IGNOREWARNINGS = 0 | 1
-
Default Setting:
-
Warnings are returned as normal.
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
See Also:
-
"WARNINGLIST"
-
Usage Notes:
-
On rare occasions an application will not correctly handle
warning messages. This option can be used to indicate that warnings from
the database manager are not to be passed on to the application.
-
0 = Warnings reported as usual (default).
-
1 = Database manager warnings are ignored, SQL_SUCCESS
is returned. Warnings from the DB2 CLI/ODBC driver are still returned;
many are required for normal operation.
Although this option can be used on its own, it can also
be used in conjunction with the WARNINGLIST CLI/ODBC
configuration keyword.
KEEPCONNECT
-
Keyword Description:
-
Number of connections to cache.
-
db2cli.ini Keyword Syntax:
-
KEEPCONNECT = 0 | positive integer
-
Default Setting:
-
Do not cache connections.
-
DB2 CLI/ODBC Settings Tab:
-
Transaction
-
Usage Notes:
-
0 = Do not cache database connections (default).
Setting this option to a value greater than zero can
speed up applications that constantly connect to and disconnect from the
same database using the same connection information.
Instead of closing the connection each time, then
re-opening it again, the CLI/ODBC driver will keep the connection open
and cache the connection information. When the request to connect to the
same database occurs a second time, the existing connection is used. This
saves the time, resources, and network flow to close the first connection,
as well as to re-open the second connection.
The value set for this option indicates the number
of database connections to cache. Although the maximum is limited only
by system resources, usually a value of 1 or 2 is sufficient for applications
that will benefit at all from this behavior.
KEEPSTATEMENT
-
Keyword Description:
-
Number of statement handles to cache.
-
db2cli.ini Keyword Syntax:
-
KEEPSTATEMENT = 5 | positive integer
-
Default Setting:
-
Cache 5 statement handles.
-
DB2 CLI/ODBC Settings Tab:
-
Optimization
-
Usage Notes:
-
By default, the memory required for 5 statement handles
is cached. When a statement handle is closed, the memory used for that
handle is not deallocated but is instead used when the next statement handle
is allocated.
The value set for this option determines how many
statement handles are cached. It can be set to less than 5 to explicitly
reduce the amount of memory used by the statement cache. It can be increased
above 5 to improve performance for applications that open, close, and then
re-open large sets of statements.
The maximum number of cached statement handles is
determined by system resources.
LOBMAXCOLUMNSIZE
-
Keyword Description:
-
Override default COLUMN_SIZE for LOB data types.
-
db2cli.ini Keyword Syntax:
-
LOBMAXCOLUMNSIZE = integer greater than zero
-
Default Setting:
-
2 Gigabytes (1G for DBCLOB)
-
DB2 CLI/ODBC Settings Tab:
-
Data Type
-
Only Applicable when:
-
LONGDATACOMPAT option is used.
-
See Also:
-
"LONGDATACOMPAT"
-
Usage Notes:
-
This will override the 2 Gigabyte (1G for DBCLOB) value
that is returned by
SQLGetTypeInfo() for the COLUMN_SIZE column
for SQL_CLOB, SQL_BLOB, and SQL_DBCLOB SQL data types. Subsequent CREATE
TABLE statements that contain LOB columns will use the column size value
you set here instead of the default.
LONGDATACOMPAT
-
Keyword Description:
-
Report LOBs as long data types or as large object types.
-
db2cli.ini Keyword Syntax:
-
LONGDATACOMPAT = 0 | 1
-
Default Setting:
-
Reference LOB data types as large object types.
-
DB2 CLI/ODBC Settings Tab:
-
Data Type
-
See Also:
-
"LOBMAXCOLUMNSIZE"
-
Equivalent Connection Attribute:
-
SQL_ATTR_LONGDATA_COMPAT
-
Usage Notes:
-
This option indicates to DB2 CLI what data type the application
expects when working with a database with large object (LOB) columns.
Database data type |
Large Objects (0--Default) |
Long Data Types (1) |
CLOB |
SQL_CLOB |
SQL_LONGVARCHAR |
BLOB |
SQL_BLOB |
SQL_LONGVARBINARY |
DBCLOB |
SQL_DBCLOB |
SQL_LONGVARGRAPHIC |
This option is useful when running ODBC applications
that cannot handle the large object data types.
The DB2 CLI/ODBC option LOBMAXCOLUMNSIZE
can be used in conjunction with this option to reduce the default size
declared for the data.
MAXCONN
-
Keyword Description:
-
Maximum number of connections allowed for each application.
-
db2cli.ini Keyword Syntax:
-
MAXCONN = 0 |
positive number
-
Default Setting:
-
As many connections as permitted by system resources.
-
DB2 CLI/ODBC Settings Tab:
-
Transaction
-
Equivalent Connection Attribute:
-
SQL_ATTR_MAXCONN
-
Usage Notes:
-
This option is used to specify the maximum number of
connections allowed for each CLI/ODBC application. This can be used as
a governor for the maximum number of connections an administrator may wish
to restrict each application to open. A value of 0 may be used to represent
no limit; that is, an application is allowed to open up as many
connections as permitted by the system resources.
On OS/2 and WIN32 platforms (Windows NT and Windows
95), if the NetBIOS protocol is in use, this value corresponds to the number
of connections (NetBIOS sessions) that will be concurrently set up by the
application. The range of values for OS/2 NetBIOS is 1 to 254. Specifying
0 (the default) will result in 5 reserved connections. Reserved
NetBIOS sessions cannot be used by other applications. The number of
connections specified by this parameter will be applied to any adapter
that the DB2 NetBIOS protocol uses to connect to the remote server (adapter
number is specified in the node directory for a NetBIOS node).
MODE
-
Keyword Description:
-
Default connect mode.
-
db2cli.ini Keyword Syntax:
-
MODE = SHARE | EXCLUSIVE
-
Default Setting:
-
SHARE
-
DB2 CLI/ODBC Settings Tab:
-
Transaction
-
Not Applicable when:
-
connecting to a DRDA database.
-
Usage Notes:
-
Sets the CONNECT mode to either SHARE or EXCLUSIVE. If
a mode is set by the application at connect time, this value is ignored.
The default is SHARE.
Note: |
EXCLUSIVE is not permitted for DRDA connections.
Refer to the SQL Reference for more information on the CONNECT statement. |
MULTICONNECT
-
Keyword Description:
-
How SQLConnect() requests are mapped to physical database
connections.
-
db2cli.ini Keyword Syntax:
-
MULTICONNECT = 0 | 1
-
Default Setting:
-
Each SQLConnect() request by the application
will result in a physical database connection.
-
DB2 CLI/ODBC Settings Tab:
-
Transaction
-
Usage Notes:
-
This option is used to specify how SQLConnect()
requests are mapped to physical database connections.
-
1 = Connections are not shared, multiple connections
are used (default) -- Each SQLConnect() request by the application
will result in a physical database connection.
-
0 = Connections are mapped to one physical connection,
one connection is used -- All connections for the application are mapped
to one physical connection. This may be used if the ODBC application runs
out of file handles because it uses so many connections. It can also be
useful for some applications that only read data from the database, and
for some applications that use autocommit.
Note: |
If MULTICONNECT is set off then all statements
are executed on the same connection and therefore in the same transaction.
This means that a rollback will roll back ALL statements on all connections.
Be sure that the application is designed to work with MULTICONNECT off
before doing so or the application may not operate correctly. |
OPTIMIZEFORNROWS
-
Keyword Description:
-
Append "OPTIMIZE FOR n ROWS" clause to every select statement.
-
db2cli.ini Keyword Syntax:
-
OPTIMIZEFORNROWS = integer
-
Default Setting:
-
The clause is not appended.
-
DB2 CLI/ODBC Settings Tab:
-
Optimization
-
Usage Notes:
-
This option will append the "OPTIMIZE FOR n ROWS" clause
to every select statement, where n is an integer larger than 0. If set
to 0 (the default) this clause will not be appended.
For more information on the effect of the OPTIMIZE
FOR n ROWS clause, refer to the Administration Guide.
PATCH1
-
Keyword Description:
-
Use work-arounds for known problems with ODBC applications.
-
db2cli.ini Keyword Syntax:
-
PATCH1 = { 0 | 1 | 2 | 4 | 8
| 16 | ... }
-
Default Setting:
-
Use no work-arounds.
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
See Also:
-
"PATCH2"
-
Usage Notes:
-
This keyword is used to specify a work-around for known
problems with ODBC applications. The value specified can be for none, one,
or multiple work-arounds. The patch values specified here are used in conjunction
with any PATCH2 values that may also be set.
Using the DB2 CLI/ODBC Settings notebook you can select
one or more patches to use. If you set the values in the db2cli.ini
file itself and want to use multiple patch values then simply add the values
together to form the keyword value. For example, if you want the patches
1, 4, and 8, then specify PATCH1=13.
-
0 = No work around (default)
The DB2 CLI/ODBC Settings notebook has a list of values.
Select the Service folder in the DB2 folder for information on how to update
this list of values. This information is also contained in the README
file (there will be no such section in the README if there are
no current patch values for that platform).
PATCH2
-
Keyword Description:
-
Use work-arounds for known problems with CLI/ODBC applications.
-
db2cli.ini Keyword Syntax:
-
PATCH2 = "patch value 1, patch value 2,
patch value 3, ..."
-
Default Setting:
-
Use no work-arounds
-
DB2 CLI/ODBC Settings Tab:
-
This keyword cannot be set using the CLI/ODBC Settings
notebook. The db2cli.ini file must be modified directly to make use of
this keyword.
-
See Also:
-
"PATCH1"
-
Usage Notes:
-
This keyword is used to specify a work-around for known
problems with CLI/ODBC applications. The value specified can be for none,
one, or multiple work-arounds. The patch values specified here are used
in conjunction with any PATCH1 values that may also be set.
When specifying multiple patches, the values are specified
in a comma delimited string (unlike the PATCH1 option where the values
are added together and the sum is used).
-
0 = No work around (default)
To set PATCH2 values 3, 4 and 8 you would specify:
PATCH2="3, 4, 8"
The PATCH2 values are contained in the README
file (there will be no such section in the README if there are
no current patch values for that platform).
POPUPMESSAGE
-
Keyword Description:
-
Pop up a message box every time CLI/ODBC generates an
error.
-
db2cli.ini Keyword Syntax:
-
POPUPMESSAGE = 0 | 1
-
Default Setting:
-
Do not display message box.
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
Only Applicable when:
-
running OS/2 or Windows applications.
-
See Also:
-
"SQLSTATEFILTER"
-
Usage Notes:
-
Pops up a message box every time DB2 CLI generates an
error that can be retrieved using SQLGetDiagRec() or SQLError().
Useful for debugging applications that do not report messages to users.
-
0 = do NOT display message box (default)
-
1 = display message box
PWD
-
Keyword Description:
-
Define default password.
-
db2cli.ini Keyword Syntax:
-
PWD = password
-
Default Setting:
-
None
-
DB2 CLI/ODBC Settings Tab:
-
CLI/ODBC Settings General
-
Usage Notes:
-
This password value is used if a password is not
provided by the application at connect time.
It is stored as plain text and is therefore not secure.
SCHEMALIST
-
Keyword Description:
-
Restrict schemas used to query table information.
-
db2cli.ini Keyword Syntax:
-
SCHEMALIST = " 'schema1', 'schema2',...
'schemaN' "
-
Default Setting:
-
None
-
DB2 CLI/ODBC Settings Tab:
-
Enterprise
-
Usage Notes:
-
SCHEMALIST is used to provide a more restrictive default,
and therefore improve performance, for those applications that list every
table in the DBMS.
If there are a large number of tables defined in the
database, a schema list can be specified to reduce the time it takes for
the application to query table information, and reduce the number of tables
listed by the application. Each schema name is case-sensitive, must be
delimited with single quotes, and separated by commas. The entire string
must also be enclosed in double quotes. For example:
SCHEMALIST="'USER1','USER2','USER3'"
For DB2 for MVS/ESA, CURRENT SQLID can also be included
in this list, but without the single quotes, for example:
SCHEMALIST="'USER1',CURRENT SQLID,'USER3'"
The maximum length of the string is 256 characters.
This option can be used in conjunction with DBNAME
and TABLETYPE to further limit the number of tables for which information
will be returned.
SQLSTATEFILTER
-
Keyword Description:
-
Do not pop up an error message for the defined SQLSTATES.
-
db2cli.ini Keyword Syntax:
-
SQLSTATEFILTER = " 'XXXXX', 'YYYYY', ...
"
-
Default Setting:
-
None
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
Only Applicable when:
-
POPUPMESSAGE option is turned on.
-
See Also:
-
"POPUPMESSAGE"
-
Usage Notes:
-
Use in conjunction with the POPUPMESSAGE
option. This prevents DB2 CLI from displaying errors that are associated
with the defined states.
Each SQLSTATE must be in upper case, delimited with
single quotes and separated by commas. The entire string must also be enclosed
in double quotes. For example:
SQLSTATEFILTER=" 'HY1090', '01504', '01508' "
SYNCPOINT
-
Keyword Description:
-
How commits and rollbacks are coordinated among multiple
database (DUOW) connections.
-
db2cli.ini Keyword Syntax:
-
SYNCPOINT = 1 | 2
-
Default Setting:
-
1 Phase commit.
-
DB2 CLI/ODBC Settings Tab:
-
Transaction
-
Only Applicable when:
-
default connect type set to Coordinated Connections (CONNECTTYPE=2)
-
See Also:
-
"CONNECTTYPE"
-
Equivalent Connection Attribute:
-
SQL_ATTR_SYNC_POINT
-
Usage Notes:
-
Use this option to specify how commits and rollbacks
will be coordinated among multiple database (DUOW) connections. It is only
relevant when the default connect type is set to Coordinated connections
(CONNECTTYPE = 2).
-
1 = ONEPHASE (default)
A Transaction Manager is not used to perform two
phase commit but one phase commit is used to commit the work done by each
database in a multiple database transaction.
-
2 = TWOPHASE
A Transaction Manager is required to coordinate
two phase commits among those databases that support this.
SYSSCHEMA
-
Keyword Description:
-
Indicates an alternative schema to be searched in place
of the SYSIBM (or SYSTEM, QSYS2) schemas.
-
db2cli.ini Keyword Syntax:
-
SYSSCHEMA = sysschema
-
Default Setting:
-
No alternatives specified.
-
DB2 CLI/ODBC Settings Tab:
-
Enterprise
-
Usage Notes:
-
This option indicates an alternative schema to be searched
in place of the SYSIBM (or SYSTEM, QSYS2) schemas when the DB2 CLI and
ODBC Catalog Function calls are issued to obtain system catalog information.
Using this schema name the system administrator can
define a set of views consisting of a subset of the rows for each of the
following system catalog tables:
DB2 Universal Database |
DB2 for MVS/ESA |
DB2 for VSE & VM |
OS/400 |
DB2 for AS/400 |
SYSTABLES |
SYSTABLES |
SYSCATALOG |
SYSTABLES |
SYSTABLES |
SYSCOLUMNS |
SYSCOLUMNS |
SYSCOLUMNS |
SYSCOLUMNS |
SYSCOLUMNS |
SYSINDEXES |
SYSINDEXES |
SYSINDEXES |
SYSINDEXES |
SYSINDEXES |
SYSTABAUTH |
SYSTABAUTH |
SYSTABAUTH |
|
SYSCST |
SYSRELS |
SYSRELS |
SYSKEYCOLS |
|
SYSKEYCST |
SYSDATATYPES |
SYSSYNONYMS |
SYSSYNONYMS |
|
SYSCSTCOL |
SYSPROCEDURES |
SYSKEYS |
SYSKEYS |
|
SYSKEYS |
SYSPROCPARMS |
SYSCOLAUTH |
SYSCOLAUTH |
|
SYSREFCST |
|
SYSFOREIGNKEYS |
|
|
|
|
SYSPROCEDURES 1 |
|
|
|
|
SYSDATABASE |
|
|
|
-
1 DB2 for MVS/ESA 4.1 only.
For example, if the set of views for the system catalog
tables is in the ACME schema, then the view for SYSIBM.SYSTABLES is ACME.SYSTABLES;
and SYSSCHEMA should then be set to ACME.
Defining and using limited views of the system catalog
tables reduces the number of tables listed by the application, which reduces
the time it takes for the application to query table information.
If no value is specified, the default is:
-
SYSCAT or SYSIBM on DB2 Universal Database
-
SYSIBM on DB2 for common server versions prior to 2.1,
DB2 for MVS/ESA and OS/400
-
SYSTEM on DB2 for VSE & VM
-
QSYS2 on DB2 for AS/400
This keyword can be used in conjunction with SCHEMALIST
and TABLETYPE (and DBNAME
on DB2 for MVS/ESA) to further limit the number of tables for which information
will be returned.
TABLETYPE
-
Keyword Description:
-
Define a default list of TABLETYPES returned when querying
table information.
-
db2cli.ini Keyword Syntax:
-
TABLETYPE = " 'TABLE' | ,'ALIAS' | ,'VIEW'
| , 'INOPERATIVE VIEW' | , 'SYSTEM TABLE' | ,'SYNONYM'
"
-
Default Setting:
-
No default list of TABLETYPES is defined.
-
DB2 CLI/ODBC Settings Tab:
-
Enterprise
-
Usage Notes:
-
If there is a large number of tables defined in the database,
a tabletype string can be specified to reduce the time it takes for the
application to query table information, and reduce the number of tables
listed by the application.
Any number of the values can be specified. Each type
must be delimited with single quotes, separated by commas, and in uppercase.
The entire string must also be enclosed in double quotes. For example:
TABLETYPE="'TABLE','VIEW'"
This option can be used in conjunction with DBNAME
and SCHEMALIST to further limit the number of
tables for which information will be returned.
TABLETYPE is used to provide a default for the DB2
CLI function that retrieves the list of tables, views, aliases, and synonyms
in the database. If the application does not specify a table type on the
function call, and this keyword is not used, information about all table
types is returned. If the application does supply a value for the tabletype
on the function call, then that argument value will override this keyword
value.
If TABLETYPE includes any value other than TABLE,
then the DBNAME keyword setting cannot be used to restrict information
to a particular DB2 for MVS/ESA database.
TEMPDIR
-
Keyword Description:
-
Define the directory used for temporary files associated
with LOB fields.
-
db2cli.ini Keyword Syntax:
-
TEMPDIR = < full path name >
-
Default Setting:
-
Use the system temporary directory.
-
DB2 CLI/ODBC Settings Tab:
-
Environment
-
Usage Notes:
-
When working with Large Objects (CLOBS, BLOBS, etc...),
a temporary file is often created on the client machine to store the information.
Using this option you can specify a location for these temporary files.
The system temporary directory will be used if nothing is specified.
The keyword is placed in the data source specific
section of the db2cli.ini file, and has the following syntax:
When a Large Object is accessed, an SQLSTATE of HY507
will be returned if the path name is invalid, or if the temporary files
cannot be created in the directory specified.
TRACE
-
Keyword Description:
-
Turn on the DB2 CLI/ODBC trace facility.
-
db2cli.ini Keyword Syntax:
-
TRACE = 0 | 1
-
Default Setting:
-
No trace information is captured.
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
See Also:
-
"TRACEFILENAME", "TRACEFLUSH",
"TRACEPATHNAME"
-
Equivalent Connection Attribute:
-
SQL_ATTR_TRACE
-
Usage Notes:
-
When this option is on (1), CLI/ODBC trace records are
appended to the file indicated by the TRACEFILENAME
configuration parameter or to files in the subdirectory indicated by the
TRACEPATHNAME configuration parameter.
For example, to set up a CLI/ODBC trace file that
is written to disk after each trace entry:
[COMMON]
TRACE=1
TRACEFILENAME=E:\TRACES\CLI\MONDAY.CLI
TRACEFLUSH=1
(This option is contained in the Common section of the
initialization file and therefore applies to all connections to DB2.)
TRACEFILENAME
-
Keyword Description:
-
File used to store the DB2 CLI/ODBC trace information.
-
db2cli.ini Keyword Syntax:
-
TRACEFILENAME = < Full file name >
-
Default Setting:
-
None
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
Only Applicable when:
-
the TRACE option is turned on.
-
See Also:
-
"TRACE", "TRACEFLUSH",
"TRACEPATHNAME"
-
Equivalent Connection Attribute:
-
SQL_ATTR_TRACEFILE
-
Usage Notes:
-
If the file specified does not exist, then it will be
created; otherwise, the new trace information will be appended to the end
of the file.
If the filename given is invalid or if the file cannot
be created or written to, no trace will occur and no error message will
be returned.
This option is only used when the TRACE option is
turned on. This will be done automatically when you set this option in
the CLI/ODBC Configuration utility.
See the TRACE option for
an example of using the various trace settings. The TRACEPATHNAME
option will be ignored if this option is set.
DB2 CLI trace should only be used for debugging purposes.
It will slow down the execution of the CLI/ODBC driver, and the trace information
can grow quite large if it is left on for extended periods of time.
(This option is contained in the Common section of
the initialization file and therefore applies to all connections to DB2.)
TRACEFLUSH
-
Keyword Description:
-
Force a write to disk after each CLI/ODBC trace entry.
-
db2cli.ini Keyword Syntax:
-
TRACEFLUSH = 0 | 1
-
Default Setting:
-
Do not write after every entry.
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
Only Applicable when:
-
the CLI/ODBC TRACE option option
is turned on.
-
See Also:
-
"TRACE", "TRACEFILENAME",
"TRACEPATHNAME"
-
Usage Notes:
-
Set this option on (TRACEFLUSH = 1) to force a write
to disk after each trace entry. This will slow down the trace process,
but will ensure that each entry is written to disk before the application
continues to the next statement.
This option is only used when the TRACE CLI/ODBC option
is turned on. See the TRACE option for an example.
(This option is contained in the Common section of
the initialization file and therefore applies to all connections to DB2.)
TRACEPATHNAME
-
Keyword Description:
-
Subdirectory used to store individual DB2 CLI/ODBC trace
files.
-
db2cli.ini Keyword Syntax:
-
TRACEPATHNAME = < Full subdirectory name >
-
Default Setting:
-
None
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
Only Applicable when:
-
the TRACE option is turned on.
-
Not Applicable when:
-
the TRACEFILENAME option is
turned on.
-
See Also:
-
"TRACE", "TRACEFILENAME",
"TRACEFLUSH"
-
Usage Notes:
-
Each thread or process that uses the same DLL or shared
library will have a separate DB2 CLI/ODBC trace file created in the specified
directory.
No trace will occur, and no error message will be
returned, if the subdirectory given is invalid or if it cannot be written
to.
This option is only used when the TRACE option is
turned on. This will be done automatically when you set this option in
the CLI/ODBC Configuration utility.
See the TRACE option for
an example of using the various trace settings. It will be ignored if the
DB2 CLI/ODBC option TRACEFILENAME is used.
DB2 CLI trace should only be used for debugging purposes.
It will slow down the execution of the CLI/ODBC driver, and the trace information
can grow quite large if it is left on for extended periods of time.
(This option is contained in the Common section of
the initialization file and therefore applies to all connections to DB2.)
TRANSLATEDLL
-
Keyword Description:
-
Indicate the location of DB2TRANS.DLL (which contains
codepage mapping tables).
-
db2cli.ini Keyword Syntax:
-
TRANSLATEDLL = X:\PATH\DB2TRANS.DLL
-
Default Setting:
-
No character set translation takes place.
-
DB2 CLI/ODBC Settings Tab:
-
Compatibility
-
Only Applicable when:
-
a Windows application connects to a DB2 Version 1 server.
-
See Also:
-
"TRANSLATEOPTION"
-
Equivalent Connection Attribute:
-
SQL_ATTR_TRANSLATE_LIB
-
Usage Notes:
-
Indicate the directory where the DB2 Client Application
Enabler for Windows or the Software Developers Kit for Windows has been
installed. DB2TRANS.DLL is the DLL that contains codepage mapping tables.
This keyword is used on 16-bit versions of Windows
when connecting to DB2 for OS/2 Version 1, or when using a version of DDCS
for OS/2 prior to Version 2.3 in conjunction with the TRANSLATEOPTION,
to provide proper mapping of NLS SBCS characters (such as the umlaut character
in German) to the corresponding characters in the Windows codepage 1004.
Note: |
This option is useful when a Windows application
connects to a downlevel server that does not support unequal codepage conversion
(such as DB2 Version 1). |
TRANSLATEOPTION
-
Keyword Description:
-
Define the codepage number of the database in DB2 Version
1.
-
db2cli.ini Keyword Syntax:
-
TRANSLATEOPTION = database codepage number
-
Default Setting:
-
None. Must be set if the TRANSLATEDLL option is specified.
-
DB2 CLI/ODBC Settings Tab:
-
Compatibility
-
Only Applicable when:
-
TRANSLATEDLL is set, and a Windows application connects
to DB2 Version 1.
-
See Also:
-
"TRANSLATEDLL"
-
Equivalent Connection Attribute:
-
SQL_ATTR_TRANSLATE_OPTION
-
Usage Notes:
-
Defines the codepage number of the database in DB2 Version
1 (it can be obtained by querying the database configuration parameters).
Specifying TRANSLATEDLL and TRANSLATEOPTION enables the translation of
characters from codepage number database codepage number to the
Windows 1004 codepage.
There are two supported values for database codepage
number: 437 and 850. If you specify any other values, a warning is
returned on the connect request indicating that translation is not possible.
Note: |
This option is useful when a Windows application
connects to a downlevel server that does not support unequal codepage conversion
(such as DB2 Version 1). |
TXNISOLATION
-
Keyword Description:
-
Set the default isolation level.
-
db2cli.ini Keyword Syntax:
-
TXNISOLATION = 1 | 2 | 4
| 8 | 32
-
Default Setting:
-
Read Committed (Cursor Stability)
-
DB2 CLI/ODBC Settings Tab:
-
Transaction
-
Equivalent Statement Attribute:
-
SQL_ATTR_TXN_ISOLATION
-
Usage Notes:
-
Sets the isolation level to:
-
1 = Read Uncommitted (Uncommitted read)
-
2 = Read Committed (Cursor stability) (default)
-
4 = Repeatable Read (Read Stability)
-
8 = Serializable (Repeatable read)
-
32 = (No Commit, DATABASE 2 for AS/400 only; this is
similar to autocommit)
The words in parentheses are IBM's terminology for the
equivalent SQL92 isolation levels. Note that no commit is not an
SQL92 isolation level and is supported only on DB2 for AS/400. Refer to
the SQL Reference for more information on isolation levels.
UID
-
Keyword Description:
-
Define default user ID.
-
db2cli.ini Keyword Syntax:
-
UID = userid
-
Default Setting:
-
None
-
DB2 CLI/ODBC Settings Tab:
-
CLI/ODBC Settings General
-
Usage Notes:
-
The specified userid value is used if a userid
is not provided by the application at connect time.
UNDERSCORE
-
Keyword Description:
-
Specify whether or not the underscore character "_" is
to be used as a wildcard character.
-
db2cli.ini Keyword Syntax:
-
UNDERSCORE = 1 | 0
-
Default Setting:
-
"_" acts as a wildcard.
-
DB2 CLI/ODBC Settings Tab:
-
Optimization
-
Usage Notes:
-
This option allows you to specify whether the underscore
character "_" is to be used as a wildcard character (matching any one character,
including no character), or to be used as itself. This option only affects
catalog function calls that accept search pattern strings.
-
1 = "_" acts as a wildcard (default)
The underscore is treated as a wildcard matching
any one character or none. For example, if two tables are defined as follows:
CREATE TABLE "OWNER"."KEY_WORDS" (COL1 INT)
CREATE TABLE "OWNER"."KEYWORDS" (COL1 INT)
The DB2 CLI catalog function call that returns table
information (SQLTables()) will return both of these entries if
"KEY_WORDS" is specified in the table name search pattern argument.
-
0 = "_" acts as itself
The underscore is treated as itself. If two tables
are defined as the example above, SQLTables() will return only
the "KEY_WORDS" entry if "KEY_WORDS" is specified in the table name search
pattern argument.
Setting this keyword to 0 can result in performance
improvement in those cases where object names (owner, table, column) in
the database contain underscores.
Note: |
This keyword only has an effect on DB2 common
server versions prior to Version 2.1. The ESCAPE clause for the LIKE predicate
can be used for subsequent versions and all other DB2 servers. For more
information on the ESCAPE clause, refer to the SQL Reference. |
WARNINGLIST
-
Keyword Description:
-
Specify which errors to downgrade to warnings.
-
db2cli.ini Keyword Syntax:
-
WARNINGLIST = " '
xxxxx', '
yyyyy',
..."
-
Default Setting:
-
Do not downgrade any SQLSTATEs.
-
DB2 CLI/ODBC Settings Tab:
-
Service
-
See Also:
-
"IGNOREWARNINGS"
-
Usage Notes:
-
Any number of SQLSTATEs returned as errors can be downgraded
to warnings. Each must be delimited with single quotes, separated by commas,
and in uppercase. The entire string must also be enclosed in double quotes.
For example:
WARNINGLIST=" '01S02', 'HY090' "
This option can be used in conjunction with the IGNOREWARNINGS
CLI/ODBC configuration keyword. If you also set IGNOREWARNINGS on then
any errors you downgrade to warnings will not be reported at all.
[ Top of Page | Previous
Page | Next
Page | Table
of Contents | Index
]
[ Jump to Library
main page | DB2
Universal Database | DB2
Server for VSE & VM (SQL/DS) | DB2
Server for OS/390 | DB2
common server ]
[ Browse DB2
Publications | Recent
Additions | Users'
Picks ]
[ Download DB2 Fix Packs
| DB2 Tools
| DB2 Information
| DB2 Demos
]
[ Help! How
to Search | Navigating
the Library | Debugging
Tips ]
[ Registers Users Log
On | Become
a Registered User ]
[ Feedback What
Do You Think? ]
[an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive]