没有合适的资源?快使用搜索试试~ 我知道了~
首页Oracle 10g OCI函数库详述与编程指南
Oracle 10g OCI函数库详述与编程指南
4星 · 超过85%的资源 需积分: 9 4 下载量 184 浏览量
更新于2024-07-27
收藏 8.32MB PDF 举报
Oracle Call Interface (OCI) 是Oracle数据库开发的重要组件,用于在Java、C++和其他语言与Oracle数据库进行高效的交互。本文档是Oracle 10g Release 1 (10.1) 的Oracle Call Interface Programmer's Guide,详细介绍了如何利用OCI函数库进行应用程序的开发。Oracle Call Interface允许开发者通过标准的编程接口访问Oracle数据库,包括执行SQL查询、处理数据、管理连接和事务等。
该指南的作者是Jack Melnick,其内容由多位贡献者共同编撰,包括但不限于A. Ahluwalia、C. Baird等,他们在文档中分享了各自的专业知识和经验。文档强调了版权保护和许可协议,所有的软件和文档都包含Oracle Corporation的专有信息,用户在使用时必须遵守相应的限制条款,尊重知识产权。
OCI文档涵盖了广泛的主题,例如:
1. **入门介绍**:提供OCI的基本概念,包括其设计目的、优势以及与其他数据库接口(如JDBC或ODBC)的区别。
2. **安装和配置**:指南中详细说明了如何在开发环境中安装和配置OCI,包括所需的环境变量设置和驱动程序管理。
3. **API参考**:列出了Oracle提供的各种OCI函数和方法,包括数据库连接(DBConnect)、预编译语句(Prepare Statement)、执行SQL(Execute Statement)和结果集处理(Fetch Rows)等。
4. **数据类型和错误处理**:介绍OCI如何处理不同数据类型,以及如何捕获和处理可能出现的数据库错误。
5. **安全性与权限**:涉及如何在应用程序中实现安全连接,如SSL/TLS加密,以及用户权限管理和SQL动态权限。
6. **性能优化**:提供了针对OCI性能调优的策略,包括批量处理、缓存管理以及并发连接的最佳实践。
7. **示例代码和教程**:包含实用的代码片段和示例,帮助读者理解和掌握OCI的使用方法。
8. **最佳实践和注意事项**:列举了开发者在实际项目中可能遇到的问题及解决建议,确保高效且合规的数据库操作。
Oracle Call Interface Programmer's Guide对于那些希望利用Oracle数据库进行应用程序开发的开发者来说,是一份不可或缺的参考资料,它详细而全面地解释了如何利用OCI进行高效、安全的数据库访问和操作。无论你是初次接触还是经验丰富的开发人员,都可以从中找到所需的指导和深入理解。
xvi
Using a Date Cache in Direct Path Loading of Dates in OCI............................................. 12-15
Direct Path Loading of Object Types.......................................................................................... 12-17
Direct Path Loading of Nested Tables................................................................................... 12-17
Direct Path Loading of Column Objects................................................................................ 12-19
Direct Path Loading of SQL String Columns........................................................................ 12-22
Direct Path Loading of REF Columns.................................................................................... 12-25
NOT FINAL Object and REF Columns ................................................................................. 12-30
Direct Path Loading of Object Tables .................................................................................... 12-32
Direct Path Loading a NOT FINAL Object Table ................................................................ 12-33
Direct Path Loading in Pieces....................................................................................................... 12-34
Loading Object Types in Pieces.............................................................................................. 12-34
Direct Path Context Handles and Attributes for Object Types.............................................. 12-35
Direct Path Context Attributes ............................................................................................... 12-35
Direct Path Function Context and Attributes....................................................................... 12-36
Direct Path Column Parameter Attributes............................................................................ 12-40
Direct Path Function Column Array Handle for Non-scalar Columns............................ 12-43
13 Object Advanced Topics in OCI
The Object Cache and Memory Management............................................................................. 13-2
Cache Consistency and Coherency.......................................................................................... 13-4
Object Cache Parameters........................................................................................................... 13-5
Object Cache Operations ........................................................................................................... 13-6
Loading and Removing Object Copies.................................................................................... 13-7
Making Changes to Object Copies ......................................................................................... 13-10
Synchronizing Object Copies with Server............................................................................. 13-11
Object Locking........................................................................................................................... 13-13
Commit and Rollback in Object Applications...................................................................... 13-15
Object Duration......................................................................................................................... 13-15
Memory Layout of an Instance............................................................................................... 13-17
Object Navigation........................................................................................................................... 13-18
Simple Object Navigation........................................................................................................ 13-18
OCI Navigational Functions......................................................................................................... 13-20
Pin/Unpin/Free Functions..................................................................................................... 13-20
Flush and Refresh Functions................................................................................................... 13-21
Mark and Unmark Functions.................................................................................................. 13-21
xvii
Object Meta-Attribute Accessor Functions........................................................................... 13-22
Other Functions ........................................................................................................................ 13-22
Type Evolution and the Object Cache ........................................................................................ 13-23
OCI Support for XML.................................................................................................................... 13-23
XML Context ............................................................................................................................. 13-24
XML Data on the Server .......................................................................................................... 13-24
Using OCI XML DB Functions ............................................................................................... 13-24
14 Using the Object Type Translator with OCI
OTT Overview................................................................................................................................... 14-2
What Is the Object Type Translator?............................................................................................. 14-2
Creating Types in the Database................................................................................................ 14-5
Invoking OTT.............................................................................................................................. 14-5
The OTT Command Line................................................................................................................ 14-6
OTT Command Line Invocation Example.............................................................................. 14-6
The Intype File .................................................................................................................................. 14-9
OTT Datatype Mappings .............................................................................................................. 14-10
Mapping Object Datatypes to C ............................................................................................. 14-12
OTT Type Mapping Example................................................................................................. 14-13
Null Indicator Structs............................................................................................................... 14-16
OTT Support for Type Inheritance......................................................................................... 14-17
The Outtype File............................................................................................................................. 14-21
Using OTT with OCI Applications............................................................................................. 14-22
Accessing and Manipulating Objects with OCI................................................................... 14-23
Calling the Initialization Function ......................................................................................... 14-24
Tasks of the Initialization Function........................................................................................ 14-26
OTT Reference ................................................................................................................................ 14-26
OTT Command Line Syntax ................................................................................................... 14-27
OTT Parameters........................................................................................................................ 14-28
Where OTT Parameters Can Appear..................................................................................... 14-33
Structure of the Intype File...................................................................................................... 14-34
Nested Included File Generation ........................................................................................... 14-36
SCHEMA_NAMES Usage....................................................................................................... 14-38
Default Name Mapping........................................................................................................... 14-41
OTT Restriction on File Name Comparison ......................................................................... 14-42
xviii
Volume 2
Part III OCI Reference
15 OCI Relational Functions
Introduction to the Relational Functions..................................................................................... 15-2
Connect, Authorize, and Initialize Functions ............................................................................. 15-4
OCIConnectionPoolCreate() ..................................................................................................... 15-5
OCIConnectionPoolDestroy()................................................................................................... 15-8
OCIEnvCreate()........................................................................................................................... 15-9
OCIEnvInit().............................................................................................................................. 15-12
OCIEnvNlsCreate()................................................................................................................... 15-14
OCIInitialize()............................................................................................................................ 15-18
OCILogoff()................................................................................................................................ 15-21
OCILogon()................................................................................................................................ 15-22
OCILogon2().............................................................................................................................. 15-24
OCIServerAttach().................................................................................................................... 15-27
OCIServerDetach().................................................................................................................... 15-30
OCISessionBegin().................................................................................................................... 15-31
OCISessionEnd()....................................................................................................................... 15-35
OCISessionGet()........................................................................................................................ 15-36
OCISessionPoolCreate()........................................................................................................... 15-40
OCISessionPoolDestroy() ........................................................................................................ 15-44
OCISessionRelease()................................................................................................................. 15-45
OCITerminate()......................................................................................................................... 15-47
Handle and Descriptor Functions................................................................................................ 15-48
OCIAttrGet().............................................................................................................................. 15-49
OCIAttrSet()............................................................................................................................... 15-52
OCIDescriptorAlloc()............................................................................................................... 15-54
OCIDescriptorFree()................................................................................................................. 15-57
OCIHandleAlloc()..................................................................................................................... 15-59
OCIHandleFree() ...................................................................................................................... 15-62
OCIParamGet().......................................................................................................................... 15-64
OCIParamSet() .......................................................................................................................... 15-66
Bind, Define, and Describe Functions ........................................................................................ 15-68
xix
OCIBindArrayOfStruct() ......................................................................................................... 15-69
OCIBindByName() ................................................................................................................... 15-71
OCIBindByPos()........................................................................................................................ 15-77
OCIBindDynamic()................................................................................................................... 15-82
OCIBindObject() ....................................................................................................................... 15-87
OCIDefineArrayOfStruct()...................................................................................................... 15-90
OCIDefineByPos() .................................................................................................................... 15-92
OCIDefineDynamic() ............................................................................................................... 15-97
OCIDefineObject().................................................................................................................. 15-100
OCIDescribeAny().................................................................................................................. 15-102
OCIStmtGetBindInfo()........................................................................................................... 15-105
16 More OCI Relational Functions
Introduction to More Relational Functions................................................................................. 16-2
Statement Functions......................................................................................................................... 16-4
OCIStmtExecute()....................................................................................................................... 16-5
OCIStmtFetch() ........................................................................................................................... 16-9
OCIStmtFetch2() ....................................................................................................................... 16-11
OCIStmtGetPieceInfo()............................................................................................................ 16-14
OCIStmtPrepare()..................................................................................................................... 16-16
OCIStmtPrepare2()................................................................................................................... 16-18
OCIStmtRelease()...................................................................................................................... 16-20
OCIStmtSetPieceInfo()............................................................................................................. 16-21
LOB Functions................................................................................................................................. 16-23
OCIDurationBegin()................................................................................................................. 16-26
OCIDurationEnd().................................................................................................................... 16-28
OCILobAppend()...................................................................................................................... 16-29
OCILobAssign()........................................................................................................................ 16-31
OCILobCharSetForm()............................................................................................................. 16-33
OCILobCharSetId() .................................................................................................................. 16-34
OCILobClose() .......................................................................................................................... 16-35
OCILobCopy()........................................................................................................................... 16-37
OCILobCopy2()......................................................................................................................... 16-40
OCILobCreateTemporary()..................................................................................................... 16-41
OCILobDisableBuffering() ...................................................................................................... 16-43
xx
OCILobEnableBuffering()........................................................................................................ 16-44
OCILobErase()........................................................................................................................... 16-45
OCILobErase2()......................................................................................................................... 16-47
OCILobFileClose().................................................................................................................... 16-48
OCILobFileCloseAll()............................................................................................................... 16-49
OCILobFileExists().................................................................................................................... 16-50
OCILobFileGetName()............................................................................................................. 16-51
OCILobFileIsOpen()................................................................................................................. 16-53
OCILobFileOpen()................................................................................................................... 16-55
OCILobFileSetName().............................................................................................................. 16-57
OCILobFlushBuffer()................................................................................................................ 16-59
OCILobFreeTemporary()......................................................................................................... 16-61
OCILobGetChunkSize()........................................................................................................... 16-62
OCILobGetLength().................................................................................................................. 16-64
OCILobGetLength2()................................................................................................................ 16-66
OCILobGetStorageLimit() ....................................................................................................... 16-67
OCILobIsEqual()....................................................................................................................... 16-68
OCILobIsOpen()........................................................................................................................ 16-69
OCILobIsTemporary().............................................................................................................. 16-71
OCILobLoadFromFile() ........................................................................................................... 16-72
OCILobLoadFromFile2() ......................................................................................................... 16-74
OCILobLocatorAssign()........................................................................................................... 16-75
OCILobLocatorIsInit().............................................................................................................. 16-77
OCILobOpen()........................................................................................................................... 16-79
OCILobRead() ........................................................................................................................... 16-81
OCILobRead2() ......................................................................................................................... 16-87
OCILobTrim()............................................................................................................................ 16-92
OCILobTrim2().......................................................................................................................... 16-94
OCILobWrite()........................................................................................................................... 16-95
OCILobWrite2()...................................................................................................................... 16-101
OCILobWriteAppend()......................................................................................................... 16-106
OCILobWriteAppend2()....................................................................................................... 16-110
Streams Advanced Queuing and Publish-Subscribe Functions......................................... 16-114
OCIAQDeq()........................................................................................................................... 16-115
OCIAQDeqArray() ................................................................................................................ 16-118
剩余1569页未读,继续阅读
2022-06-25 上传
点击了解资源详情
点击了解资源详情
2024-11-08 上传
2024-11-08 上传
月影潇湘
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 构建基于Django和Stripe的SaaS应用教程
- Symfony2框架打造的RESTful问答系统icare-server
- 蓝桥杯Python试题解析与答案题库
- Go语言实现NWA到WAV文件格式转换工具
- 基于Django的医患管理系统应用
- Jenkins工作流插件开发指南:支持Workflow Python模块
- Java红酒网站项目源码解析与系统开源介绍
- Underworld Exporter资产定义文件详解
- Java版Crash Bandicoot资源库:逆向工程与源码分享
- Spring Boot Starter 自动IP计数功能实现指南
- 我的世界牛顿物理学模组深入解析
- STM32单片机工程创建详解与模板应用
- GDG堪萨斯城代码实验室:离子与火力基地示例应用
- Android Capstone项目:实现Potlatch服务器与OAuth2.0认证
- Cbit类:简化计算封装与异步任务处理
- Java8兼容的FullContact API Java客户端库介绍
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功