Home

Oracle Database Gateway for ODBC User's Guide

image

Contents

1. 2 2 SOL Syntax iia a teen ea iet drei n re e e EE 2 3 WHERE CURRENT OF Clause ese es see se ese ee nennen enne ee ee ee ee ee nena seni Ge ee Ge tenni ia 2 3 CONNECT BY Clause toe HR EO OE EE eto 2 3 KADERS 2 3 EXPLAIN PLAN Statement seders ett ere eene Re Ree deine deer etre por iUd 2 3 Does not support CALLBACK links esse sesse se see ge iaie Be Ge e Re nennen nennen nnne 2 3 Known Problems uite ed bd E a Eb roes re teh D be s HE ed eon 2 3 Encrypted Format Boglti eon eei e ete e rane oci th eter tete 2 4 Date Arithmeti ee e See eee eee ete ee 2 4 A Data Type Conversion Mapping ODBC Data Types to Oracle Data Type iese se see ese se He ee Ee He He ee eene A 1 B Supported SQL Syntax and Functions Supported SOL Statements essei SA GR E Pe Se SA GERS Pe Se KA EREGAS De Se se B 1 BA ay EO OE N EE OR EO EE eie S B 1 INSERT EE tinc ee N TN O ee DE oUm La SIA DEM Be B 1 SELECT SS EE Ee ee re socked E ES B 2 UPDATE EG ee GR m een eee e eo pede ed Joes oat Ee B 2 Oracle Functions ineo A ETERNO B 2 C Data Dictionary Accessing the Non Oracle Data Dictionary iese sesse se se ee ge ge He ee He He ee ee He He ee nene nnne C 1 Views and Tables Supported by Oracle Database Gateway for ODBC cece C 1 Data Dictionary Mapping vii ree mettre RE etre rege et Tee ete ten dite C 2 Oracle Database Gateway for ODBC Data Dictionary Descriptions sss C 3 D
2. Name Type Value MAX TRANS NUMBER 0 INITIAL EXTENT NUMBER 0 NEXT EXTENT NUMBER 0 MIN EXTENTS NUMBER 0 MAX EXTENTS NUMBER 0 PCT INCREASE NUMBER 0 FREELISTS NUMBER 0 FREELIST GROUPS NUMBER 0 LOGGING VARCHAR2 3 NULL BACKED UP VARCHAR2 1 NULL NUM_ROWS NUMBER BLOCKS NUMBER EMPTY_BLOCKS NUMBER 0 AVG_SPACE NUMBER 0 CHAIN_CNT NUMBER 0 AVG_ROW_LEN NUMBER 0 AVG_SPACE_FREELIST_ NUMBER 0 BLOCKS NUM_FREELIST_BLOCKS NUMBER 0 DEGREE VARCHAR2 10 NULL INSTANCES VARCHAR2 10 NULL CACHE VARCHAR2 5 NULL TABLE LOCK VARCHAR2 8 NULL SAMPLE SIZE NUMBER 0 LAST ANALYZED DATE NULL PARTITIONED VARCHAR2 3 NULL IOT TYPE VARCHAR2 12 NULL TEMPORARY VARHCAR2 1 NULL SECONDARY VARCHAR 2 1 NULL NESTED VARCHAR2 3 NULL BUFFER POOL VARCHAR2 7 NULL ROW_MOVEMENT VARCHAR2 8 NULL GLOBAL_STATS VARCHAR2 3 NULL USER_STATS VARCHAR2 3 NULL DURATION VARCHAR2 15 NULL SKIP_CORRUPT VARCHAR2 8 NULL MONITORING VARCHAR2 3 NULL C 14 Oracle Database Gateway for ODBC User s Guide Views and Tables Supported by Oracle Database Gateway for ODBC Table C 26 USER USERS Name Type Value USERNAME VARCHAR2 30 USER ID NUMBER 0 ACCOUNT STATUS VARCHAR2 32 OPEN LOCK DATE EXPIRY DATE DEFAULT TABLESPAC Ei TEMPORARY TABLESPACE CREATED INITIAL_RSRC_ CONSUMER_GROUP EXTERNAL_NAME DATE DATE VARCHAR2 30 VARCHA
3. TE AUTOCOMMIT in the gateway initialization parameter file Any update is committed immediately Commit confirm is not allowed for the targets operating without logging Known Restrictions If you encounter incompatibility problems not listed in this section or in Known Problems on page 2 3 contact Oracle Support Services The following section describes the known restrictions BLOB and CLOB data cannot be read by pass through queries Updates or deletes that include unsupported functions within a WHERE clause are not allowed Does not support stored procedures Cannot participate in distributed transactions they support single site transactions only Does not support multithreaded agents Does not support updating LONG columns with bind variables Does not support rowids a COMMIT or ROLLBACK in PL SQL Cursor Loops Closes Open Cursors SOL Syntax COMMIT or ROLLBACK in PL SQL Cursor Loops Closes Open Cursors Any COMM T or ROLL BACK issued in a PL SQL cursor loop closes all open cursors which can result in the following error ORA 1002 fetch out of sequence To prevent this error move the COMMIT or ROLLBACK statement outside the cursor loop 2 2 Oracle Database Gateway for ODBC User s Guide Known Problems SQL Syntax This section lists restrictions on the following SOL syntax WHERE CURRENT OF Clause CONNECT BY Clause ROWID
4. Heterogeneous Services extend the Oracle SOL engine to recognize the SOL and procedural capabilities of the remote non Oracle system and the mappings required to obtain necessary data dictionary information Heterogeneous Services provides two types of translations the ability to translate Oracle SQL into the proper dialect of the non Oracle system as well as data dictionary translations that displays the metadata of the non Oracle system in the local format For situations where no translations are available native SOL can be issued to the non Oracle system using the pass through feature of Heterogeneous Services Heterogeneous Services also maintains the transaction coordination between Oracle and the remote non Oracle system See Also Oracle Database Heterogeneous Connectivity User s Guide for more information about Heterogeneous Services Oracle Database Gateway for ODBC Oracle Database Gateway for ODBC is intended for low end data integration solutions requiring the dynamic query capability to connect from an Oracle database to non Oracle systems Any data source compatible with the ODBC standards described in this chapter can be accessed using Oracle Database Gateway for ODBC The capabilities SOL mappings data type conversions and interface to the remote non Oracle system are contained in the gateway The gateway interacts with Heterogeneous Services to provide the transparent connectivity between Oracle and non Oracle systems
5. DEGREE VARCHAR2 10 NULL INSTANCES VARCHAR2 10 NULL CACHE VARCHAR2 5 NULL TABLE_LOCK VARCHAR2 8 NULL SAMPLE SIZE NUMBER 0 LAST ANALYZED DATE NULL PARTITIONED VARCHAR2 3 NULL IOT TYPE VARCHAR2 12 NULL TEMPORARY VARCHAR2 1 NULL SECONDARY VARCHAR2 1 NULL NESTED VARCHAR2 3 NULL BUFFER_POOL VARCHAR2 7 NULL ROW_MOVEMENT VARCHAR2 8 NULL GLOBAL_STATS VARCHAR2 3 NULL USER_STATS VARCHAR2 3 NULL DURATION VARHCAR2 15 NULL SKIP CORRUPT VARCHAR2 8 NULL MONITORING VARCHAR2 3 NULL Table C 12 ALL USERS Name Type Value USERNAME VARCHAR2 30 C 8 Oracle Database Gateway for ODBC User s Guide Views and Tables Supported by Oracle Database Gateway for ODBC Table C 12 Cont ALL USERS Name Type Value USER ID NUMBER 0 CREATED DATE NULL Table C 13 ALL VIEWS Name Type Value OWNER VARCHAR2 30 VIEW NAME VARCHAR2 30 TEXT LENGTH NUMBER 0 TEXT LONG NULL TYPE TEXT LENGTH NUMBER TYPE TEXT VARCHAR2 4000 NULL OID_TEXT_LENGTH NUMBER 0 OID_TEXT VARCHAR2 4000 NULL VIEW_TYPE_OWNER VARCHAR2 30 NULL VIEW TYPE VARCHAR2 30 NULL Table C 14 DICTIONARY Name Type Value TABLE_NAME VARCHAR2 30 COMMENTS VARCHAR2 4000 NULL Table C 15 DICT_COLUMNS Name Type Value T
6. warranties of any kind with respect to third party content products and services Oracle Corporation and its affiliates will not be responsible for any loss costs or damages incurred due to your access to or use of third party content products or services Contents PIGIOCB ii aie delete ta aia dd ste tete a sane cakes vii Audi nee sic aree eet e e Nin bbc ou Soe c d Mec tee eee vii Documentation Accessibility nece in titer aset be eie b idee i Be eese edd vii Related DOCUMEN tS x iei atado RU e vertisse bete oven viii Conyventlons PEER BE Ee ES BE GE ii viii 1 Introduction OVETVIEW E NO 1 1 Heterogeneous Services Technology eese eee eene enne 1 2 Oracle Database Gateway for ODBC ssssssssssseeeeee ene e en nene nennen nennen ens 1 2 Oracle Database Gateway for ODBC Architecture eee eene 1 2 Oracle and Non Oracle Systems on Separate Machines ssssssssssssss 1 3 Oracle and Non Oracle Systems on the Same Machine sse eee 1 4 ODBC Connectivity Requirements sss en enn nne eren nennen nn 1 5 2 Oracle Database Gateway for ODBC Features and Restrictions Using the Pass Through Feature sess eene ene n nennen nennen nennen ens 2 1 AUTO COMMIIT ees ese ee re eletti Ee ett reete A e ER e howe Hees EIER e eave ettet 2 2 Known Restrictions enseia eibi a 2 2 COMMIT or ROLLBACK in PL SQL Cursor Loops Closes Open Cursors
7. D 5 HS OPEN CURSORS initialization parameter D 5 HS RPC FETCH REBLOCKING initialization parameter D 6 HS RPC FETCH SIZE initialization parameter D 6 HS TIME ZONE initialization parameter D 7 Index 1 IFILE initialization parameter D 8 Initialization parameter file customizing D 1 INSERT statement B 1 K Known restrictions 2 2 O ODBC agents connectivity requirements 1 5 functions 1 5 ODBC connectivity data dictionary mapping C 2 ODBC driver 1 5 requirements 1 5 specifying path to library D 9 OLE DB connectivity data dictionary mapping C 2 Oracle Database Gateway for ODBC architecture 1 2 Oracle and non Oracle on same machine Oracle and non Oracle on separate machines 1 3 data dictionary translation support C 1 definition 1 2 DELETE statement B 2 INSERT statement B 2 non Oracle data dictionary access C 1 ODBC connectivity requirements 1 5 supported functions B 2 supported SOL syntax B 1 UPDATE statement B 2 P parameters gateway initialization file HS FDS FETCH ROWS D 9 R ROWID 2 3 S SELECT statement B 2 accessing non Oracle system C 1 I TRUNCATE statement B 1 U unsupported functions Oracle Database Gateway for ODBC B 2 Index 2 UPDATE statement B 2 V VARBINARY datatype 2 4 W WHERE CURRENT OF clause 2 3
8. EXPLAIN PLAN Statement WHERE CURRENT OF Clause UP DATE and DELETE statements with the WHERE CURRENT OF clause are not supported by the gateway because they rely on the Oracle ROWID implementation To update or delete a specific row through the gateway a condition style WHERE clause must be used CONNECT BY Clause The gateway does not support the CONNECT BY clause in a SELECT statement ROWID The Oracle ROWID implementation is not supported EXPLAIN PLAN Statement The EXPLAIN PLAN statement is not supported SOL Plus COPY Command with Lowercase Table Names You need to use double quotes to wrap around lowercase table names For example copy from tkhouser tkhouser inst1 insert loc tkhodept using select from tkhodept holink2 Database Links The gateway is not multithreaded and cannot support shared database links Each gateway session spawns a separate gateway process and connections cannot be shared See Also Appendix B Supported SQL Syntax and Functions for more information about restrictions on SOL syntax Does not support CALLBACK links Oracle Database Gateway for ODBC does not support CALLBACK links Trying a CALLBACK link with the gateway will return the following error message ORA 02025 All tables in the SQL statement must be at the remote database Known Problems This section describes known problems and includes sugg
9. Gateway for ODBC C 1 data dictionary views Oracle Database Gateway for ODBC C 1 data type VARBINARY 2 4 DELETE statement B 1 describe cache high water mark definition D 4 drivers ODBC 1 5 DROP statement B 1 E Encrypted format login 2 4 Error messages error tracing D 9 F fetch array size with HS FDS FETCH ROWS D 9 G gateway pass through feature 2 1 Index supported functions B 1 supported SOL syntax B 1 globalization support Heterogeneous Services D 4 GRANT statement B 1 H Heterogeneous Services defining maximum number of open cursors D 5 optimizing data transfer D 6 Oracle Database Gateway for ODBC architecture 1 2 definition 1 2 non Oracle data dictionary access C 1 ODBC connectivity requirements 1 5 supported functions B 2 supported SOL syntax B 1 supported tables C 1 setting global name D 4 specifying cache high water mark D 4 tuning internal data buffering D 6 tuning LONG data transfer D 5 HS_DB_NAME initialization parameter D 4 HS DESCRIBE CACHE HWM initialization parameter D 4 HS FDS CONNECT INFO D 8 HS FDS DEFAULT OWNER initialization parameter D 8 HS FDS FETCH ROWS parameter D 9 HS FDS RECOVERY PWD initialization parameter D 10 HS FDS SHAREABLE NAME initialization parameter D 9 HS FDS TRACE LEVEL initialization parameter D 9 enabling agent tracing D 2 HS LANGUAGE initialization parameter D 4 HS LONG PIECE TRANSFER SIZE initialization parameter
10. Initialization Parameters Initialization Parameter File Syntax sees eene enne D 1 Oracle Database Gateway for ODBC Initialization Parameters ee Ge Ge ee D 2 Initialization Parameter Description esses eee eene eene D 3 HS DB DOM ATN x ettet etae qu t Pen dr he re Bee geo acd eee de eerte D 3 HS5 DB INTERNAL NAME B onneni east Ee inteso denies d de eie edit plene D 3 HS DB NAM E RE ete eet e rct e e i Pt n eee A t e v TER EE De D 4 HS DESCRIBE CACHE WM linen eners a peti Pete avers Pitti e eerte gets D 4 HS LANGUAGE A nd inet dun tete EE RE rie HOD de Eaa D 4 Character Soma N EE EE EE N D 4 IE AE UR E D 5 MUS le SE DE D 5 HS LONG PIECE TRANSFER SIZE se se seven ee ee geb eoe ioien See boge koe irie aesa aa araea rea D 5 HS OPEN CURSOROS enn eee vee eere ese ye i ee Gee ak de ee eap ee Re eed ee oe D 5 HS RPE FETCHAREBLOCKING eti nette Rete Begeerte ederent D 6 le dak FETCH AAS RE EK OO ede D 6 HS TIME ZONE sumisa e inde rue bd uito ini bios Pre iet eds D 7 HS TRANSAGTIONCSMOPBEL sette tete D 7 MIA EE D D 8 HS EDS CONNEGETUINBO 5 titer Conti ee og Else e eed e eee ese Reg gen Re RE eke pe ER Nek eks BREER eed D 8 HS FDS DEFAULT OWNER ER AR EE tae hin qr ee rei dietas D 8 HS EDS TRACE LEVE SS SE ve te ce er emi a eee be Leite D 9 HS EDS SHAREABLE NAME ics iie testen ttn itte i d gee geag et eee e p iie D 9 HS EDS EETEH ROWS iiie ea es ederet eere e gee ee
11. NOT B 2 Oracle Database Gateway for ODBC User s Guide C Data Dictionary Data dictionary information is stored in the non Oracle system as system tables and is accessed through ODBC application programming interfaces APIs This appendix documents data dictionary translation support It explains how to access non Oracle data dictionaries describes how to use supported views and tables and explains data dictionary mapping This appendix contains the following topics a Accessing the Non Oracle Data Dictionary Views and Tables Supported by Oracle Database Gateway for ODBC Accessing the Non Oracle Data Dictionary Accessing a non Oracle data dictionary table or view is identical to accessing a data dictionary in an Oracle database You issue a SELECT statement specifying a database link The Oracle data dictionary view and column names are used to access the non Oracle data dictionary Synonyms of supported views are also acceptable For example the following statement queries the data dictionary table ALL USERS to retrieve all users in the non Oracle system SQL SELECT FROM all usersesidl When you issue a data dictionary access query the ODBC agent 1 Maps the requested table view or synonym to one or more ODBC APIs see Section Data Dictionary Mapping The agent translates all data dictionary column names to their corresponding non Oracle column names within the query 2 Sends the sequen
12. Oracle Database Gateway for ODBC Architecture To access the non Oracle data store using Oracle Database Gateway for ODBC the gateway works with an ODBC driver The driver that you use must be on the same machine as the gateway The non Oracle system can reside on the same machine as the Oracle database or on a different machine The gateway can be installed on the machine running the non Oracle system the machine running the Oracle database or on a third machine as a standalone Each configuration has its advantages and disadvantages The issues to consider when determining where to install the gateway are network traffic operating system platform availability hardware resources and storage Note The ODBC driver may require non Oracle client libraries even if the non Oracle database is located on the same machine Refer to your ODBC driver documentation for information about the requirements for the ODBC driver 1 2 Oracle Database Gateway for ODBC User s Guide Oracle Database Gateway for ODBC Architecture Oracle and Non Oracle Systems on Separate Machines Figure 1 1 shows an example of a configuration in which an Oracle and non Oracle database are on separate machines communicating through Oracle Database Gateway for ODBC The client connects to the non Oracle system through a network Figure 1 1 Oracle and Non Oracle Systems on Separate Machines Oracle Database Database Gateway for Clie
13. READ ONLY provides read access to the non Oracle database SINGLE SITE provides read and write access to the non Oracle database However the gateway cannot participate in distributed updates READ ONLY AUTOCOMMIT provides read access to the non Oracle database that do not have logging SINGLE SITE AUTOCOMMIT provides read and write access to the non Oracle database which do not have logging Any update is committed immediately and the gateway cannot participate in distributed updates Initialization Parameters D 7 Initialization Parameter Description IFILE Property Description Default value None Range of values Valid parameter file names Use the IFILE initialization parameter to embed another initialization file within the current initialization file The value should be an absolute path and should not contain environment variables The three levels of nesting limit do not apply See Also Oracle Database Reference HS FDS CONNECT INFO Property Description Default Value None Range of Values Not applicable HS FDS CONNECT INFO which describes the connection to the non Oracle system The default initialization parameter file already has an entry for this parameter The syntax for HS FDS CONNECT INFO for the gateway is as follows HS FDS CONNECT INFO dsn value where dsn value on Microsoft Windows is the name of the system DSN defined in the M
14. im mm ma me ma el 1 Non Oracle P System client 1 ee Non Oracle system Machine 1 17 Non Oracle 1 component In this configuration 1 A client connects to the Oracle database through Oracle Net 2 The Heterogeneous Services component of the Oracle database connects through Oracle Net to the gateway 3 Theagent communicates with the following non Oracle components An ODBC driver manager a An ODBC driver The driver then allows access to the non Oracle data store 4 Each user session receives its own dedicated agent process spawned by the first use in that user session of the database link to the non Oracle system The agent process ends when the user session ends 1 4 Oracle Database Gateway for ODBC User s Guide ODBC Connectivity Requirements Note The ODBC driver may require non Oracle client libraries even if the non Oracle database is located on the same machine Refer to your ODBC driver documentation for information about the requirements for the ODBC driver ODBC Connectivity Requirements To use Oracle Database Gateway for ODBC you must have an ODBC driver installed on the same machine as the gateway The ODBC driver manager and driver must meet the following requirements The following ODBC catalog functions must work inside a transaction SQLColumns SOLForeignKeys SOLGetFunctions SQLGetInfo SOLGetTypeInfo SOLPrimaryKeys SQLProcedure
15. in this section list Oracle data dictionary view names and the equivalent ODBC APIs used Table C 1 shows a list of all Oracle data dictionary view names supported by Oracle Database Gateway for ODBC Table C 1 Oracle Database Gateway for ODBC Data Dictionary Mapping View ODBC API ALL CATALOG SQLTables ALL_COL_COMMENTS SQLColumns ALL CONS COLUMNS ALL CONSTRAINTS SOLPrimaryKeys SQLForeignKeys SQLPrimaryKeys SQLForeignKeys ALL IND COLUMNS SOLStatistics ALL INDEXES SOLStatistics ALL OBJECTS SQLTables SQLProcedures SQLStatistics ALL TAB COLUMNS SQLColumns ALL_TAB_COMMENTS SQLTables ALL_TABLES SQLStatistics ALL_USERS SQLTables ALL_VIEWS SQLTables DICTIONARY SOLTables DICT COLUMNS SOLTables USER COL COMMENTS SOLColumns USER CONS COLUMNS SQLPrimaryKeys SQLForeignKeys USER CONSTRAINTS SQLPrimaryKeys SQLForeignKeys USER IND COLUMNS SOLStatistics USER INDEXES SOLStatistics USER OBJECTS SOLTables SQLProcedures SQLStatistics USER TABCOLUMNS SQLColumns USER TAB COMMENTS SQLTables USER TABLES SOLStatistics C 2 Oracle Database Gateway for ODBC User s Guide Views and Tables Supported by Oracle Database Gateway for ODBC Table C 1 Cont Oracle Database Gateway for ODBC Data Dictionary Mapping View ODBC API USER USERS SQLTables USER VIEWS SQLTables Oracle Database Gateway for ODBC Data Dictionary Descriptions The Oracle Database Gateway for ODBC data dictionary tables and v
16. use a telecommunications relay service TRS to call Oracle Support at 1 800 223 1711 An Oracle Support Services engineer will handle technical issues and provide customer support according to the Oracle service request process Information about TRS is available at http www fcc gov cgb consumerfacts trs html and a list of phone numbers is available at http www cc gov cgb dro trsphonebk html Related Documents For more information see the following documents a Oracle Database New Features Guide a Oracle Call Interface Programmer s Guide a Oracle Database Administrator s Guide Oracle Database Advanced Application Developer s Guide Oracle Database Concepts Oracle Database Performance Tuning Guide Oracle Database Error Messages Oracle Database Globalization Support Guide a Oracle Database Reference a Oracle Database SQL Language Reference Oracle Database Net Services Administrator s Guide a SQL Plus User s Guide and Reference Oracle Database Heterogeneous Connectivity User s Guide a Oracle Database Security Guide Many of the examples in this book use the sample schemas of the seed database which is installed by default when you install Oracle Refer to Oracle Database Sample Schemas for information on how these schemas were created and how you can use them yourself Conventions The following text conventions are used in this document viii Convention Meaning boldface italic monospace Bol
17. 0 COLUMN NAME VARCHAR2 4000 COLUMN POSITION NUMBER COLUMN LENGTH NUMBER DESCEND VARCHAR2 4 DESC or ASC C 10 Oracle Database Gateway for ODBC User s Guide Views and Tables Supported by Oracle Database Gateway for ODBC Table C 21 USER INDEXES Name Type Value INDEX NAME VARCHAR2 30 INDEX TYPE VARCHAR2 27 NULL TABLE OWNER VARCHAR2 30 TABLE_NAME VARCHAR2 30 TABLE_TYPE VARCHAR2 11 TABLE UNIQUENESS VARCHAR2 9 UNIQUE or NONUNIQUE COMPRESSION VARCHAR2 8 NULL PREFIX LENGTH NUMBER 0 TABLESPACE NAME VARCHAR2 30 NULL INI TRANS NUMBER 0 MAX TRANS NUMBER 0 INITIAL EXTENT NUMBER 0 NEXT EXTENT NUMBER 0 MIN EXTENTS NUMBER 0 MAX EXTENTS NUMBER 0 PCT INCREASE NUMBER 0 PCT THRESHOLD NUMBER 0 INCLUDE COLUMNS NUMBER 0 FREELISTS NUMBER 0 FREELIST GROUPS NUMBER 0 PCT FREE NUMBER 0 LOGGING VARCHAR2 3 NULL BLEVEL NUMBER 0 LEAF BLOCKS NUMBER 0 DISTINCT KEYS NUMBER AVG LEAF BLOCKS PER KEY NUMBER 0 AVG DATA BLOCKS PER KEY NUMBER 0 CLUSTERING FACTOR NUMBER 0 STATUS VARCHAR2 8 NULL NUM ROWS NUMBER 0 SAMPLE SIZE NUMBER 0 LAST ANALYZED DATE NULL DEGREE VARCHAR2 40 NULL INSTANCES VARCHAR2 40 NULL PARTITIONED VARCHAR2 3 NULL Data Dictionary
18. ABLESPACE NAME VARCHAR2 30 NULL INI_TRANS NUMBER 0 MAX TRANS NUMBER 0 INITIAL EXTENT NUMBER 0 NEXT EXTENT NUMBER 0 MIN EXTENTS NUMBER 0 MAX EXTENTS NUMBER 0 PCT INCREASE NUMBER 0 PCT THRESHOLD NUMBER 0 INCLUDE COLUMNS NUMBER 0 FREELISTS NUMBER 0 FREELIST GROUPS NUMBER 0 PCT FREE NUMBER 0 LOGGING VARCHAR2 3 NULL BLEVEL NUMBER 0 LEAF BLOCKS NUMBER 0 DISTINCT KEYS NUMBER AVG LEAF BLOCKS PER KEY NUMBER 0 AVG DATA BLOCKS PER KEY NUMBER 0 CLUSTERING FACTOR NUMBER 0 STATUS VARCHAR2 8 NULL NUM ROWS NUMBER 0 SAMPLE SIZE NUMBER 0 AST ANALYZED DATE NULL DEGREE VARCHAR2 40 NULL INSTANCES VARCHAR2 40 NULL PARTITIONED VARCHAR2 3 NULL TEMPORARY VARCHAR2 1 NULL GENERATED VARCHAR2 1 NULL SECONDARY VARCHAR2 1 NULL BUFFER_POOL VARCHAR2 7 NULL USER_STATS VARCHAR2 3 NULL DURATION VARCHAR2 15 NULL PCT_DIRECT_ACCESS NUMBER 0 ITYP_OWNER VARCHAR2 30 NULL Data Dictionary C 5 Views and Tables Supported by Oracle Database Gateway for ODBC Table C 7 Cont ALL INDEXES Name Type Value ITYP NAME VARCHAR2 30 NULL PARAMETERS VARCHAR2 1000 NULL GLOBAL STATS VARCHAR2 3 NULL DOMIDX STATUS VARCHAR2 12 NULL DOMIDX OPSTATUS VARCHAR2 6 NULL FUNCIDX STATUS VARCHAR2 8 NULL Table C 8 ALL OBJECTS Name Type Value OWNER VARCHAR2 30 OBJECT_NAME SUBOBJECT_NAM OBJECT ID DATA OBJECT Il OBJECT TYPE VAR
19. ABLE_NAME VARCHAR2 30 COLUMN NAME VARCHAR2 30 COMMENTS VARCHAR2 4000 NULL Table C 16 USER CATALOG Name Type Value TABLE NAME VARCHAR2 30 TABLE TYPE VARCHAR2 11 TABLE or VIEW or SYNONYM Table C 17 USER COL COMMENTS Name Type Value TABLE NAME VARCHAR2 30 COLUMN_NAMI La VARCHAR2 30 5 COMMENTS VARCHAR2 4000 NULL Data Dictionary C 9 Views and Tables Supported by Oracle Database Gateway for ODBC Table C 18 USER CONS COLUMNS Name Type Value OWNER VARCHAR2 30 CONSTRAINT NAME VARCHAR2 30 TABLE NAME VARCHAR2 30 COLUMN NAME VARCHAR2 4000 POSITION NUMBER Table C 19 USER CONSTRAINTS Name Type Value OWNER VARCHAR2 30 CONSTRAINT NAME VARCHAR2 30 CONSTRAINT TYPE VARCHAR2 1 RorP TABLE_NAME VARCHAR2 30 SEARCH_CONDITION LONG NULL R_OWNER VARCHAR2 30 R_CONSTRAINT_NAME VARCHAR2 30 DELETE_RULE VARCHAR2 9 CASCADE or NO ACTION or SET NULL STATUS VARCHAR2 8 NULL DEFERRABLE VARCHAR2 14 NULL DEFERRED VARCHAR2 9 NULL VALIDATED VARCHAR2 13 NULL GENERATED VARCHAR2 14 NULL BAD VARCHAR2 3 NULL RELY VARCHAR2 4 NULL LAST CHANGE DATE NULL Table C 20 USER IND COLUMNS Name Type Value INDEX NAME VARCHAR2 30 TABLE NAME VARCHAR2 3
20. C 11 Views and Tables Supported by Oracle Database Gateway for ODBC Table C 21 Cont USER INDEXES Name Type Value TEMPORARY VARCHAR2 1 NULL GENERATED VARCHAR2 1 NULL SECONDARY VARCHAR2 1 NULL BUFFER POOL VARCHAR2 7 NULL USER_STATS VARCHAR2 3 NULL DURATION VARHCAR2 15 NULL PCT_DIRECT_ACCESS NUMBER 0 ITYP OWNER VARCHAR2 30 NULL ITYP NAME VARCHAR2 30 NULL PARAMETERS VARCHAR2 1000 NULL GLOBAL STATS VARCHAR2 3 NULL DOMIDX STATUS VARCHAR2 12 NULL DOMIDX OPSTATUS VARCHAR2 6 NULL FUNCIDX STATUS VARCHAR2 8 NULL Table C C22 USER OBJECTS Name Type Value OBJECT NAME VARCHAR2 128 SUBOBJECT NAME VARCHAR2 30 NULL OBJECT ID NUMBER 0 DATA OBJECT ID NUMBER 0 OBJECT TYPE VARCHAR2 18 TABLE or VIEW or SYNONYM or INDEX or PROCEDURE CREATED DATE NULL LAST DDL TIME DATE NULL TIMESTAMP VARCHAR2 19 NULL STATUS VARCHAR2 7 NULL TEMPORARY VARCHAR 2 1 NULL GENERATED VARCHAR2 1 NULL SECONDARY VARCHAR2 1 NULL Table C 23 USER TABCOLUMNS Name Type Value TABLE_NAME VARCHAR2 30 COLUMN NAMI q VARCHAR2 30 DATA TYPI El VARCHAR2 106 DATA TYPE MOD VARCHAR2 3 NULL C 12 Oracle Database Gateway for ODBC User s Guide Views and Tables Supported by Oracle Database
21. CHAR2 30 VARCHAR2 30 NUMBI Ej NUMBE VARCHAR2 18 R R TABLE or VI SYNONYM or INDI EW or EX or PROCEDURE CREATED DATE NULL LAST_DDL_TIME DATE NULL TIMESTAMP VARCHAR2 19 NULL STATUS VARCHAR2 7 NULL TEMPORARY VARCHAR2 1 NULL GENERATED VARCHAR2 1 NULL SECONDARY VARCHAR2 1 NULL Table C 9 ALL TAB COLUMNS Name Type Value OWNER VARCHAR2 30 TABLE NAME VARCHAR2 30 COLUMN NAME VARCHAR2 30 DATA TYPE VARCHAR2 106 DATA TYPE MOD VARCHAR2 3 NULL DATA TYPE OWNER VARCHAR2 30 NULL DATA LENGTH NUMBER DATA PRECISION NUMBER DATA SCALE NUMBER NULLABLE VARCHAR 2 1 Y or N COLUMN ID NUMBER C 6 Oracle Database Gateway for ODBC User s Guide Views and Tables Supported by Oracle Database Gateway for ODBC Table C 9 Cont ALL TAB COLUMNS Name Type Value DEFAULT LENGTH NUMBER 0 DATA DEFAULT LONG NULL NUM DISTINCT NUMBER 0 OW VALUE RAW 32 NULL HIGH_VALUE RAW 32 NULL DENSITY NUMBER 0 NUM_NULLS NUMBER 0 NUM_BUCKETS NUMBER 0 AAST_ANALYZED DATE NULL SAMPLE_SIZE NUMBER 0 CHARACTER_SET_NAME VARCHAR2 44 NULL CHAR_COL_DEC_LENGTH NUMBER 0 GLOBA
22. Columns SQLProcedures SOLStatistics SQLTables a On Windows The ODBC driver must have compliance level to ODBC standard 3 0 For multi byte support the driver needs to meet ODBC standard 3 5 The ODBC driver and driver manager must conform to ODBC application program interface API conformance Level 1 or higher If the ODBC driver or driver manager does not support multiple active ODBC cursors the complexity of SOL statements that you can execute using Oracle Database Gateway for ODBC is restricted OnUNIX The ODBC driver manager must be installed on the same machine The ODBC driver must have compliance level to ODBC Standard 3 0 and have a conformance level 1 or higher If the ODBC driver works with an ODBC driver manager the ODBC driver manager must be compliant with ODBC Standard 3 0 or higher The ODBC driver must have compliance level to ODBC standard 3 0 For multi byte support the driver needs to meet ODBC standard 3 5 See Also Your ODBC driver documentation for dependencies on an ODBC driver manager and Oracle Database Concepts for more information on transaction isolation levels The ODBC driver you use must support all of the core SQL ODBC data types and must support SOL grammar level SQL 92 The ODBC driver should also expose the following ODBC APIs Introduction 1 5 ODBC Connectivity Requirements gt g ay as Bt ae E ME ELE E xo d A a ee a ECT da 2 b Mus
23. Documentation Accessibility Our goal is to make Oracle products services and supporting documentation accessible to all users including users that are disabled To that end our documentation includes features that make information available to users of assistive technology This documentation is available in HTML format and contains markup to facilitate access by the disabled community Accessibility standards will continue to evolve over time and Oracle is actively engaged with other market leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers For more information visit the Oracle Accessibility Program Web site at http www oracle com accessibility vii Accessibility of Code Examples in Documentation Screen readers may not always correctly read the code examples in this document The conventions for writing code require that closing braces should appear on an otherwise empty line however some screen readers may not always read a line of text that consists solely of a bracket or brace Accessibility of Links to External Web Sites in Documentation This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites Deaf Hard of Hearing Access to Oracle Support Services To reach Oracle Support Services
24. Gateway for ODBC Table C 23 Cont USER TABCOLUMNS Name Type Value DATA TYPE OWNER VARC NULL DATA LENGTH NUMBI DATA_PRECISION NUMBE DATA_SCALI NUMBI NULLABLE VAR Y or N COLUMN_ID NUMBE DEFAULT_LENGTH NUMBI LL DATA_DEFAUL LONG LL NUM_DISTINC1 NUMB LL OW_VALUE RAW 32 LI HIGH VALUI RAW 32 LL DENSITY NUMB NUM NULLS NUMBE NUM BUCKE NUMB AST ANA DATE LL SAMPLE SIZ NUMBI CHARACTER SET NAME VAR LL CHAR COL DECL LENGTH NUMBE GLOBAL STATS VARC LL USER STATS VARC LL AVG COL LJ NUMBI Table C 24 USER TAB COMMENTS Name Type TABLE NAM TABLE TYP COMMENTS VARCHAR2 30 VARCHAR2 11 VARCHAR2 4000 TABLE or VIEW Table C 25 USER TABLES Name Value TABLE NAM TABLESPACE NAME NULL CLUSTER NAM NULL IOT NAME NULL PCT FREE 0 PCT USED INI TRANS zZ zZ Data Dictionary C 13 Views and Tables Supported by Oracle Database Gateway for ODBC Table C 25 Cont USER TABLES
25. HS FDS REMOTE DB CHARSET is set to the corresponding non Oracle database character set For example HS FDS REMOTE DB CHARSET KO16KSC5601 HS FDS SQLLEN INTERPRETATION Property Description Default Value 64 Range of values 64 32 Syntax HS FDS SQLLEN INTERPRETATION 64 32 This parameter is only valid for 64 bit platforms ODBC standard specifies SQLLEN of internal ODBC construct being 64 bit on 64 bit platforms but some ODBC driver managers and drivers violate this convention and implement it as 32 bit In order for Oracle Database Gateway for ODBC to compensate their behavior you need to specify HS FDS SQLLEN INTERPRETATION 32 if you use these types of driver managers and driver HS FDS REPORT REAL AS DOUBLE Property Description Default Value FALSE Range of Values TRUE FALSE I Enables Oracle Database Gateway for ODBC treat SINGLE FLOAT PRECISION fields as DOUBLE FLOAT PRECISION fields D 10 Oracle Database Gateway for ODBC User s Guide A ALTER statement B 1 C character sets Heterogeneous Services D 4 CONNECT BY clause 2 3 CREATE statement B 1 D data definition language B 1 data dictionary contents with Oracle Database Gateway for ODBC C 1 mapping for Oracle Database Gateway for ODBC C 2 Oracle database name SQL Server name C 2 translation support for Oracle Database
26. LONG NULL R OWNER VARCHAR2 30 R CONSTRAINT NAME VARCHAR2 30 DELETE RULE VARCHAR2 9 CASCADE or NO ACTION or SET NULL STATUS VARCHAR2 8 NULL DEFERRABLE VARCHAR2 14 NULL DEFERRED VARCHAR2 9 NULL VALIDATED VARCHAR2 13 NULL GENERATED VARCHAR2 14 NULL BAD VARCHAR2 3 NULL RELY VARCHAR2 4 NULL LAST CHANGE DATE NULL Table C 6 ALL IND COLUMNS Name Type Value INDEX OWNER VARCHAR2 30 INDEX NAME VARCHAR2 30 TABLE OWNER VARCHAR2 30 TABLE NAME VARCHAR2 30 COLUMN NAME VARCHAR2 4000 COLUMN NUMBER POSITION COLUMN _ NUMBER LENGTH DESCEND VARCHAR2 4 DESC or ASC Table C 7 ALL INDEXES Name Type Value OWNER VARCHAR2 30 INDEX NAME VARCHAR2 30 INDEX TYPE VARCHAR2 27 NULL TABLE OWNER VARCHAR2 30 TABLE NAME VARCHAR2 30 TABLE TYPE CHAR 5 TABLE UNIQUENESS VARCHAR2 9 UNIQUE or NONUNIQUE C 4 Oracle Database Gateway for ODBC User s Guide Views and Tables Supported by Oracle Database Gateway for ODBC Table C 7 Cont ALL INDEXES Name Type Value COMPRESSION VARCHAR2 8 NULL PREFIX LENGTH NUMBER 0 T
27. L_STATS VARCHAR2 3 NULL USER_STATS VARCHAR 3 NULL AVG_COL_LEN NUMBER 0 Table C 10 ALL TAB COMMENTS Name Type Value OWNER VARCHAR2 30 TABLE NAME VARCHAR2 30 TABLE TYPE VARCHAR2 11 TABLE or VIEW COMMENTS VARCHAR2 4000 NULL Table C 11 ALL TABLES Name Type Value OWNER VARCHAR2 30 TABLE NAME VARCHAR2 30 TABLESPACE NAME VARCHAR2 30 NULL CLUSTER NAME VARCHAR2 30 NULL IOT NAME VARCHAR2 30 NULL PCT FREE NUMBER 0 PCT USED NUMBER 0 INI TRANS NUMBER 0 MAX TRANS NUMBER 0 INITIAL EXTENT NUMBER 0 NEXT EXTENT NUMBER 0 MIN EXTENTS NUMBER 0 Data Dictionary C 7 Views and Tables Supported by Oracle Database Gateway for ODBC Table C 11 Cont ALL TABLES Name Type Value MAX EXTENTS NUMBER 0 PCT INCREASE NUMBER 0 FREELISTS NUMBER 0 FREELIST GROUPS NUMBER 0 LOGGING VARCHAR2 3 NULL BACKED UP VARCHAR2 1 NULL NUM ROWS NUMBER BLOCKS NUMBER EMPTY BLOCKS NUMBER 0 AVG SPACE NUMBER 0 CHAIN CNT NUMBER 0 AVG ROW LEN NUMBER 0 AVG SPACE FREELIST NUMBER 0 BLOCKS NUM FREELIST BLOCKS NUMBER 0
28. MENTS ita A A A A A C 9 USER CONS COLUMNS vcd eli ttp race e RU RANG Oe saab EM RN ee we EE Ok C 10 USER CONSTRAINTS suspicacia bailes C 10 USER IND COLUMNS sical cat Sead conte MR rr on PUER M perra ete MO C 10 USER INDEXES iaa Resp seen as olan tU ape P persa AA N Ue deat C 11 USER OBJECTS EE NEE Een d iei ei ta N EE EE Rr EERE Set C 12 USER TABCOLUMENS citrato C 12 USER TAB COMMENTS ae coda otras ue orum ibi C 13 USER TABLES dia ed p AA dtd dE A C 13 USER USES E OE A S E n TOR METER DAR fe C 15 USER VIEWS unto EE EE bla C 15 vi Audience Preface This manual describes the Oracle Database Gateway for ODBC which enables Oracle client applications to access non Oracle systems data through Structured Query Language SQL The gateway with the Oracle database creates the appearance that all data resides on a local Oracle database even though the data can be widely distributed This preface covers the following topics Audience Documentation Accessibility Related Documents a Conventions This manual is intended for Oracle database administrators who perform the following tasks Installing and configuring the Oracle Database Gateway for ODBC Diagnosing gateway errors Using the gateway to access non Oracle system data Note You should understand the fundamentals of Oracle Database Gateways and the UNIX based platform before using this guide to install or administer the gateway
29. Oracle Database Gateway for ODBC User s Guide 11g Release 2 11 2 E12070 02 February 2010 ORACLE Oracle Database Gateway for ODBC User s Guide 11g Release 2 11 2 E12070 02 Copyright O 2007 2010 Oracle and or its affiliates All rights reserved Primary Author Maitreyee Chaliha Contributor Vira Goorah Juan Pablo Ahues Vasquez Peter Castro Charles Benet Peter Wong and Govind Lakkoju This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws Except as expressly permitted in your license agreement or allowed by law you may not use copy reproduce translate broadcast modify license transmit distribute exhibit perform publish or display any part in any form or by any means Reverse engineering disassembly or decompilation of this software unless required by law for interoperability is prohibited The information contained herein is subject to change without notice and is not warranted to be error free If you find any errors please report them to us in writing If this software or related documentation is delivered to the U S Government or anyone licensing it on behalf of the U S Government the following notice is applicable U S GOVERNMENT RIGHTS Programs software databases and related documentation and technical data delivered to U S Government customers are commercial computer soft
30. R2 30 DATE VARCHAR2 30 VARCHAR2 4000 NU NU Table C 27 USER VIEWS Name Type Value VIEW NAME VARCHAR2 30 TEXT LENGTH NUMBER 0 TEXT LONG NULL TYPE TEXT LENGTH NUMBER TYPE TEXT VARCHAR2 4000 NULL OID_TEXT_LENGTH NUMBER 0 OID_TEXT VARCHAR2 4000 NULL VIEW_TYPE_OWNER VARCHAR2 30 NULL VIEW_TYPE VARCHAR2 30 NULL Data Dictionary C 15 Views and Tables Supported by Oracle Database Gateway for ODBC C 16 Oracle Database Gateway for ODBC User s Guide D Initialization Parameters The Oracle database initialization parameters in the init ora file are distinct from gateway initialization parameters Set the gateway parameters in the initialization parameter file using an agent specific mechanism or set them in the Oracle data dictionary using the DBMS HS package The gateway initialization parameter file must be available when the gateway is started This appendix contains a list of the gateway initialization parameters that can be set for each gateway and their description It also describes the initialization parameter file syntax It includes the following sections Initialization Parameter File Syntax Oracle Database Gateway for ODBC Initialization Parameters Initialization Parameter Descriptions Initialization Pa
31. TO SECOND gt SQL_INTERVAL_HOUR INT Ei RVAL DAY TO SECOND E SOL_INTERVAL_MINUTE H Z 3 E ERVAL DAY TO SECOND SOL INTERVAL SECOND INT LT RVAL DAY TO SECOND gt SOL INTERVAL DAY TO INTERVAL DAY TO SECOND HOUR SOL INTERVAL DAY TO INTERVAL DAY TO SECOND i MINUTE SOL INTERVAL DAY TO INTERVAL DAY TO SECOND z SECOND SOL INTERVAL HOUR TO INTERVAL DAY TO SECOND x MINUTE SOL INTERVAL HOUR TO INTERVAL DAY TO SECOND z SECOND SOL INTERVAL MINUTE INTERVAL DAY TO SECOND TO SECOND SOL LONGVARBINARY LONG RAW z SQL_LONGVARCHAR LONG Note If an ANSI SQL implementation defines a large value for the maximum length of VARCHAR data it is possible that ANSI VARCHAR will map to SQL_ LONGVARCHAR and Oracle LONG SQL_NUMERIC p s NUMBER p s SQL_REAL FLOAT 24 SOL SMALLINT NUMBER 5 SOL TYPE TIME CHAR 15 SQL_TINYINT NUMBER 3 SQL_TYPE_DATE DATE SQL_TIMESTAMP DATE SQL_VARBINARY RAW SOL VARCHAR VARCHAR2 i SOL WCHAR NCHAR SOL WVARCHAR NVARCHAR SQL_WLONGVARCHAR LONG if Oracle DB Character Set Unicode Otherwise it is not supported SQL_BIT NUMBER 3 A 2 Oracle Database Gateway for ODBC User s Guide Supported SQL Syntax and Functions This appendix contains the following sections Supported SOL Statements Oracle Functions Supporte
32. able A 1 Mapping ODBC Data Types to Oracle Data Types Mapping ODBC Data Types to Oracle Data Types The Oracle Database Gateway for ODBC maps the data types used in ODBC compliant data sources to supported Oracle data types When the results of a query are returned the Oracle database converts the ODBC data types to Oracle data types For example the ODBC data type SOL TIMESTAMP is converted to Oracle s DATE data type If a table contains a column whose data type is not supported by Oracle Database Gateway for ODBC the column information is not returned to the Oracle database Table A 1 maps ODBC data types into Oracle data types Table A 1 Mapping ODBC Data Types to Oracle Data Types ODBC Oracle Comment SQL BIGINT NUMBER 19 0 SQL BINARY RAW SQL CHAR CHAR SQL DECIMAL p s NUMBER p s SQL DOUBLE FLOAT 53 SQL FLOAT FLOAT 53 SQL INTEGER NUMBER 10 Note It is possible under some circumstance for the INTEGER ANSI data type to map to Precision 38 but it usually maps to Precision 10 SOL INTERVAL YEAR INTERVAL YEAR TO MONTH SOL INTERVAL MONTH INTERVAL YEAR TO MONTH Data Type Conversion A 1 Mapping ODBC Data Types to Oracle Data Types Table A 1 Cont Mapping ODBC Data Types to Oracle Data Types ODBC Oracle Comment SOL INTERVAL YEAR TO INTERVAL YEAR TO MONTH MONTH SOL INTERVAL DAY H Z 3 E ERVAL DAY
33. agent set the HS FDS TRACE LEVEL initialization parameter as follows HS FDS TRACE LEVEL ON SET and PRIVATE are optional keywords You cannot use either as an initialization parameter name Most parameters are needed only as initialization parameters so you usually do not need to use the SET or PRIVATE keywords If you do not specify either SET or PRIVATE the parameter is used only as an initialization parameter for the agent SET specifies that in addition to being used as an initialization parameter the parameter value is set as an environment variable for the agent process Use SET for parameter values that the drivers or non Oracle system need as environment variables PRIVATE specifies that the initialization parameter should be private to the agent and should not be uploaded to the Oracle database Most initialization parameters should not be private If however you are storing sensitive information like a password in the initialization parameter file then you may not want it uploaded to the server because the initialization parameters and values are not encrypted when uploaded Making the initialization parameters private prevents the upload from happening and they do not appear in dynamic performance views Use PRIVATE for the initialization parameters only if the parameter value includes sensitive information such as a user name or password SET PRIVATE specifies that the param
34. ameter 7 hh mm Range of values for Any valid datetime format mask 7 hh mm Specifies the default local time zone displacement for the current SOL session The format mask hh mm is specified to indicate the hours and minutes before or after UTC Coordinated Universal Time formerly Greenwich Mean Time For example HS TIME ZONE hh mm HS TRANSACTION MODEL Property Description Default Value COMMIT CONFIRM Range of Values COMMIT CONFIRM READ ONLY READ ONLY AUTOCOMMIT SINGLE SITE SINGLE SITE AUTOCOMMIT Specifies the type of transaction model that is used when the non Oracle database is updated by a transaction The following values are possible COMMIT CONFIRM provides read and write access to the non Oracle database and allows the gateway to be part of a distributed update To use the commit confirm model the following items must be created in the non Oracle database Transaction log table The default table name is HS TRANSACTION LOG A different name can be set using the HS FDS TRANSACTION LOG parameter The transaction log table must be granted SELECT DELETE and INSERT privileges set to public Recovery account The account name is assigned with the HS_FDS_ RECOVERY ACCOUNT parameter Recovery account password The password is assigned with the HS_FDS_ RECOVERY PWD parameter
35. atements from the application to the non Oracle system using the DBMS HS PASSTHROUGH package Use the DBMS HS PASSTHROUGH package in a PL SQL block to specify the statement to be passed to the non Oracle system as follows DECLARE num rows INTEGER BEGIN num rows DBMS HS PASSTHROUGH EXECUTE IMMEDIATEGSYBS command END Where command cannot be one of the following BEGIN TRANSACTION a COMMIT ROLLBACK SAVE SHUTDOWN The DBMS_HS_PASSTHROUGH package supports passing bind values and executing ELECT statements ui Note TRUNCATE cannot be used in a pass through statement Oracle Database Gateway for ODBC Features and Restrictions 2 1 AUTO COMMIT Note Asa general rule it is recommended that you COMMIT after each DDL statement in the pass through especially when going to a Sybase database See Also Oracle Database PL SQL Packages and Types Reference and Chapter 3 of Oracle Database Heterogeneous Connectivity User s Guide for more information about the DBMS HS PASSTHROUGH package AUTO COMMIT Some non Oracle databases operate without logging If read only capability is desired under such environment you need to set HS TRANSACTION MODEL READ ONLY AUTOCOMMIT gateway parameter However if you still need to have update capability then set HS TRANSACTION MODEL SINGLE 1
36. ce of APIs to the non Oracle system 3 Possibly converts the retrieved non Oracle data to give it the appearance of the Oracle data dictionary table 4 Passes the data dictionary information from the non Oracle system table to Oracle Note The values returned when querying the Oracle Database Gateway for ODBC data dictionary may not be the same as those returned by the Oracle SOL Plus DESCRIBE command Views and Tables Supported by Oracle Database Gateway for ODBC Oracle Database Gateway for ODBC supports only the views and tables shown in Table C 1 Data Dictionary C 1 Views and Tables Supported by Oracle Database Gateway for ODBC If you use an unsupported view you receive an Oracle error message stating no rows were selected If you want to query data dictionary views using SELECT FROM DBA_ first connect as Oracle user SYSTEM or SYS Otherwise you receive the following error message ORA 28506 Parse error in data dictionary translation for s stored in s Using Oracle Database Gateway for ODBC queries of the supported data dictionary tables and views beginning with the characters ALL may return rows from the non Oracle system when you do not have access privileges for those non Oracle objects When querying an Oracle database with the Oracle data dictionary rows are returned only for those objects you are permitted to access Data Dictionary Mapping The tables
37. d SQL Statements DELETE INSERT Oracle Database Gateway for ODBC supports the following statements but only if the ODBC driver and non Oracle system can execute them and if the statements contain supported Oracle SOL functions m DELETE INSERT m SELECT m UPDATE With a few exceptions the gateway provides full support for Oracle DELETE INSERT SELECT and UPDATE statements The gateway does not support Oracle data definition language DDL statements No form of the Oracle ALTER CREATE DROP GRANT or TRUNCATE statements can be used Instead for ALTER CREATE DROP and GRANT statements use the pass through feature of the gateway if you need to use DDL statements against the non Oracle system database Note TRUNCATE cannot be used in a pass through statement See Also Oracle Database SQL Language Reference for detailed descriptions of keywords parameters and options The DELETE statement is fully supported However only Oracle functions supported by the non Oracle system can be used The INSERT statement is fully supported However only Oracle functions supported by the non Oracle system can be used Supported SQL Syntax and Functions B 1 Oracle Functions SELECT UPDATE The SELECT statement is fully supported with these exceptions a CONNECT BY condition a NOWAIT a START WITH condition m WHERE CURRENT OF The UPDATE statem
38. dface type indicates graphical user interface elements associated with an action or terms defined in text or the glossary Italic type indicates book titles emphasis or placeholder variables for which you supply particular values Monospace type indicates commands within a paragraph URLs code in examples text that appears on the screen or text that you enter 1 Overview Introduction This chapter introduces the challenge faced by organizations when running several different database systems It briefly covers Heterogeneous Services the technology that the Oracle Database Gateway for ODBC is based on To get a good understanding of generic gateway technology Heterogeneous Services and how Oracle Database Gateways fit in the picture reading the Oracle Database Heterogeneous Connectivity User s Guide first is highly recommended This chapter contains the following sections Overview Heterogeneous Services Technology Oracle Database Gateway for ODBC Oracle Database Gateway for ODBC Architecture ODBC Connectivity Requirements Heterogeneous data access is a problem that affects a lot of companies A lot of companies run several different database systems Each of these systems stores data and has a set of applications that run against it Consolidation of this data in one database system is often hard in large part because many of the applications that run against one database may not have an equival
39. ent is fully supported However only Oracle functions supported by the non Oracle system can be used Also you cannot have SQL statements in the subquery that refer to the same table name in the outer query Subqueries are not supported in the SET clause Oracle Functions All functions are evaluated by the non Oracle system after the gateway has converted them to the native SQL Only a limited set of functions are assumed to be supported by the non Oracle system Most Oracle functions have no equivalent function in this limited set Consequently although post processing is performed by the Oracle database Oracle Database Gateway for ODBC does not support many Oracle functions possibly impacting performance If an Oracle SQL function is not supported by Oracle Database Gateway for ODBC this function is not supported in DELETE INSERT or UPDATE statements In SELECT statements these functions are evaluated by the Oracle database and processed after they are returned from the non Oracle system If an unsupported function is used in a DELETE INSERT or UPDATE statement it generates the following Oracle error ORA 02070 database db_link_name does not support function in this context Oracle Database Gateway for ODBC assumes that ODBC driver provider that is being used supports the following minimum set of SQL functions AVG exp LIKE exp a COUNT MAX exp a MIN exp m
40. ent that runs against another Until such time as migration to one consolidated database system is made feasible it is necessary for the various heterogeneous database systems to interoperate Oracle Database Gateways provide the ability to transparently access data residing in a non Oracle system from an Oracle environment This transparency eliminates the need for application developers to customize their applications to access data from different non Oracle systems thus decreasing development efforts and increasing the mobility of the application Applications can be developed using a consistent Oracle interface for both Oracle and non Oracle systems Gateway technology is composed of two parts a component that has the generic technology to connect to a non Oracle system which is common to all the non Oracle systems called Heterogeneous Services and a component that is specific to the non Oracle system that the gateway connects to Heterogeneous Services in conjunction with the Oracle Database Gateways enable transparent access to non Oracle systems from an Oracle environment Introduction 1 1 Heterogeneous Services Technology Heterogeneous Services Technology Heterogeneous Services provides the generic technology for connecting to non Oracle systems As an integrated component of the database Heterogeneous Services can exploit features of the database such as the powerful SOL parsing and distributed optimization capabilities
41. estions for correcting them when possible If you have any questions or concerns about the problems contact Oracle Support Services The following known problems are described in this section Oracle Database Gateway for ODBC Features and Restrictions 2 3 Known Problems Encrypted Format Login Date Arithmetic Encrypted Format Login Oracle database no longer supports the initialization parameter DBLINK ENCRYPT LOGIN Up to version 7 3 this parameter s default TRUE value prevented the password for the login user ID from being sent over the network in the clear Later versions automatically encrypt the password Date Arithmetic The following SOL expressions do not function correctly with the gateway date number number date date number datel date2 Statements with the preceding expressions are sent to the non Oracle system without any translation If the non Oracle system does not support these date arithmetic functions then the statements return an error 2 4 Oracle Database Gateway for ODBC User s Guide A Data Type Conversion Oracle maps ODBC data types to supported Oracle data types When the results of a query are returned Oracle converts the ODBC data types to Oracle data types The tables in this appendix show how Oracle maps ODBC data types to supported Oracle data types when it is retrieving data from a non Oracle system This appendix contains the following table T
42. eter value is set as an environment variable for the agent process and is also private not transferred to the Oracle database not appearing in dynamic performance views or graphical user interfaces Oracle Database Gateway for ODBC Initialization Parameters This section lists all the initialization file parameters that can be set for the Oracle Database Gateway for ODBC They are as follows HS DB DOMAIN HS DB INTERNAL NAME HS DB NAME HS DESCRIBE CACHE HWM HS LANGUAGE HS LONG PIECE TRANSFER SIZE HS OPEN CURSORS HS RPC FETCH REBLOCKING HS RPC FETCH SIZE D 2 Oracle Database Gateway for ODBC User s Guide Initialization Parameter Description a HS FDS SHAREABLE NAME a HS TIME ZONE a IFILE a HS FDS CONNECT INFO a HS FDS DEFAULT OWNER a HS FDS TRACE LEVEL a HS TRANSACTION MODEL a HS FDS FETCH ROWS a HS FDS REMOTE DB CHARSET a HS FDS SOLLEN INTERPRETATION a HS FDS REPORT REAL AS DOUBLE Initialization Parameter Description The following sections describe all the initialization file parameters that can be set for gateways HS DB DOMAIN Property Description Default value WORLD Range of values 1 to 199 characters Specifies a unique network sub address for a non Oracle system The H8 DB DOMAIN initialization parameter is similar to the DB DOMAIN initialization parameter described in the Oracle Database Reference The HS DB DOMAIN initialization parameter is required if you use the Orac
43. hose format is HS FDS SHAREABLE NAME odbc installation path lib libodbc sl Where odbc installation pathis the path where the ODBC driver is installed This parameter applies only to UNIX based platforms HS FDS FETCH ROWS Property Description Default Value 100 Range of Values Any integer between 1 and 1000 Syntax HS FDS FETCH ROWS num HS FDS FETCH ROWS specifies the fetch array size This is the number of rows to be fetched from the non Oracle database and to return to Oracle database at one time This parameter will be affected by the HS RPC FETCH SIZE and HS_RPC_FETCH_ REBLOCKING parameters Initialization Parameters D 9 Initialization Parameter Description HS FDS REMOTE DB CHARSET Property Description Default Value None Range of values Not applicable Syntax HS FDS REMOTE DB CHARSET This parameter is valid only when H8 LANGUAGE is set to AL32UTF8 and the gateway runs on Windows As more Oracle databases and non Oracle databases use Unicode as database character sets it is preferable to also run the gateway in Unicode character set To do so you must set H5 LANGUAGE AL32UTF8 However when the gateway runs on Windows the Microsoft ODBC Driver Manager interface can exchange data only in the double byte character set UCS2 This results in extra ratio expansion of described buffer and column sizes To compensate the gateway can adjust to correct size if
44. icrosoft Windows ODBC Data Source Administrator and on UNIX based system it is data source name configured in the odbc ini file The entry for den value is case sensitive HS FDS DEFAULT OWNER Property Description Default Value None Range of Values Not applicable The name of the table owner that is used for the non Oracle database tables if an owner is not specified in the SOL statements Note Ifthis parameter is not specified and the owner is not explicitly specified in the SOL statement then the user name of the Oracle user or the user name specified when creating the database link is used D 8 Oracle Database Gateway for ODBC User s Guide Initialization Parameter Description HS FDS TRACE LEVEL Property Description Default Value OFF Range of values OFF ON DEBUG Specifies whether error tracing is turned on or off for gateway connectivity The following values are valid OFF disables the tracing of error messages ON enables the tracing of error messages that occur when you encounter problems The results are written by default to a gateway log file in LOG directory where the gateway is installed DEBUG enables the tracing of detailed error messages that can be used for debugging HS FDS SHAREABLE NAME Property Description Default Value None Range of Values Not applicable Specifies the full path name to the ODBC driver manager This is a required parameter w
45. iews provide the following information Name data type and width of each column Ihecontents of columns with fixed values In the descriptions that follow the values in the Null column may differ from the Oracle data dictionary tables and views Any default value is shown to the right of an item Table C 2 ALL CATALOG Name Type Value OWNER VARCHAR2 30 TABLE NAME VARCHAR2 30 TABLE TYPE VARCHAR2 11 TABLE or VIEW or SYNONYM Table C 3 ALL COL COMMENTS Name Type Value OWNER VARCHAR2 30 TABLE NAME VARCHAR2 30 COLUMN NAMI ED VARCHAR2 30 COMMENTS VARCHAR2 4000 NULL Table C 4 ALL CONS COLUMNS Name Type Value OWNER VARCHAR2 30 CONSTRAINT NAME VARCHAR2 30 TABLE NAME VARCHAR2 30 COLUMN NAME VARCHAR2 4000 POSITION NUMBER Table C 5 ALL CONSTRAINTS Name Type Value OWNER VARCHAR2 30 CONSTRAINT NAME VARCHAR2 30 CONSTRAINT TYPE VARCHAR2 1 R or P Data Dictionary C 3 Views and Tables Supported by Oracle Database Gateway for ODBC Table C 5 Cont ALL CONSTRAINTS Name Type Value TABLE NAME VARCHAR2 30 SEARCH CONDITION
46. k oe eee ge tives Re vere e rd e lees D 9 HS FDS REMOTE DB CHARSET eeuse see eer se sege ee ee eb e ge esse ese tes eben tenent ta seker Se tonat ee GE eb ean nto D 10 HS FDS SOLLEN INTERPRETATION sesse ees ee seek ee ee ee ee ee se seek ek ee ee eke ek ee Ge gegee ee Geek ek ekke D 10 HS FDS REPORT REAL AS DOUBLE esse tinent ae ee tentent ita Ne Hek Se gesek ek ee Ne ee NE D 10 Index List of Tables A 1 C 1 C 2 3 4 5 6 7 8 9 l Ed ed 0 001A 0 0 A o 0ooooooopooooooooooooo EE 22 C 23 C 24 C 25 C 26 C 27 Mapping ODBC Data Types to Oracle Data Types eese eee A 1 Oracle Database Gateway for ODBC Data Dictionary Mapping sss C 2 ALE CATALOG ss ae qiti dtd as tes ute Ne Metu ded qu d oet cta le CRM C 3 ALE COL COMMENTS 22 ves ske seksies basti tis yes eoi tir llas pb C 3 ALL CONS COLUMIN Sigan rr ie ee eke til iia C 3 ALE CONSTRATNTS suit pectus discum Pendet Qua dits QUUM CU EPA Re ci C 3 ALE IND COLUMN S escitas o Dd a Do a n ee ee as E Rn C 4 ALE INDEXES ld EE stb los C 4 ALE OBJECTS uta lidad da C 6 ALLE TAB COLUMINS iS dee E AAA A ee e AS C 6 ALE TAB COMMENTS its ee A IS rie oM REA C 7 ALL TABEES sets ED pe Ep visse bie ep optical C 7 ATL USERS aos LE EE ET o ado dina C 8 ALLE VIEW S RE EE EE ARA eripe enatis C 9 DICTIONARY ei esse E ea Lag acumen De Be ee E Ena ey C 9 DICT COLUMN Sissi as C 9 USER CATALOG tul di idad C 9 USER COLI COM
47. le Names server The HS DB NAME and HS DB DOMAIN initialization parameters define the global name of the non Oracle system Note TheHS DB NAME and HS DB DOMAIN initialization parameters must combine to form a unique address in a cooperative server environment HS DB INTERNAL NAME Property Description Default value 01010101 Range of values 1 to 16 hexadecimal characters Specifies a unique hexadecimal number identifying the instance to which the Heterogeneous Services agent is connected This parameter s value is used as part of a transaction ID when global name services are activated Specifying a nonunique number can cause problems when two phase commit recovery actions are necessary for a transaction Initialization Parameters D 3 Initialization Parameter Description HS DB NAME Property Description Default value HO Range of values 1 to 8 characters Specifies a unique alphanumeric name for the data store given to the non Oracle system This name identifies the non Oracle system within the cooperative server environment The H DB NAME and HS DB DOMAIN initialization parameters define the global name of the non Oracle system HS DESCRIBE CACHE HWM Property Description Default value 100 Range of values 1 to 4000 Specifies the maximum number of entries in the describe cache used b
48. m MI 2 0 e 86 q ES P m a oe 388 des Ep ee 200 ten I LAllocHandle BindCol BindParameter LCancel ColAttribute Columns LConnect LEndTran LDescribeCol LDisconnect LDriverConnect LExecDirect LExecute LFetch LForeignKeys LFreeHandle LFreeStmt LGetConnectAttr LGetData LGetDiagField LGetDiagRec LGetEnvAttr LGetFunctions GetInfo LGetStmtAttr LGetTypeInfo LMoreResults LNumResultCols LParamData LPrepare LPrimaryKeys LProcedureColumns LProcedures LPutData LRowCount LSetConnectAttr LSetEnvAttr 1 6 Oracle Database Gateway for ODBC User s Guide ODBC Connectivity Requirements SQ SQ SQ SQ SQ LSetDescField LSetDescRec LSetStmtAttr LStatistics If statistics are to be supported LTables Introduction 1 7 ODBC Connectivity Requirements 1 8 Oracle Database Gateway for ODBC User s Guide 2 Oracle Database Gateway for ODBC Features and Restrictions After the gateway is installed and configured you can use the gateway to access data in non Oracle systems pass native commands from applications to the non Oracle system perform distributed queries and copy data This chapter contains the following sections Using the Pass Through Feature AUTO COMMIT Known Restrictions a Known Problems Using the Pass Through Feature The gateway can pass native commands or st
49. n can degrade performance In some cases Heterogeneous Services cannot translate a character from one character set to another Note The specified character set must be a superset of the operating system character set on the platform where the agent is installed As more Oracle databases and non Oracle databases use Unicode as database character sets it is preferable to also run the gateway in Unicode character set To do so you must set H5 LANGUAGE AL32UTF8 However when the gateway runs on Windows the Microsoft ODBC Driver Manager interface can exchange data only in the double byte character set UCS2 This results in extra ratio expansion of described buffer and column sizes Refer to HS FDS REMOTE DB CHARSET for instruction on how to adjust to correct sizes Language The language component of the HS LANGUAGE initialization parameter determines Day and month names of dates AD EC PM and AM symbols for date and time Default sorting mechanism Note that Oracle does not determine the language for error messages for the generic Heterogeneous Services messages ORA 25000 through ORA 28000 These are controlled by the session settings in the Oracle database Territory The territory clause specifies the conventions for day and week numbering default date format decimal character and group separator and ISO and local currency symbols Note that the level of globalization support between the Oracle database a
50. nd the non Oracle data source depends on how the gateway is implemented HS LONG PIECE TRANSFER SIZE Property Description Default value 64 KB Range of values Any value up to 2 GB Sets the size of the piece of LONG data being transferred A smaller piece size means less memory requirement but more round trips to fetch all the data A larger piece size means fewer round trips but more of a memory requirement to store the intermediate pieces internally Thus the initialization parameter can be used to tune a system for the best performance with the best trade off between round trips and memory requirements and network latency or response time HS OPEN CURSORS Property Description Default value 50 Initialization Parameters D 5 Initialization Parameter Description Property Description Range of values 1 to the value of OPEN CURSORS initialization parameter of Oracle database Defines the maximum number of cursors that can be open on one connection to a non Oracle system instance The value never exceeds the number of open cursors in the Oracle database Therefore setting the same value as the OPEN_CURSORS initialization parameter in the Oracle database is recommended HS_RPC_FETCH_REBLOCKING Property Description Default value ON Range of values OFF or ON Controls whether Heterogeneous Services attempts to optimize performance of data transfer between the Oracle database and the Heterogeneous Ser
51. nt ODBC i ODBC 77 driver manager l i ODBC driver SE Non Oracle Network Non Oracle System Ed system client ees Machine 1 Machine 2 77 Non Oracle t component In this configuration 1 Aclient connects to the Oracle database through Oracle Net 2 The Heterogeneous Services component of the Oracle database connects through Oracle Net to the gateway 3 The gateway communicates with the following non Oracle components a An ODBC driver manager a An ODBC driver 4 Each user session receives its own dedicated agent process spawned by the first use in that user session of the database link to the non Oracle system The agent process ends when the user session ends Note The ODBC driver may require non Oracle client libraries even if the non Oracle database is located on the same machine Refer to your ODBC driver documentation for information about the requirements for the ODBC driver Introduction 1 3 Oracle Database Gateway for ODBC Architecture Oracle and Non Oracle Systems on the Same Machine Figure 1 2 shows an example of a configuration in which an Oracle and non Oracle database are on the same machine again communicating through Oracle Database Gateway for ODBC Figure 1 2 Oracle and Non Oracle Systems on the Same Machine Oracle racle Database ia Database Gateway for Client ODBC t ODBC driver manager A ODBC driver
52. rameter File Syntax The syntax for the initialization parameter file is as follows 1 2 3 The file is a sequence of commands Each command should start on a separate line End of line is considered a command terminator unless escaped with a backslash If there is a syntax error in an initialization parameter file none of the settings take effect Set the parameter values as follows SET PRIVATE parameter value Where parameter is an initialization parameter name It is a string of characters starting with a letter and consisting of letters digits and underscores Initialization parameter names are case sensitive valueis the initialization parameter value It is case sensitive An initialization parameter value is either a Astring of characters that does not contain any backslashes white space or double quotation marks b Aquoted string beginning with a double quotation mark and ending with a double quotation mark The following can be used inside a quoted string Initialization Parameters D 1 Oracle Database Gateway for ODBC Initialization Parameters backslash N is the escape character n inserts a new line Ntinserts a tab N inserts a double quotation mark NNinserts a backslash A backslash at the end of the line continues the string on the next line If a backslash precedes any other character then the backslash is ignored For example to enable tracing for an
53. vices agent connected to the non Oracle data store The following values are possible x OFF disables reblocking of fetched data so that data is immediately sent from agent to server ON enables reblocking which means that data fetched from the non Oracle system is buffered in the agent and is not sent to the Oracle database until the amount of fetched data is equal or higher than the value of HS RPC FETCH SIZE initialization parameter However any buffered data is returned immediately when a fetch indicates that no more data exists or when the non Oracle system reports an error HS RPC FETCH SIZE Property Description Default value 50000 Range of values 1 to 10000000 Tunes internal data buffering to optimize the data transfer rate between the server and the agent process Increasing the value can reduce the number of network round trips needed to transfer a given amount of data but also tends to increase data bandwidth and to reduce latency as measured between issuing a query and completion of all fetches for the query Nevertheless increasing the fetch size can increase latency for the initial fetch results of a query because the first fetch results are not transmitted until additional data is available D 6 Oracle Database Gateway for ODBC User s Guide Initialization Parameter Description HS TIME ZONE Property Description Default value for Derived from the NLS TERRITORY initialization par
54. ware or commercial technical data pursuant to the applicable Federal Acquisition Regulation and agency specific supplemental regulations As such the use duplication disclosure modification and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract and to the extent applicable by the terms of the Government contract the additional rights set forth in FAR 52 227 19 Commercial Computer Software License December 2007 Oracle USA Inc 500 Oracle Parkway Redwood City CA 94065 This software is developed for general use in a variety of information management applications It is not developed or intended for use in any inherently dangerous applications including applications which may create a risk of personal injury If you use this software in dangerous applications then you shall be responsible to take all appropriate fail safe backup redundancy and other measures to ensure the safe use of this software Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications Oracle is a registered trademark of Oracle Corporation and or its affiliates Other names may be trademarks of their respective owners This software and documentation may provide access to or information on content products and services from third parties Oracle Corporation and its affiliates are not responsible for and expressly disclaim all
55. y Heterogeneous Services This limit is known as the describe cache high water mark The cache contains descriptions of the mapped tables that Heterogeneous Services reuses so that it does not have to re access the non Oracle data store If you are accessing many mapped tables increase the high water mark to improve performance Increasing the high water mark improves performance at the cost of memory usage HS LANGUAGE Property Description Default value System specific Range of values Any valid language name up to 255 characters Provides Heterogeneous Services with character set language and territory information of the non Oracle data source The value must use the following format language territory character set Note The globalization support initialization parameters affect error messages the data for the SOL Service and parameters in distributed external procedures Character Sets Ideally the character sets of the Oracle database and the non Oracle data source are the same In almost all cases H5 LANGUAGE should be set exactly the same as Oracle database character set for optimal character set mapping and performance If they are not the same Heterogeneous Services attempts to translate the character set of the non Oracle data source to the Oracle database character set and back again The D 4 Oracle Database Gateway for ODBC User s Guide Initialization Parameter Description translatio

Download Pdf Manuals

image

Related Search

Related Contents

Delta 3553LF Installation Guide  English - Tiptel    Installation Checklist and Troubleshooting Guide for Labs Content  CreationConnect Security Guide  CV-2500 - augenarztbedarf.de & ophthalworld.de  Brochura - Mario Host.Net  Massive Monastir  取扱説明書 max. 翻訳 http://knd.li/ins اﻟﻧﺳﺧﺔ اﻟﻌرﺑﯾﺔ ﻧﺳﺧﮫ ﻓﺎرﺳﯽ גרסה עבר  2006~2008 and Certain 2009 FJR1300A/AE  

Copyright © All rights reserved.
Failed to retrieve file