ORAENV_ASK=NO; export ORAENV_ASK ORACLE_HOME=/dbi/oracle/11g; export ORACLE_HOME SASORA=V9; export SASORA PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/ccs/ bin:/opt/bin:$PATH; export PATH TMPDIR=/var/tmp; export TMPDIR LD_LIBRARY_PATH=/usr/openwin/lib:$ORACLE_HOME/ lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH TWO_TASK=oraclev11; export TWO_TASK
driver=sql;conopts=(driver=oracle; catalog=acat;uid=myuid;pwd=myPass9; path=oraclev11.abc.123.com:1521/ORA11G)
Option
|
Description
|
---|---|
CATALOG
|
CATALOG=catalog—identifier; Specifies an arbitrary
identifier for an SQL catalog, which groups logically related schemas.
Any identifier is valid such as
catalog=oracle_test .
You must specify a catalog. For the Oracle 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.
|
DRIVER
|
DRIVER=ORACLE ;
Identifies the data
service to which you want to connect, which is an Oracle database.
Note: You must specify the driver.
|
PATH
|
PATH=database-specification; Specifies the Oracle
connect identifier. A connect identifier can be a net service name,
a database service name, or a net service alias.
|
UID
|
UID=user-id; Specifies an optional
Oracle user ID. If the user ID contains blanks or national characters,
enclose it in quotation marks. If you omit an Oracle user ID and password,
the default Oracle user ID OPS$sysid is used,
if it is enabled.
|
PWD
|
PWD=password; Specifies an optional
Oracle database password that is associated with the Oracle user ID.
PWD= is
always used with UID= and the associated
password is case-sensitive. If you omit PWD= ,
the password for the default Oracle user ID OPS$sysid is
used, if it is active.
|
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:
|
||||||
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.
|
||||||
ORA_ENCODING
|
ORA_ENCODING=UNICODE; Specifies that the Oracle
data be returned in Unicode to table services.
UNICODE is
the default setting and is independent of the NLS_LANG environment
variable setting.
|
||||||
ORNUMERIC
|
ORANUMERIC=NO
| YES Specifies how numbers
that are read from or inserted into the Oracle NUMBER column are treated.
This option defaults to YES so that a NUMBER column with precision
or scale is described as
TKTS_NUMERIC . This
option can be specified as both a connection option and a table option.
When specified as both a connection and table option, the table option
value overrides the connection option.
|
||||||
USE_CACHED_CATALOG
|
USE_CACHED_CATALOG=YES
| NO; Specifies whether to
use the cached catalog rather than compiling a new catalog on every
run. Setting this option to YES can improve the performance of the
TKTSForeignKeys API. The default setting is YES.
Note: Before you can use this option,
you must complete the following steps:
|
USE_CACHED_CATALOG
is
set to YES above.
/*-----------------------SAS_CACHED_CATALOG.SQL--------------------------------*/ /* This script is used to create the materialized and the synonym needed to get the ForeignKey metadata. Work with your DBA to set this up. Materialized views can be complex and so thorough understanding will help us use them effectively. Especially deciding how to do the refreshes. Here we provide the simplest possible steps to create the required materialized view and the command to refresh it manually. The materialized view below can be created in any schema with any name. Feel free to add whatever REFRESH options suits your purpose. Note that you might need additional steps based on the REFRESH option setting. Here we provide the simplest possible way to do this. The PUBLIC synonym pointing to this Materialized view must be named "SAS_CACHED_FK_CATALOG_PSYN". This synonym must be visible to PUBLIC (or the set of users who will be needing Foreignkey metadata) so that it is accessible from any schema. */ Create materialized view SAS_CACHED_FK_CATALOG_MATVIEW REFRESH ON DEMAND as SELECT PKAC.OWNER as PKTABLE_SCHEM, PKAC.TABLE_NAME as PKTABLE_NAME, PKACC.COLUMN_NAME as PKCOLUMN_NAME, FKAC.OWNER as FKTABLE_SCHEM, FKAC.TABLE_NAME as FKTABLE_NAME, FKACC.COLUMN_NAME as FKCOLUMN_NAME, FKACC.POSITION as KEY_SEQ, FKAC.CONSTRAINT_NAME as FK_NAME, PKAC.CONSTRAINT_NAME as PK_NAME from sys.all_constraints PKAC, sys.all_constraints FKAC, sys.all_cons_columns PKACC, sys.all_cons_columns FKACC where FKAC.r_constraint_name=PKAC.constraint_name and FKAC.constraint_name=FKACC.constraint_name and PKAC.constraint_name=PKACC.constraint_name and PKAC.constraint_type='P' and FKAC.constraint_type='R' and FKAC.owner=FKACC.owner and PKAC.owner=PKACC.owner and PKAC.table_name=PKACC.table_name and FKAC.table_name=FKACC.table_name and FKACC.position = PKACC.position ; /* The synonym name *must* be SAS_CACHED_FK_CATALOG_PUBLIC_SYNONYM */ create public synonym SAS_CACHED_FK_CATALOG_PSYN for SAS_CACHED_FK_CATALOG_MATVIEW; grant all on SAS_CACHED_FK_CATALOG_PSYN to PUBLIC; /*---------Manual REFRESH of the Materialized View----------------------------*/ /* Note there are several ways to do this, consult with your DBA. Here are a couple of ways: */ execute DBMS_MVIEW.REFRESH('SAS_CACHED_FK_CATALOG_MATVIEW'); execute DBMS_SNAPSHOT.REFRESH('SAS_CACHED_FK_CATALOG_MATVIEW', '?'); |
Windows
|
The options are located
on the Advanced or Performance tabs
in the ODBC Administrator.
|
UNIX
|
The options are available
when you are 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.
|