文件名称:
oracle-c-call-interface-programmers-guide(19c).pdf
开发工具:
文件大小: 3mb
下载次数: 0
上传时间: 2019-09-03
详细说明:C++连接Oracle 19c数据库的官方文档。
基于标准C ++和面向对象的范例,OCCI旨在提高开发Oracle数据库应用程序的生产力和质量。
OCCI正在成功用于客户端 - 服务器,中间层和复杂对象建模应用程序。
OCCI是访问Oracle对象关系功能(如对象类型,继承,关系和集合)的自然界面。对象在OCCI中表示为C ++类实例,从而实现应用程序和数据库之间的无缝集成。具有客户端对象缓存的导航访问方法提供了完整的数据库透明性。Contents
Preface
Audience
Documentation Accessibility
Related documents
xxx
Conventions
xhi
Changes in This Release for Oracle C++ Call Interface
Programmer's Guide
Changes in Oracle Database Release 19c Version 19.1
Changes in Oracle Database Release 18c Version 18.1
Changes in Oracle Database 12C Release 2(12.2.0.1)
1 Introduction to OCCI
1.1 Overview of occl
1-1
1.1.1 About benefits of occl
1-2
1.1.2 About Building a C++ Application with OCCI
1-2
1.1.3 About Functionality of OCCl
1-3
1.1.4 About Procedural and Nonprocedural Elements
1-3
1.2 About Processing SQL Statements
1-4
1.2.1 About Data Definition Language statements
1-4
1.2.2 About Control statements
1-5
1.2.3 About Data Manipulation Language statements
1-5
1.2.4 About Queries
1-5
1.3 Overview of PL/SQL
1-6
1.4 About Special OCCI/SQL Terms
1-7
1.5 About Object Support
1-7
1.5.1 About Client-Side object Cache
1-8
1.5.2 About Run-time Environment for Objects
1-8
1.5.3 About Associative and Navigational Interfaces
1-8
1.5.4 About Interoperability with C(OCI)
1-9
1.5.5 About the metadata class
1-9
ORACL∈
1.5.6 About the object Type Translator Utility
1-9
1.6 About Additional Support
1-10
1.6.1 Building occl demos
1-10
1.6.2 About oCCl on the Oracle Technology Network
1-11
2 Installation and Upgrading
2.1 About Installing oracle C++ Call Interface
2-1
2.2 About Upgrading Considerations
2-1
2. 3 About Determining the Oracle Database Versions
2-1
2.3.1 Determining the Oracle Client Version During Compilation
2-1
2.3.2 About Determining the Oracle Client and Server Versions at Run Time
2-2
2.4 About the instant client
2-2
2. 4.1 About benefits of instant client
2-2
2. 4.2 About Installing the Instant Client
2-3
2.4.2. 1 About the Oracle Technology Network
2-3
2.4.2.2 About the Complete Client Installation
2-4
2.4.2.3 Running oracle Universal Installer
2-4
2.4.2.4 About the instant client cD
2.4.3 About Using the Instant Client
2-5
2.4.4 Patching Instant Client Shared Libraries on UNIX
2-5
2.4.5 Regenerating the data Shared Library and Zip Files
2-5
2.4.6 About database connection names for instant client
2-6
2.4.7 Setting Environment Variables for OCCI Instant Client
2-7
2.5 About Instant Client Light(English)
2-7
2.5. 1 About Globalization Settings for Instant Client Light(English)
2-8
2.5.2 About Using Instant Client Light (English)
8
2.5.3 About Installing Instant Client Light(English)
2-9
2.5.3. 1 Downloading from Oracle Technology Network
2-9
2.5.3.2 About Using the Client Admin Install
2-9
2.5.3.3 Installing with Oracle Universal Installer
2.6 About Using OCCl with Microsoft Visual C++
2-10
3 Accessing Oracle Database Using C++
3.1 About Connecting to a database
3-1
3.1.1 Creating and Terminating an Environment
3-1
3.1.2 Opening and Closing a Connection
3-2
3.1.3 About Support for Pluggable Databases
3-3
3.2 About Pooling Connections
3-3
3.2.1 About Using Connection Pools
3-4
ORACLE
3.2.1.1 Creating a Connection Pool
3-4
3.2.1.2 Creating Proxy Connections
3-5
3.2.2 Using Stateless Connection Pooling
3-6
3.2.3 About Database Resident Connection Pooling
3-9
3.2.3.1 Administrating Database Resident Connection Pools
3-10
3.2.3.2 Using Database Resident Connection Pools
3-11
3.3 About Executing SQL DDL and DML Statements
3-13
3.3.1 Creating a statement object
3-13
3.3.2 Creating a Statement Object that EXecutes SQL Commands
3-13
3.3.2.1 Creating a database table
3-13
3.3.2.2 Inserting values into a Database Table
3-14
3.3.3 Reusing the Statement object
3-14
3.3.4 Terminating a Statement object
3-14
3.4 About Types of SQL Statements in the OCCI Environment
3-15
3. 4.1 About standard statements
3-15
3.4.2 Using Parameterized Statements
3-15
3.4.3 Using Callable Statements
3-16
3.4.3.1 Using Callable Statements that Use Array Parameters
3-16
3, 4, 4 About streamed reads and writes
3-17
3.4.4. 1 Binding Data in Streaming Mode: SELECT/DML and PL/SQL
3-18
3.4.4.2 Fetching Data in Streaming Mode: PL/SQL
3-18
3.4.4.3 About Fetching Data in Streaming Mode: ResultSet
3-19
3.4.4. 4 Working with Multiple Streams
3-19
3.4.5 About Modifying Rows Iteratively
3-20
3.4.5.1 Setting the Maximum Number of Iterations
3-20
3.4.5.2 Setting the Maximum Parameter size
3-21
3.4.5.3 EXecuting an Iterative Operation
3-21
3.5 About EXecuting SQL Queries
3-21
3.5.1 Using the Result set
3-22
3.5.2 About Specifying the Query
3-23
3.5.3 About Optimizing Performance by Setting Prefetch Count
3-23
3.6 About Executing Statements Dynamically
3-23
3.6.1 About statement Status Definitions
3-24
3.6.1.1 UNPREPARED
3-24
3.6.1.2 PREPARED
3-24
3.6.1.3 RESULT SET AVAILABLE
3-25
3.6.1, 4 UPDATE COUNT AVAILABLE
3-25
3.6.15 NEEDS STREAM DATA
3-25
3.6.1.6 STREAM DATA AVAILABLE
3-26
3.7 About Using Larger Row Count and Error Code Range Data Types
3-26
3.7.1 Using Larger Row Count in SELECT Operations
3-26
ORACL∈
3.7.2 Using Larger Row Count in INSERT, UPDATE, and DELETE
Operations
3-27
3.8 About Committing a Transaction
3-28
3.9 Caching Statements
3-29
3.10 About Handling Exceptions
3-31
3.10.1 About Handling Null and Truncated Data
3-32
4 Object Programming
4.1 Overview of object Programming
4-1
4.2 About Working with Objects in C++ with OCCI
4-2
4.2.1 About Persistent objects
4-2
4.2.2 About Transient objects
4-3
4.2.3 About values
4-4
4.3 About Representing Objects in C++ Applications
4-
4.3.1 Creating Persistent and Transient Objects
4-4
4.3.2 Creating Object Representations using the OTT Utility
4-5
4.4 About Developing a C++ Application using OCCI
4-6
4.4.1 Developing Basic Object Program Structure
4-6
4.4.2 About Basic Object Operational Flow
4-7
4. 4.2.1 About Initializing oCCl in Object Mode
4-8
4.4.2.2 About Pinning anobject
4-9
4.4.2. 3 About Operating on an object in Cache
4-9
4.4.2.4 About Flushing Changes to the object
4-9
4.4.2.5 About deletion of an object
4-9
4.5 Migrating C++ Applications to Oracle Using OCCI
4-10
4.6 Overview of associative access
4-10
4.6.1 Using sql to Access objects
4-10
4.6.2 Inserting and Modifying values
4-11
4.7 Overview of Navigational Access
4-11
4.7.1 Retrieving an Object Reterence(REF from the Database Server
4-11
4.7.2 Pinning an Object
4-12
4.7.3 Manipulating object attributes
4-13
4.7.4 About Marking Objects and Flushing Changes
4-13
4.7.5 Marking an Object as Modified( Dirty)
4-13
4.7.6 About Recording changes in the database
4-13
4.7.7 Collecting Garbage in the object Cache
4-14
4.7.8 About Ensuring Transactional Consistency of References
4-15
4.8 Overview of Complex Object Retrieval
4-15
4.8.1 Retrieving complex objects
4-16
4.8.2 About Prefetching Complex objects
4-17
4.9 Working with Collections
4-17
ORACLE
4.9.1 Fetching Embedded objects
4-18
4.9.2 About nullness
4-19
4.10 About Using object References
4-19
4.11 About Deleting Objects from the Database
4-19
4.12 About Type Inheritance
4-20
4.12.1 About Substitutability
4-21
4. 12.2 Declaring NoT INSTANTIABLE Types and Methods
4-21
4. 12.3 About OCCI Support for Type Inheritance
4-22
4. 12.3. 1 About Connection: getMetaDatao
4-22
4.12.3.2 About bind and define functions
4-22
4.12.4 About OTT Support for Type Inheritance
4-22
4.13 A Sample OCCI Application
4-23
5 Data Types
5.1 Overview of Oracle Data Types
5-1
5.1.1 About OCCI Type and Data Conversion
5-1
5.2 Internal Data Types
5-2
5.2.1 Character Strings and Byte Arrays
4
5.2.2 Universal Rowid (UROWID
5.3 EXternal Data Types
5.3.1 Description of External Data Types
5-8
5.3.1.1BFLE
5-9
5.3.1.2 DOUBlE
5-9
5.3.1.3 BFLOAT
5-10
5.3.1.4BLOB
5-10
5.3.1.5cHAR
5-10
5.3.1.6 CHARZ
5-11
5.3.1.7CLOB
5-11
5.3.1.8DATE
5-11
5.3.19 FLOAT
5-12
5.3.1.10| NTEGER
5-12
5.3.1.11 INTERVAL DAY TO SECOND
5-12
5.3.1.12 INTERVAL YEAR TO MONTH
5-13
5.3.1.13LONG
5-13
5.3.114 LONG RAW
5-14
5.3.115 LONG VARCHAR
5-14
5.3.1.16 LONG VARRAW
5-14
5.3.1.17 CLOE
5-14
5.3.1.18 NUMBER
5-14
5.3.1.19 OCCI BFILE
5-15
ORACL∈
5.3.1.20 OCCI BLOB
5-15
5.3.1.21 OCCI BYTES
5-15
5.3.1.22 OCCI CLOB
5-15
5.3.1.23 OCCI DATE
5-16
5.3.1,.24 OCCL INTERVALDS
5-16
5.3.1.25 OCCL INTERVALYM
5-16
5.3.1.26 OCCI NUMBER
5-16
5.3.1.27 OCCI POBJECT
5-16
5.3.1.28 OCCI REF
5-16
5.3.1.29 OCCI REFANY
5-17
5.3.1 30 OCCI STRING
5-17
5.3.1 31 OCCI TIMESTAMP
5-17
5.3.1.32 OCCI VECTOR
5-17
5.3.1.33RAW
5-17
5.3.1.34REF
5-17
5.3.135ROWD
5-18
5.3.1.36STR|NG
5-18
5.3.1.37 TIMESTAMP
5-18
5.3.1.38 TIMESTAMP WITH LOCAL TIME ZONE
5-18
5.3.1 39 TIMESTAMP WITH TIME ZONE
5.3.1 40 UNSIGNED INT
5-19
5.3.1, 41 VARCHAR
5-19
5.3.1, 42 VARCHAR2
5-19
5.3.1, 43 VARNUM
5-19
5.3.1 44 VARRAW
5-20
5.3.1, 45 NATIVE DOUBLE
5-20
5.3.1, 46 NATVE FLOAT
5-20
5. 4 Data conversions
5-21
5. 4.1 Data Conversions for LOB Data Types
5-22
5. 4.2 Data Conversions for Date, Timestamp, and Interval Data Types
5-23
6 Metadata
6.1 Overview of metadata
6-1
6.2 Using Identity Column Metadata
6-2
6.3 About Describing Database Metadata
6-3
6.3.1 Using Metadata(Code Examples
6-4
6.4 Attribute reference information
6-7
6.41 Parameter Attributes
6-8
6.4.2 Table and view attributes
6-9
6.4.3 Procedure, Function, and Subprogram Attributes
6-9
ORACLE
6. 4. 4 Package Attributes
6-10
6. 4.5 Type Attributes
6-10
64.6Ty
ype Attribute Attributes
6-12
6.4.7 Type Method Attributes
6-13
6.4.8 Collection attributes
6-14
6.4.9 Synonym Attributes
6-15
6. 4.10 Sequence Attributes
6-15
6.4.11 Column attributes
6-16
6.4.12 Argument and Result Attributes
6-16
6.4.13 List attributes
6-18
6.4.14 Schema attributes
6-18
6.4.15 Database attributes
6-19
7 Programming with LOBS
7.1 Overview of lobs
7-1
7.1.1 Introducing Internal LOBS
7-1
7.1.2 Introducing External LOBs
7-2
7.1.3 About Storing LOBS
7-2
7.2 Creating LOBS in OCCI Applications
7-2
7.3 Restricting the Opening and Closing of LOBS
7-3
7.4 About Reading and Writing LOBs
7-4
7.4.1 Reading LOBS
7-4
7. 4.2 Writing LOBS
7-6
7.4.3 About Enhancing the Performance of LOB Reads and Writes
7-7
7.4.3.1 About Using the getchunk Sized Method
7-7
7.4.4 Updating LOBs
7-7
7.4.5 About Reading and Writing Multiple LOBs
7-8
7.4.5.1 About Using the Interfaces for Reading and Writing Multiple LOBS
7-8
7.5 USing Objects with LOB Attributes
7-9
7.6 About Using secure Files
7-10
7.6.1 About Using Secure File Compression
7-10
7.6.2 About Using SecureFiles Encryption
7-10
7.6.3 About Using SecureFiles Deduplication
7-10
7.6.4 About Combining SecureFiles Compression, Encryption, and
Deduplication
7-10
7.6.5 SecureFiles LOB Types and Constants
7-11
8 Object Type Translator Utility
8.1 Overview of the Object Type Translator Utility
8-1
8.2 Using the oTT Utility
8-2
ORACL∈
8.3 Creating Types in the Database
8-2
8.4 About Invoking the OTT Utility
8-3
8. 4. 1 Specifying OTT Parameters
8-3
8.4.1.1 About Setting Parameters on the Command Line
8-3
8.4.1.2 About Setting Parameters in the INTYPE File
8-4
8.4.1.3 About Setting Parameters in the Configuration File
8-4
8.4.2 Invoking the oTT Utility on the command line
8-4
8.421 Elements used on the ott command line
8-5
8.4.3 OTT Utility Parameters
8-5
8.4.3.1 ATTRACCESS
8-6
8.4.3.2CASE
8-6
84.3.3CODE
8-7
8.4.3.4CONF|G
8-7
8. 4.3.5 CPPFILE
8-7
8,436 ERRTYPE
8-7
8.4.3.7HFLE
8-8
8.4.3.8| NTYPE
8-8
8. 4.3.9 MAPFILE
8-8
8. 43.10 MAPFUNC
8-8
8. 43.11 OUTTYPE
8-9
8. 4.3.12 SCHEMA NAMES
8-9
8. 43.13 TRANSITIVE
8-10
8.4.3.14 UNICODE
8-11
8. 43.15 USE MARKER
8-12
8.4.3.16∪ SERID
8-12
8.4.4 Where OTT Parameters Can Appear
8-13
8.4.5 File Name Comparison Restriction
8-13
8.4.6 Using the oTT Command on Microsoft Windows
8-14
8.5 About Using the INTYPE Fle
8-14
8.5.1 Using the INTYPE File
8-14
8.5.2 Structure of the intype file
8-15
8.5.2. 1 INTYPE File Type Specifications
8-16
8.5.3 Using Nested include File generation
8-17
8.6 Using OTT Utility Data Type Mappings
8-19
8.6.1 Default Name Mapping
8-24
8.7 Overview of the outtype file
8-25
8.8 Using the OTT Utility and OCCl Applications
8-26
8.9 Generating C++ Classes generated by the oTT Utility
8-28
8.9.1 Map Registry Function
8-29
8.9.2 EXtending C++ Classes
8-29
8.9.3 Carrying Forward User Added Code
8-30
ORACLE
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.