export ODBCHOME=/dbi/odbc/dd7.1.4 export ODBCINI=/ODBC/odbc_714_MASTER.ini LD_LIBRARY_PATH=/dbi/odbc/dd7.1.4/lib:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:}
driver=sql;conopts=(driver=odbc; catalog=acat;conopts=(dsn=ODBCPgresDD;pwd=Tester2))
Option
|
Description
|
---|---|
CATALOG
|
CATALOG=catalog-identifier; Specifies an arbitrary
identifier for an SQL catalog, which groups logically related schemas.
For databases that do not support native catalogs, any identifier
is valid (for example, catalog=myodbc). For databases like Microsoft
SQL Server that do support native
catalogs, CATALOG= is not required. The connection defaults to CATALOG=*
unless you specify a logical name for the catalog and map it to the
native catalog name in the database. For example, to map the logical
catalog
mycat to the native catalog named newusers ,
use the following command: catalog=(mycat=newusers); .
Catalog name maps can be used only with FedSQL. They are not valid
with native SQL.
Note: The FedSQL language processor
automatically quotes SQL identifiers that do not meet the regular
naming convention as defined in SAS FedSQL Reference Guide.
|
CONOPTS
|
CONOPTS=(ODBC—compliant
database connection string); Specifies an ODBC-compliant
database connection string using ODBC-style syntax. These options,
combined with the ODBC_DSN option, must specify a complete connection
string to the data source. If you include a DSN= or FILEDSN= specification
within the CONOPTS= option, do not use the ODBC_DSN= connection option.
However, you can specify the ODBC database-specific connection options
by using CONOPTS=. Then you can specify an ODBC DSN that contains
other connection information by using the ODBC_DSN= connection option.
Here is an example string
using the CONOPTS option:
driver=sql;conopts=((driver=odbc;catalog=acat; conopts=(dsn=ODBCPgresDD;pwd=Tester2)); (driver=postgres;catalog=bcat;uid=myuid;pwd='123pass'; server=sv.abc.123.com;port=5432;DB=mydb;schema=public)) |
DRIVER
|
DRIVER=ODBC ;
Calls the table services
driver for ODBC. This specifies that the data service to which you
want to connect must be an ODBC-compliant database.
Note: DRIVER is a required option.
You must specify the driver.
|
ODBC_DSN
|
ODBC_DSN=odbc
dsn name Specifies a valid ODBC-compliant
database DSN that contains connection information for connecting to
the ODBC-compliant database. You can use the CONOPTS= option in addition
to ODBC_DSN= option to specify database-specific connection options
not provided by table services. Do not specify the ODBC DSN in both
CONOPTS= and ODBC_DSN=.
|
Option
|
Description
|
||||||
---|---|---|---|---|---|---|---|
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:
|
||||||
ENABLE_MARS
|
ENABLE_MARS=
NO|YES Enables or disables
the use of multiple active result sets (MARS) on Microsoft
SQL Server. FedSQL cannot permit transactions on top of Microsoft
SQL Server because Microsoft SQL Server allows only one cursor per
transaction. Set this option to YES so that FedSQL can allow transactions
under a given Microsoft SQL Server connection.
|
||||||
DEFAULT_ATTR
|
DEFAULT_ATTR=(attr=value;...) Used to specify connection
handle or statement handle attributes supported for initial connect-time
configuration, where
attr=value corresponds
to any of the following options:
|
||||||
DEFAULT_CURSOR_TYPE
|
DEFAULT_CURSOR_TYPE=FORWARD_ONLY
| KEYSET_DRIVEN | DYNAMIC | STATIC; Specifies a valid default
cursor type for new statements. These options are valid:
FORWARD_ONLY Specifies a non-scrollable
cursor that moves only forward through the result set. Forward-only
cursors are dynamic in that all changes are detected as the current
row is processed. If an application does not require scrolling, the
forward-only cursor retrieves data quickly, with the least amount
of overhead processing.
KEYSET_DRIVEN Specifies a scrollable
cursor that detects changes that are made to the values of rows in
the result set but that does not always detect changes to deletion
of rows and changes to the order of rows in the result set. A keyset-driven
cursor is based on row keys, which are used to determine the order
and set of rows that are included in the result set. As the cursor
scrolls the result set, it uses the keys to retrieve the most recent
values in the table.
It is sometimes helpful
to have a cursor that can detect changes in the rows of a result set.
A keyset-driven cursor uses a row identifier rather than caching the
entire row into memory. It therefore uses much less disk space than
other row caching mechanisms. Deleted rows can be detected when a
SELECT statement that references the bookmark, row ID, or key column
values fails to return a row.
DYNAMIC Specifies a scrollable
cursor that detects changes that are made to the rows in the result
set. All INSERT, UPDATE, and DELETE statements that are made by all
users are visible through the cursor. The dynamic cursor is good for
an application that must detect all concurrent updates that are made
by other users.
STATIC Specifies a scrollable
cursor that displays the result set as it existed when the cursor
was first opened. The static cursor provides forward and backward
scrolling. If the application does not need to detect changes but
requires scrolling, the static cursor is a good choice.
Note: The application can still
override this value, but if the application does not explicitly set
a cursor type, this value will be in effect
|
||||||
DRIVER_TRACE
|
DRIVER_TRACE='API
| SQL | ALL'; 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.
|
||||||
USER
|
USER=user-ID; Specifies the user ID
for logging on to the ODBC-compliant database, such as Microsoft SQL
Server, with a user ID that differs from the default ID.
Note: The alias is
UID= .
|
||||||
PASSWORD
|
PASSWORD=password; Specifies the password
that corresponds to the user ID in the database.
Note: The alias is
PWD= .
|
driver=sql;conopts=((driver=odbc;catalog=acat; conopts=(dsn=ODBCPgresDD;pwd=Tester2)); (driver=postgres;catalog=bcat;uid=myuid;pwd='123pass'; server=sv.abc.123.com;port=5432;DB=mydb;schema=public))
driver=odbc; uid=jfox; pw=mypw; odbc_dsn=mySQLdsn; catalog=(cat1=mycat; cat2=testcat; cat3=users;
Windows
|
The options are located
on the Advanced or Performance tabs
in the ODBC Administrator window.
|
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.
|