A Provider-Specific Information
These topics describe OLE DB information that is specific to Oracle Provider for OLE DB. For generic OLE DB information that includes a detailed listing of all OLE DB properties and interfaces, see the Microsoft OLE DB Programmer's Reference Guide.
Data Type Mappings in Rowsets and Parameters
This section lists the data type mapping between Oracle data types and OLE DB-defined types. Oracle Provider for OLE DB represents Oracle data types by using certain OLE DB-defined data types in the rowset as well as in parameters. OLE DB-defined types are also mapped to an Oracle data type when creating tables.
Each Oracle data type is mapped to a specific OLE DB data type, as shown in the following table. This correspondence is used when data type information is retrieved from an Oracle Database.
Table A-1 Data Type Mappings
Oracle Data Type | OLE DB Data Type - Regular (NonUnicode) Mode | OLE DB Data Type - Unicode Mode |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties Supported
This section lists the properties supported by Oracle Provider for OLE DB. The read/write status and initial values are noted.
Data Source Properties
Table A-2 lists data source properties.
Table A-2 DBPROPSET_DATASOURCE Properties
Property | Status | Initial Value |
---|---|---|
|
READ-ONLY |
|
DataSourceInfo Properties
Table A-3 lists DataSourceInfo
properties.
Table A-3 DBPROPSET_DATASOURCEINFO Properties
Property | Status | Initial Value |
---|---|---|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
"Database link" |
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
" ", set at run time |
|
READ-ONLY |
|
|
READ-ONLY |
" ", set at run time |
|
READ-ONLY |
set at run time |
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
0, no limit |
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
"PL/SQL Stored Procedure" |
|
READ-ONLY |
"Oracle Provider for OLE DB" |
|
READ-ONLY |
|
|
READ-ONLY |
"02.01" |
|
READ-ONLY |
set to current OraOLEDB version |
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
"Owner" |
|
READ-ONLY |
|
|
READ-ONLY |
" ", set at run time |
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
"Table" |
|
READ-ONLY |
" ", set at run time |
Initialization and Authorization Properties
Table A-4 lists initialization and authorization properties.
Table A-4 DBPROPSET_DBINIT Properties
Property | Status | Initial Value |
---|---|---|
|
READ-ONLY |
|
|
READ/WRITE |
User ID |
|
READ/WRITE |
Connect string |
|
READ/WRITE |
Window handle for prompt |
|
READ/WRITE |
LCID of system |
|
READ/WRITE |
|
|
READ/WRITE |
|
Session Properties
Table A-5 lists session properties.
Table A-5 DBPROPSET_SESSION Properties
Property | Status | Initial Value |
---|---|---|
|
READ-ONLY |
|
Rowset Properties
Table A-6 lists rowset properties.
Table A-6 DBPROPSET_ROWSET Properties
Property | Status | Initial Value |
---|---|---|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
|
READ-ONLY |
|
|
READ/WRITE |
|
|
READ/WRITE |
|
Rowset Property Implications
Oracle Provider for OLE DB sets other necessary properties if a particular property is set to VARIANT_TRUE
.
-
If
DBPROP_IROWSETLOCATE
is set toVARIANT_TRUE
, then the following properties are also set toVARIANT_TRUE
:-
DBPROP_IROWSETIDENTITY
-
DBPROP_CANHOLDROWS
-
DBPROP_BOOKMARKS
-
DBPROP_CANFETCHBACKWARDS
-
DBPROP_CANSCROLLBACKWARDS
-
-
If
DBPROP_IROWSETSCROLL
is set toVARIANT_TRUE
, then the following properties are also set toVARIANT_TRUE
:-
DBPROP_IROWSETIDENTITY
-
DBPROP_IROWSETLOCATE
-
DBPROP_CANHOLDROWS
-
DBPROP_BOOKMARKS
-
DBPROP_CANFETCHBACKWARDS
-
DBPROP_CANSCROLLBACKWARDS
-
-
If
DBPROP_IROWSETUPDATE
is set toVARIANT_TRUE
, then the DBPROP_IROWSETCHANGE property is also set toVARIANT_TRUE
.
Interfaces Supported
Data Source
CoType TDataSource { interface IDBCreateSession; interface IDBInitialize; interface IDBProperties; interface IPersist; interface IDBInfo; interface ISupportErrorInfo; }
Session
CoType TSession { interface IGetDataSource; interface IOpenRowset; interface ISessionProperties; interface IDBCreateCommand; interface IDBSchemaRowset; interface ISupportErrorInfo; interface ITransactionJoin; interface ITransactionLocal; interface ITransaction; }
Command
CoType TCommand { interface IAccessor; interface IColumnsInfo; interface ICommand; interface ICommandProperties; interface ICommandText; interface IConvertType; interface IColumnsRowset; interface ICommandPrepare; interface ICommandWithParameters; interface ISupportErrorInfo; }
Rowset
CoType TRowset { interface IAccessor; interface IColumnsInfo; interface IConvertType; interface IRowset; interface IRowsetInfo; interface IColumnsRowset; interface IConnectionPointContainer; interface IRowsetChange; interface IRowsetFind; interface IRowsetIdentity; interface IRowsetLocate; interface IRowsetRefresh; interface IRowsetFastLoad; interface IRowsetScroll; interface IRowsetUpdate; interface ISupportErrorInfo; }
Multiple Results
CoType TMultipleResults { interface IMultipleResults; interface ISupportErrorInfo; }
Transaction Options
CoType TTransactionOptions { interface ITransactionOptions; interface ISupportErrorInfo; }
MetaData Columns Supported
DBTYPE_BASECOLUMNNAME
, DBTYPE_BASETABLENAME
, and DBTYPE_BASESCHEMANAME
metadata columns are not populated for read-only recordsets. OraOLEDB creates a read-only recordset for server cursor for SQL queries with DISTINCT
or UNIQUE
keywords. OraOLEDB also creates a read-only recordset for server cursor for JOIN
queries.
The following metadata columns are supported by the column rowset of OraOLEDB:
-
DBCOLUMN_IDNAME
-
DBCOLUMN_PROPID
-
DBCOLUMN_NAME
-
DBCOLUMN_NUMBER
-
DBCOLUMN_TYPE
-
DBCOLUMN_TYPEINFO
-
DBCOLUMN_COLUMNSIZE
-
DBCOLUMN_PRECISION
-
DBCOLUMN_SCALE
-
DBCOLUMN_FLAGS
-
DBCOLUMN_BASECATALOGNAME
-
DBCOLUMN_BASECOLUMNNAME
-
DBCOLUMN_BASESCHEMANAME
-
DBCOLUMN_BASETABLENAME
-
DBCOLUMN_COMPUTEMODE
-
DBCOLUMN_ISAUTOINCREMENT
-
DBCOLUMN_ISCASESENSITIVE
-
DBCOLUMN_ISSEARCHABLE
-
DBCOLUMN_OCTETLENGTH
-
DBCOLUMN_KEYCOLUMN
OraOLEDB Tracing
OraOLEDB provides the ability to trace the interface calls for debugging purposes. This feature has been provided to assist Oracle Support Services in debugging customer issues.
The provider can be configured to record the following information:
-
For OLE DB Interface method entry and exit:
-
Parameter values supplied (entry)
-
Return value;
HRESULT
(exit) -
Thread ID (entry and exit)
-
-
For Distributed transaction enlistment and delistment:
-
Session object information
-
Transaction ID
Note:
To record global transaction enlistment and delistment information, the
TraceLevel
value must be set to session object. SeeTraceOption
in Registry Setting for Tracing Calls.
-
Registry Setting for Tracing Calls
In ODAC 12c Release 4, OraOLEDB now uses a new directory to write trace files to by default: <Windows user temporary folder>
\oledb\trace
.
The Windows user temporary folder is determined by your local Windows settings, such as your Windows TMP or TEMP environment variable. Typically, it can be C:\temp
or C:\Users\
<user name>
\AppData\Local\Temp
.
To change the trace file location, use the TraceFileLocation
attribute to set a new location. TraceFileLocation
will not be created by default in the Windows Registry. OraOLEDB will create an entry in the Windows event log where the trace was created anytime it creates a trace file.
To trace the interface calls, you must configure the following registry values for HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_
HOMENAME
\OLEDB\
:
-
TraceFileLocation
Valid Value: Any valid directory path
TraceFileLocation
specifies trace file destination directory. The default trace location is<Windows user temporary folder>
\oledb\trace
. -
TraceCategory
Valid Values:
-
0
= None -
1
= OLEDB Interface method entry -
2
= OLEDB Interface method exit -
4
= Distributed Transaction Enlistment and Delistment
TraceCategory
specifies the information that is to be traced. Combinations of different tracing categories can be made by adding the valid values. For example, setTraceCategory
to3
to trace all OLE DB interface method entries and exits. -
-
TraceLevel
Valid Values:
-
0
= None -
1
= Data Source object -
2
= Session object -
4
= Command object -
8
= Rowset object -
16
= Error object -
64
= Multiple Results Object
TraceLevel
specifies the OLE DB objects to be traced. Because tracing all the entry and exit calls for all the OLE DB objects can be excessive,TraceLevel
is provided to limit tracing to a single or multiple OLE DB objects. To obtain tracing on multiple objects, add the valid values. For example, ifTraceLevel
is set to12
andTraceCategory
is set to3
, the trace file will only contain method entry and exit for Command and Rowset objects.The
TraceLevel
value must be set to session object (2) to trace global transaction enlistment and delistment information. -
-
TraceOption
Valid Values:
-
0
= Single trace file -
1
= Multiple trace files
TraceOption
specifies whether to log trace information in single or multiple files for each Thread ID. If multiple trace file is requested, a Thread ID is appended to the file name provided to create a trace file for each thread. -