AIX Bourne Shell $ LIBPATH=$INSTHOME/lib:$LIBPATH $ export LIBPATH C Shell $ setenv LIBPATH $INSTHOME/lib:$LIBPATH HP-UX and HP-UX for the Itanium Processor Family Architecture Bourne Shell $ SHLIB_PATH=$INSTHOME/lib:$SHLIB_PATH $ export SHLIB_PATH C Shell $ setenv SHLIB_PATH $INSTHOME/lib:$SHLIB_PATH Linux for Intel Architecture, Linux for x64, Solaris, and Solaris for x64 Bourne Shell $LD_LIBRARY_PATH=$INSTHOME/lib:$LD_LIBRARY_PATH $ export LD_LIBRARY_PATH C Shell $ setenv LD_LIBRARY_PATH $INSTHOME/lib:$LD_LIBRARY_PATH
driver=sql;conopts=(driver=db2;uid=myuid; pwd=Blue31;conopts=(DSN=MYDSN);CATALOG=TSSQL)
Option
|
Description
|
---|---|
CATALOG
|
CATALOG=catalog-identifer; Specifies an arbitrary
identifier for an SQL catalog, which groups logically related schemas.
Any identifier is valid (for example,
catalog=DB2 ).
You must specify a catalog. For the DB2 database, this is a logical
catalog name to use as an SQL catalog identifier.
Note: The FedSQL language processor
automatically quotes SQL identifiers that do not meet the regular
naming convention as defined in SAS FedSQL Reference Guide.
|
DATABASE|DB
|
DATABASE=database-specification; Specifies the name of
the DB2 database (for example,
database=sample, DB=sample ).
Note: You must specify a database
name.
|
DRIVER
|
DRIVER=DB2; Identifies the DB2 data
source to which you want to connect.
Note: You must specify the driver.
|
Option
|
Description
|
||||||
---|---|---|---|---|---|---|---|
CLIENT_ENCODING
|
CLIENT_ENCODING=encoding-value Used to specify the
encoding of the DB2CODEPAGE to the DB2 driver. When using this option,
you must also set the DB2CODEPAGE environment variable on the client.
When the encoding of
the DB2 client layer (stored in DBCODEPAGE) is different from the
encoding value of the DB2 operating system value, the DB2 client layer
attempts to convert incoming data to the DB2 encoding value that is
stored in DB2CODEPAGE. To prevent the client layer from converting
data incorrectly, you must first determine the correct value for DB2CODEPAGE
and then set the CLIENT_ENCODING= option to match the corresponding
encoding value in DB2CODEPAGE.
For example, suppose
you are storing Japanese characters in a DB2 database, and the client
machine where the DB2 driver is executing is a Windows machine that
is running CP1252 encoding. When the application tries to extract
the data into the table services driver, the DB2 client layer attempts
to convert these Japanese characters into Latin1 representation, which
does not contain Japanese characters. As a result, a garbage character
appears in order to indicate a failure in transcoding.
To resolve this situation,
you must first set the DB2CODEPAGE environment variable value to 1208
(the IBM code page value that matches UTF-8 encoding). That enables
you to specify that the DB2 client layer send the data to the application
in UTF-8 instead of converting it into Latin1. In addition, you must
specify the corresponding encoding value of DB2CODEPAGE because the
table services driver for DB2 cannot derive this information from
a DB2 session. For this particular Windows case, set the CLIENT_ENCODING=
option to the UTF-8 encoding in order to match the DB2CODEPAGE value
(1208) and also to specify the DB2CODEPAGE value to the DB2 driver.
However, changing the
value of DB2CODEPAGE affects all applications that run on that machine.
You should reset the value to the usual DB2CODEPAGE value, which was
derived when the database was created.
Note: Setting the DB2CODEPAGE value
or the CLIENT_ENCODING= value incorrectly can cause unpredictable
results. You should set these values only when a situation such as
the example above occurs.
Note: You can specify any valid
encoding value for CLIENT_ENCODING=option.
|
||||||
CT_PRESERVE
|
CT_PRESERVE=STRICT
| SAFE | FORCE | FORCE_COL_SIZE Enables users to control
how data types are mapped. Note that data type mapping is disabled
when CT_PRESERVE is set to STRICT. If the requested type does not
exist on the target database, an error is returned. Here are the options:
|
||||||
DEFAULT_ATTR
|
DEFAULT_ATTR=(attr=value;...) Used to specify connection
handle or statement handle attributes that are supported for initial
connect-time configuration, where
attr=value corresponds
to any of the following options:
|
||||||
DRIVER_TRACE
|
DRIVER_TRACE=’API
| SQL | ALL’; Requests tracing information,
which logs transaction records to an external file that can be used
for debugging purposes. The driver writes a record of each command
that is sent to the database to the trace log based on the specified
tracing level, which determines the type of tracing information. Here
are the tracing levels:
Default: Tracing
is not activated.
Note: If you activate tracing,
you must also specify the location of the trace log with DRIVER_TRACEFILE=.
Note that DRIVER_TRACEFILE= is resolved against the TRACEFILEPATH
set in ALTER SERVER. TRACEFILEPATH is relative to the server's
content root location.
(Optional) You can control
trace log formatting with DRIVER_TRACEOPTIONS=.
Interaction: You
can specify one trace level, or you can concatenate more than one
by including the | (OR) symbol. For example,
driver_trace='api|sql' generates
tracing information for API calls and SQL statements.
|
||||||
DRIVER_TRACEFILE
|
DRIVER_TRACEFILE=’filename’ ;
Used to specify the
name of the text file for the trace log. Include the filename and
extension in single or double quotation marks (for example,
driver_tracefile='\mytrace.log' ).
Default: The
default TRACEFILE location applies to a relative filename, and it
is placed relative to TRACEFILEPATH.
Requirement: DRIVER_TRACEFILE
is required when activating tracing using DRIVER_TRACE.
Interaction: (Optional)
You can control trace log formatting with DRIVER_TRACEOPTIONS=.
|
||||||
DRIVER_TRACEOPTIONS
|
DRIVER_TRACEOPTIONS=APPEND
| THREADSTAMP | TIMESTAMP; Specifies options in
order to control formatting and other properties for the trace log:
Default: The
trace log is overwritten with no thread identification or time stamp.
|
||||||
PASSWORD
|
PWD=password Specifies the password
for DB2.
|
||||||
UID
|
UID=user-id; Specifies the DB2 login
user ID.
|
Windows
|
The options are located
on the Advanced or Performance tabs
in the ODBC Administrator.
|
UNIX
|
The options are available
when configuring data sources using the ODBC Administrator tool. Values
can also be set by editing the
odbc.ini file
in which their data sources are defined.
|