Table of Contents
- List of Examples
- List of Figures
- List of Tables
- Title and Copyright Information
- Preface
-
1
OCI: Introduction
- Overview of OCI
- Building an OCI Application
- Alternatives to OCI
- SQL Statements
- Procedural and Nonprocedural Elements
- Object Support
- Simple Oracle Document Access (SODA)
- Encapsulated Interfaces
- User Authentication and Password Management
- Features to Improve Application Performance and Scalability
- Oracle Database Advanced Queuing
- XA Library Support
- Oracle Instant Client and Oracle Instant client Basic Light
-
2
Building and Configuring OCI Applications
- Header File and Makefile Locations
- Building an OCI Application on Linux and UNIX
- Building an Application on Windows
- Database Connection Strings
- Client and Server Operating with Different Versions of Time Zone Files
-
OCI Client-Side Deployment Parameters Using oraaccess.xml
- About oraaccess.xml
- About Client-Side Deployment Parameters Specified in oraaccess.xml
- High Level Structure of oraaccess.xml
- About Specifying Global Parameters in oraaccess.xml
- About Specifying Defaults for Connection Parameters
- Overriding Connection Parameters at the Connection-String Level
- About OCI Session Pool Configuration in oraaccess.xml
- File (oraaccess.xml) Properties
- About Compatibility and Upgrading
- Fault Diagnosability in OCI
-
3
OCI Programming Basics
- Overview of OCI Program Programming
- OCI Data Structures
- OCI Programming Steps
- Additional Coding Guidelines
- About Using PL/SQL in an OCI Program
-
OCI Globalization Support
- Client Character Set Control from OCI
- Character Control and OCI Interfaces
- Character-Length Semantics in OCI
- Character Set Support in OCI
- Controlling Language and Territory in OCI
- Other OCI Globalization Support Functions
- About Getting Locale Information in OCI
- About OCI and the BOM (Byte Order Mark)
- About Manipulating Strings in OCI
- About Converting Character Sets in OCI
- OCI Messaging Functions
- lmsgen Utility
-
4
Data Types
- Oracle Data Types
- Internal Data Types
-
External Data Types
- VARCHAR2
- NUMBER
- 64-Bit Integer Host Data Type
- INTEGER
- FLOAT
- STRING
- VARNUM
- LONG
- VARCHAR
- DATE
- RAW
- VARRAW
- LONG RAW
- UNSIGNED
- LONG VARCHAR
- LONG VARRAW
- CHAR
- CHARZ
- Named Data Types: Object, VARRAY, Nested Table
- REF
- ROWID Descriptor
- LOB Descriptor
- JSON Descriptor
- Datetime and Interval Data Type Descriptors
- Native Float and Native Double
- C Object-Relational Data Type Mappings
- Data Conversions
- Typecodes
- Definitions in oratypes.h
- 5 Using SQL Statements in OCI
-
6
Binding and Defining in OCI
- Overview of Binding in OCI
- Advanced Bind Operations in OCI
- Overview of Defining in OCI
- Advanced Define Operations in OCI
- About Binding and Defining LOB Data
- About Binding and Defining JSON Data
- About Array Binds and Defines with JSON Data
- About Binding and Defining Arrays of Structures in OCI
- About Binding and Defining Multiple Buffers
- DML with a RETURNING Clause in OCI
-
Character Conversion in OCI Binding and Defining
- About Choosing a Character Set
- About Setting Client Character Sets in OCI
- About Binding Variables in OCI
- PL/SQL REF CURSORs and Nested Tables in OCI
- Natively Describe and Bind All PL/SQL Types Including Package Types
- Runtime Data Allocation and Piecewise Operations in OCI
-
7
Describing Schema Metadata
- About Using OCIDescribeAny()
-
Parameter Attributes
- Table or View Parameters
- Procedure, Function, and Subprogram Attributes
- Package Attributes
- Type Attributes
- Type Attribute Attributes
- Type Method Attributes
- Collection Attributes
- Synonym Attributes
- Sequence Attributes
- Column Attributes
- Argument and Result Attributes
- List Attributes
- Schema Attributes
- Database Attributes
- Rule Attributes
- Rule Set Attributes
- Evaluation Context Attributes
- Table Alias Attributes
- Variable Type Attributes
- Name Value Attributes
- Character-Length Semantics Support in Describe Operations
- Examples Using OCIDescribeAny()
-
8
LOB and BFILE Operations
- About Using OCI Functions for LOBs
- About Creating and Modifying Persistent LOBs
- About Associating a BFILE in a Table with an Operating System File
- LOB Attributes of an Object
- Array Interface for LOBs
- About Using LOBs of Size Greater than 4 GB
- LOB and BFILE Functions in OCI
- Temporary LOB Support
- Prefetching of LOB Data, Length, and Chunk Size
- Options of SecureFiles LOBs
-
9
Managing Scalable Platforms
- OCI Support for Transactions
- Levels of Transactional Complexity
- Password and Session Management
- Middle-Tier Applications in OCI
- Externally Initialized Context in OCI
- Client Application Context
- Using Edition-Based Redefinition
- OCI Security Enhancements
- Overview of OCI Multithreaded Development
- OCIThread Package
-
10
Session Pooling and Connection Pooling in OCI
- Session Pooling in OCI
- Database Resident Connection Pooling
- About Using Oracle Connection Manager in Traffic Director Mode
- Connection Pooling in OCI
- When to Use Connection Pooling, Session Pooling, or Neither
-
11
High Availability in OCI
- Runtime Connection Load Balancing
- HA Event Notification
- Transparent Application Failover in OCI
- OCI and Transaction Guard
- OCI and Application Continuity
- Support for Transparent Application Continuity
- 12 Notification Methods and Database Advanced Queuing
-
13
User-Defined Callback Functions in OCI
-
About Registering User Callbacks in OCI
- OCIUserCallbackRegister
- User Callback Function
- User Callback Control Flow
- User Callback for OCIErrorGet()
- Errors from Entry Callbacks
- Dynamic Callback Registrations
- About Loading Multiple Packages
- Package Format
- User Callback Chaining
- About Accessing Other Data Sources Through OCI
- Restrictions on Callback Functions
- Example of OCI Callbacks
- OCI Callbacks from External Procedures
-
About Registering User Callbacks in OCI
-
14
Performance Topics
- Statement Caching in OCI
- Implicit Fetching of ROWIDs
- OCI Support for Implicit Results
- Client Result Cache
- Client Statement Cache Auto-Tuning
- 15 Database Startup and Shutdown
-
16
Support for Pluggable Databases
- Enhancements on OCI API Calls with Multitenant Container Databases (CDB) in General
- OCI Enhancements for ALTER SESSION SET CONTAINER
- Restrictions on OCI API Calls with Multitenant Container Databases (CDB) in General
- Restrictions on OCI Calls with ALTER SESSION SET CONTAINER
- Restrictions on OCI Calls with ALTER SESSION SWITCH CONTAINER SWITCH SERVICE
- 17 OCI Interface for Using Shards
-
18
OCI Object-Relational Programming
- OCI Object Overview
- About Working with Objects in OCI
-
About Developing an OCI Object Application
- About Representing Objects in C Applications
- About Initializing the Environment and the Object Cache
- About Making Database Connections
- Retrieving an Object Reference from the Server
- Pinning an Object
- Manipulating Object Attributes
- About Marking Objects and Flushing Changes
- Fetching Embedded Objects
- Object Meta-Attributes
- Complex Object Retrieval
- COR Prefetching
- OCI Versus SQL Access to Objects
- Pin Count and Unpinning
- NULL Indicator Structure
- About Creating Objects
- About Freeing and Copying Objects
- Object Reference and Type Reference
- Create Objects Based on Object Views and Object Tables with Primary-Key-Based OIDs
- Error Handling in Object Applications
- About Type Inheritance
- About Type Evolution
-
19
Object-Relational Data Types in OCI
- Overview of OCI Functions for Objects
- About Mapping Oracle Data Types to C
- About Manipulating C Data Types with OCI
- Date (OCIDate)
- Datetime and Interval (OCIDateTime, OCIInterval)
- Number (OCINumber)
- Fixed or Variable-Length String (OCIString)
- Raw (OCIRaw)
- Collections (OCITable, OCIArray, OCIColl, OCIIter)
- About Multilevel Collection Types
- REF (OCIRef)
- Object Type Information Storage and Access
- AnyType, AnyData, and AnyDataSet Interfaces
- About Binding Named Data Types
- About Defining Named Data Types
- About Binding and Defining Oracle C Data Types
- SQLT_NTY Bind and Define Examples
-
20
Direct Path Load Interface
-
Direct Path Loading Overview
- Data Types Supported for Direct Path Loading
- Direct Path Handles
- About Direct Path Interface Functions
- Limitations and Restrictions of the Direct Path Load Interface
- Direct Path Load Examples for Scalar Columns
- About Using a Date Cache in Direct Path Loading of Dates in OCI
- About Validating Format for Oracle NUMBER and DATE Data
- Direct Path Loading of Object Types
- Direct Path Loading in Pieces
- Direct Path Context Handles and Attributes for Object Types
-
Direct Path Loading Overview
-
21
Object Advanced Topics in OCI
-
Object Cache and Memory Management
- Cache Consistency and Coherency
- Object Cache Parameters
- Object Cache Operations
- About Loading and Removing Object Copies
- About Making Changes to Object Copies
- About Synchronizing Object Copies with the Server
- Object Locking
- Commit and Rollback in Object Applications
- Object Duration
- Memory Layout of an Instance
- Object Navigation
- OCI Navigational Functions
- Type Evolution and the Object Cache
-
Object Cache and Memory Management
- 22 OCI Support for JSON
-
23
OCI Support for XML
- XML Context
- XML Data on the Server
- Using OCI XML DB Functions
-
OCI Client Access to Binary XML
- Accessing XML Data from an OCI Application
- Repository Context
- Create Repository Context from a Dedicated OCI Connection
- Create Repository Context from a Connection Pool
- About Associating Repository Context with a Data Connection
- About Setting XMLType Encoding Format Preference
- Example of Using a Connection Pool
-
24
Using the Object Type Translator with OCI
- What Is the Object Type Translator?
- OTT Command Line
- Intype File
- OTT Data Type Mappings
- Outtype File
- About Using OTT with OCI Applications
- OTT Reference
-
25
Oracle Database Access C API
- Introduction to the Relational Functions
-
Connect, Authorize, and Initialize Functions
- OCIAppCtxClearAll()
- OCIAppCtxSet()
- OCIConnectionPoolCreate()
- OCIConnectionPoolDestroy()
- OCIDBShutdown()
- OCIDBStartup()
- OCIEnvCreate()
- OCIEnvNlsCreate()
- OCIInputValidate()
- OCILogoff()
- OCILogon()
- OCILogon2()
- OCIRequestDisableReplay()
- OCIServerAttach()
- OCIServerDetach()
- OCISessionBegin()
- OCISessionEnd()
- OCISessionGet()
- OCISessionPoolCreate()
- OCISessionPoolDestroy()
- OCISessionRelease()
- OCITerminate()
- Handle and Descriptor Functions
- Bind, Define, and Describe Functions
-
26
More Oracle Database Access C API
- Introduction to the Relational Functions
- Statement Functions
-
LOB Functions
- OCIDurationBegin()
- OCIDurationEnd()
- OCILobAppend()
- OCILobArrayRead()
- OCILobArrayWrite()
- OCILobAssign()
- OCILobCharSetForm()
- OCILobCharSetId()
- OCILobClose()
- OCILobCopy2()
- OCILobCreateTemporary()
- OCILobErase2()
- OCILobFileClose()
- OCILobFileCloseAll()
- OCILobFileExists()
- OCILobFileGetName()
- OCILobFileIsOpen()
- OCILobFileOpen()
- OCILobFileSetName()
- OCILobFreeTemporary()
- OCILobGetChunkSize()
- OCILobGetContentType()
- OCILobGetLength2()
- OCILobGetOptions()
- OCILobGetStorageLimit()
- OCILobIsEqual()
- OCILobIsOpen()
- OCILobIsTemporary()
- OCILobLoadFromFile2()
- OCILobLocatorAssign()
- OCILobLocatorIsInit()
- OCILobOpen()
- OCILobRead2()
- OCILobSetContentType()
- OCILobSetOptions()
- OCILobTrim2()
- OCILobWrite2()
- OCILobWriteAppend2()
- Database Advanced Queuing and Publish-Subscribe Functions
- Direct Path Loading Functions
-
Thread Management Functions
- OCIThreadClose()
- OCIThreadCreate()
- OCIThreadHandleGet()
- OCIThreadHndDestroy()
- OCIThreadHndInit()
- OCIThreadIdDestroy()
- OCIThreadIdGet()
- OCIThreadIdInit()
- OCIThreadIdNull()
- OCIThreadIdSame()
- OCIThreadIdSet()
- OCIThreadIdSetNull()
- OCIThreadInit()
- OCIThreadIsMulti()
- OCIThreadJoin()
- OCIThreadKeyDestroy()
- OCIThreadKeyGet()
- OCIThreadKeyInit()
- OCIThreadKeySet()
- OCIThreadMutexAcquire()
- OCIThreadMutexDestroy()
- OCIThreadMutexInit()
- OCIThreadMutexRelease()
- OCIThreadProcessInit()
- OCIThreadTerm()
- Transaction Functions
- Sharding Functions
- Miscellaneous Functions
- 27 OCI Navigational and Type Functions
-
28
OCI Data Type Mapping and Manipulation Functions
- Introduction to Data Type Mapping and Manipulation Functions
- OCI Collection and Iterator Functions
-
OCI Date, Datetime, and Interval Functions
- OCIDateAddDays()
- OCIDateAddMonths()
- OCIDateAssign()
- OCIDateAddDaysSeconds()
- OCIDateCheck()
- OCIDateCompare()
- OCIDateDaysBetween()
- OCIDateDaysSecondsBetween()
- OCIDateFromText()
- OCIDateGetDate()
- OCIDateGetTime()
- OCIDateLastDay()
- OCIDateNextDay()
- OCIDateSetDate()
- OCIDateSetTime()
- OCIDateSysDate()
- OCIDateTimeAssign()
- OCIDateTimeCheck()
- OCIDateTimeCompare()
- OCIDateTimeConstruct()
- OCIDateTimeConvert()
- OCIDateTimeFromArray()
- OCIDateTimeFromText()
- OCIDateTimeGetDate()
- OCIDateTimeGetTime()
- OCIDateTimeGetTimeZoneName()
- OCIDateTimeGetTimeZoneOffset()
- OCIDateTimeIntervalAdd()
- OCIDateTimeIntervalSub()
- OCIDateTimeSubtract()
- OCIDateTimeSysTimeStamp()
- OCIDateTimeToArray()
- OCIDateTimeToText()
- OCIDateToText()
- OCIDateZoneToZone()
- OCIIntervalAdd()
- OCIIntervalAssign()
- OCIIntervalCheck()
- OCIIntervalCompare()
- OCIIntervalDivide()
- OCIIntervalFromNumber()
- OCIIntervalFromText()
- OCIIntervalFromTZ()
- OCIIntervalGetDaySecond()
- OCIIntervalGetYearMonth()
- OCIIntervalMultiply()
- OCIIntervalSetDaySecond()
- OCIIntervalSetYearMonth()
- OCIIntervalSubtract()
- OCIIntervalToNumber()
- OCIIntervalToText()
-
OCI NUMBER Functions
- OCINumberAbs()
- OCINumberAdd()
- OCINumberArcCos()
- OCINumberArcSin()
- OCINumberArcTan()
- OCINumberArcTan2()
- OCINumberAssign()
- OCINumberCeil()
- OCINumberCmp()
- OCINumberCos()
- OCINumberDec()
- OCINumberDiv()
- OCINumberExp()
- OCINumberFloor()
- OCINumberFromInt()
- OCINumberFromReal()
- OCINumberFromText()
- OCINumberHypCos()
- OCINumberHypSin()
- OCINumberHypTan()
- OCINumberInc()
- OCINumberIntPower()
- OCINumberIsInt()
- OCINumberIsZero()
- OCINumberLn()
- OCINumberLog()
- OCINumberMod()
- OCINumberMul()
- OCINumberNeg()
- OCINumberPower()
- OCINumberPrec()
- OCINumberRound()
- OCINumberSetPi()
- OCINumberSetZero()
- OCINumberShift()
- OCINumberSign()
- OCINumberSin()
- OCINumberSqrt()
- OCINumberSub()
- OCINumberTan()
- OCINumberToInt()
- OCINumberToReal()
- OCINumberToRealArray()
- OCINumberToText()
- OCINumberTrunc()
- OCI Raw Functions
- OCI REF Functions
- OCI String Functions
- OCI Table Functions
-
29
OCI Cartridge Functions
- Introduction to External Procedure and Cartridge Services Functions
- Cartridge Services — OCI External Procedures
- Cartridge Services — Memory Services
- Cartridge Services — Maintaining Context
- Cartridge Services — Parameter Manager Interface
- Cartridge Services — File I/O Interface
- Cartridge Services — String Formatting Interface
- 30 OCI Any Type and Data Functions
-
31
OCI Globalization Support Functions
- Introduction to Globalization Support in OCI
- OCI Locale Functions
- OCI Locale-Mapping Function
-
OCI String Manipulation Functions
- OCIMultiByteInSizeToWideChar()
- OCIMultiByteStrCaseConversion()
- OCIMultiByteStrcat()
- OCIMultiByteStrcmp()
- OCIMultiByteStrcpy()
- OCIMultiByteStrlen()
- OCIMultiByteStrncat()
- OCIMultiByteStrncmp()
- OCIMultiByteStrncpy()
- OCIMultiByteStrnDisplayLength()
- OCIMultiByteToWideChar()
- OCIWideCharInSizeToMultiByte()
- OCIWideCharMultiByteLength()
- OCIWideCharStrCaseConversion()
- OCIWideCharStrcat()
- OCIWideCharStrchr()
- OCIWideCharStrcmp()
- OCIWideCharStrcpy()
- OCIWideCharStrlen()
- OCIWideCharStrncat()
- OCIWideCharStrncmp()
- OCIWideCharStrncpy()
- OCIWideCharStrrchr()
- OCIWideCharToLower()
- OCIWideCharToMultiByte()
- OCIWideCharToUpper()
- OCI Character Classification Functions
- OCI Character Set Conversion Functions
- OCI Messaging Functions
- 32 OCI XML DB Functions
- 33 Oracle ODBC Driver
- 34 Introduction to the OCI Interface for XStream
-
35
OCI XStream Functions
- About Using the XStream Interface
- Introduction to XStream Functions
-
OCI XStream Functions
- OCILCRAttributesGet()
- OCILCRAttributesSet()
- OCILCRComparePosition()
- OCILCRConvertPosition()
- OCILCRFree()
- OCILCRDDLInfoGet()
- OCILCRHeaderGet()
- OCILCRRowStmtGet()
- OCILCRRowStmtWithBindVarGet()
- OCILCRNew()
- OCILCRRowColumnInfoGet()
- OCILCRRowColumnInfoSet()
- OCILCRDDLInfoSet()
- OCILCRGetLCRIDVersion()
- OCILCRHeaderSet()
- OCILCRLobInfoGet()
- OCILCRLobInfoSet()
- OCILCRSCNsFromPosition()
- OCILCRSCNToPosition()
- OCILCRScnToPosition2()
- OCILCRWhereClauseGet()
- OCILCRWhereClauseWithBindVarGet()
- OCIXStreamInAttach()
- OCIXStreamInDetach()
- OCIXStreamInLCRSend()
- OCIXStreamInLCRCallbackSend()
- OCIXStreamInProcessedLWMGet()
- OCIXStreamInErrorGet()
- OCIXStreamInFlush()
- OCIXStreamInChunkSend()
- OCIXStreamInCommit()
- OCIXStreamInSessionSet()
- OCIXStreamOutAttach()
- OCIXStreamOutDetach()
- OCIXStreamOutLCRReceive()
- OCIXStreamOutLCRCallbackReceive()
- OCIXStreamOutProcessedLWMSet()
- OCIXStreamOutChunkReceive()
- OCIXStreamOutGetNextChunk()
- OCIXStreamOutSessionSet()
- 36 OCI Json Descriptor Functions
-
37
OCI SODA Functions
- Introduction to OCI SODA Functions
-
OCI SODA Functions
- OCISodaBulkInsert()
- OCISodaBulkInsertAndGet()
- OCISodaBulkInsertAndGetWithOpts()
- OCISodaBulkInsertAndGetWithCtnt()
- OCISodaBulkInsertWithCtnt()
- OCISodaCollCreate()
- OCISodaCollCreateWithMetadata()
- OCISodaCollDrop()
- OCISodaCollGetNext()
- OCISodaCollList()
- OCISodaCollOpen()
- OCISodaDataGuideGet()
- OCISodaDataGuideGetWithOpts ()
- OCISodaAsOfTimestampGet ()
- OCISodaAsOfScnGet ()
- OCISodaDocCount()
- OCISodaDocCountWithFilter()
- OCISodaDocCreate()
- OCISodaDocCreateWithKey()
- OCISodaDocCreateWithKeyAndMType()
- OCISodaDocGetNext()
- OCISodaFind()
- OCISodaFindOne()
- OCISodaFindOneWithKey()
- OCISodaIndexCreate()
- OCISodaIndexGet()
- OCISodaIndexList()
- OCISodaIndexDrop()
- OCISodaInsert()
- OCISodaInsertAndGet()
- OCISodaInsertAndGetWithOpts ()
- OCISodaInsertAndGetWithCtnt()
- OCISodaInsertWithCtnt()
- OCISodaRemove()
- OCISodaRemoveOneWithKey()
- OCISodaReplOne()
- OCISodaReplOneAndGet()
- OCISodaReplOneAndGetWithCtnt()
- OCISodaReplOneAndGetWithKey()
- OCISodaReplOneWithCtnt()
- OCISodaReplOneWithKey()
- OCISodaSave()
- OCISodaSaveAndGet()
- OCISodaSaveAndGetWithOpts()
- OCISodaSaveWithCtnt()
- OCISodaSaveAndGetWithCtnt()
- OCISodaCollTruncate()
- OCISodaOperKeysSet()
-
A
Handle and Descriptor Attributes
- Conventions
- Environment Handle Attributes
- Error Handle Attributes
- Service Context Handle Attributes
- Server Handle Attributes
- Administration Handle Attributes
- Connection Pool Handle Attributes
- Transaction Handle Attributes
- Statement Handle Attributes
- Bind Handle Attributes
- Define Handle Attributes
- Describe Handle Attributes
- Parameter Descriptor Attributes
- Shard Instance Descriptor Attributes
- SODA Document Handle Attributes
- SODA Collection Handle Attributes
- SODA Output Options Handle Attributes
- SODA Operation Options Handle Attributes
- LOB Descriptor and LOB Locator Attributes
- JSON Descriptor Attributes
- Complex Object Attributes
- Database Advanced Queuing Descriptor Attributes
- Subscription Handle Attributes
- Direct Path Loading Handle Attributes
- Process Handle Attributes
- Event Handle Attributes
- B OCI Demonstration Programs
- C OCI Function Server Round-Trips
-
D
Getting Started with OCI for Windows
- What Is Included in the OCI Package for Windows?
- Oracle Directory Structure for Windows
- Sample OCI Programs for Windows
- About Compiling OCI Applications for Windows
- About Linking OCI Applications for Windows
- About Running OCI Applications for Windows
- Oracle XA Library
- About Using the Object Type Translator for Windows
- E Deprecated OCI Features and Functions
-
F
Multithreaded extproc Agent
- Why Use the Multithreaded extproc Agent?
- Multithreaded extproc Agent Architecture
-
Administering the Multithreaded extproc Agent
- Agent Control Utility (agtctl) Commands
-
About Using agtctl in Single-Line Command Mode
- Setting Configuration Parameters for a Multithreaded extproc Agent
- Starting a Multithreaded extproc Agent
- Shutting Down a Multithreaded extproc Agent
- Examining the Value of Configuration Parameters
- Resetting a Configuration Parameter to Its Default Value
- Deleting an Entry for a Specific SID from the Control File
- Requesting Help
- Using Shell Mode Commands
- Configuration Parameters for Multithreaded extproc Agent Control
- Index