没有合适的资源?快使用搜索试试~ 我知道了~
首页Oracle Database JDBC开发指南:10g Release 1 (10.1) - B10979-02
Oracle Database JDBC Developer's Guide and Reference 10g Release 1 (10.1),B10979-02 版本,发布于2004年6月,是一本专门针对Oracle 10g (10.1)数据库的Java Database Connectivity (JDBC) 开发者指南和参考手册。这本书详尽地介绍了如何利用Oracle JDBC驱动程序来构建强大且高效的Java应用程序。
该书的主要内容涵盖了以下几个关键知识点:
1. Oracle JDBC驱动介绍:它解释了Oracle提供的JDBC API,这是一种Java标准,用于与Oracle数据库进行交互。通过JDBC,开发者可以编写Java代码来执行SQL查询、处理结果集以及执行存储过程等操作。
2. 连接管理:书中详细阐述了如何设置和管理JDBC连接,包括数据源配置、连接池技术的应用,以及异常处理的最佳实践。
3. 数据操作:涵盖了如何使用PreparedStatement、CallableStatement和ResultSet对象执行复杂的SQL语句,以及如何处理数据的读取和写入。
4. 事务处理:介绍了JDBC在Oracle数据库中的事务支持,包括原子性、一致性、隔离性和持久性(ACID)原则的实现。
5. 高级特性:包括JDBC 3.0及后续版本的新功能,如预编译语句、批处理、连接池优化、JDBC驱动的性能调优等。
6. 安全与认证:涵盖了如何在Java应用中实现Oracle数据库的安全性,包括用户名、密码、SSL/TLS加密以及访问控制列表(ACL)的管理。
7. 示例代码与实战项目:书中提供了丰富的代码示例和实践项目,帮助读者理解和应用JDBC技术。
8. 版权和许可协议:强调了书中的软件和文档包含Oracle的专有信息,受版权保护,并根据特定的许可协议提供,这可能限制了某些使用和披露条件。
9. 作者贡献:该书由多位经验丰富的作者共同编写,他们来自不同的背景,确保了内容的全面性和实用性,涵盖了Oracle JDBC开发的各个方面。
Oracle Database JDBC Developer's Guide and Reference 10g Release 1 (10.1) 是一名Java开发者不可或缺的参考资料,无论你是初次接触Oracle JDBC还是希望提升现有技能,都能从中获得宝贵的知识和实践经验。
xvi
OCI Driver Transparent Application Failover................................................................................. 19-7
Failover Type Events ...................................................................................................................... 19-7
TAF Callbacks.................................................................................................................................. 19-8
Java TAF Callback Interface .......................................................................................................... 19-8
Handling the FO_ERROR Event............................................................................................ 19-9
Handling the FO_ABORT Event............................................................................................ 19-9
OCI HeteroRM XA ................................................................................................................................ 19-9
Configuration and Installation...................................................................................................... 19-9
Exception Handling........................................................................................................................ 19-9
HeteroRM XA Code Example ....................................................................................................... 19-9
Accessing PL/SQL Index-by Tables ................................................................................................. 19-10
Overview........................................................................................................................................ 19-10
Binding IN Parameters................................................................................................................. 19-11
Receiving OUT Parameters.......................................................................................................... 19-12
Registering the OUT Parameters......................................................................................... 19-12
Accessing the OUT Parameter Values ................................................................................ 19-13
JDBC Default Mappings ................................................................................................ 19-13
Oracle Mappings............................................................................................................. 19-14
Java Primitive Type Mappings ..................................................................................... 19-14
20 OCI Instant Client
Overview ................................................................................................................................................ 20-1
Benefits of Instant Client..................................................................................................................... 20-2
JDBC OCI Instant Client Installation Process................................................................................. 20-2
When to Use Instant Client ................................................................................................................. 20-3
Patching Instant Client Shared Libraries ......................................................................................... 20-3
Regeneration of Data Shared Library................................................................................................ 20-4
Database Connection Names for OCI Instant Client..................................................................... 20-4
Environment Variables for OCI Instant Client ............................................................................... 20-5
21 End-To-End Metrics Support
Introduction............................................................................................................................................ 21-1
JDBC API For End-To-End Metrics.................................................................................................... 21-2
22 Performance Extensions
Update Batching .................................................................................................................................... 22-1
Overview of Update Batching Models......................................................................................... 22-1
Oracle Model versus Standard Model.................................................................................. 22-2
Types of Statements Supported............................................................................................. 22-2
Oracle Update Batching ................................................................................................................. 22-3
Oracle Update Batching Characteristics and Limitations.................................................. 22-3
Setting the Connection Batch Value...................................................................................... 22-4
Setting the Statement Batch Value......................................................................................... 22-4
Checking the Batch Value....................................................................................................... 22-5
Overriding the Batch Value ................................................................................................... 22-5
Committing the Changes in Oracle Batching ...................................................................... 22-6
xvii
Update Counts in Oracle Batching........................................................................................ 22-6
Standard Update Batching............................................................................................................. 22-8
Limitations in the Oracle Implementation of Standard Batching..................................... 22-8
Adding Operations to the Batch............................................................................................ 22-8
Executing the Batch ................................................................................................................. 22-9
Committing the Changes in the Oracle Implementation of Standard Batching........... 22-10
Clearing the Batch.................................................................................................................. 22-10
Update Counts in the Oracle Implementation of Standard Batching ............................ 22-11
Error Handling in the Oracle Implementation of Standard Batching............................ 22-12
Intermixing Batched Statements and Non-Batched Statements ..................................... 22-13
Premature Batch Flush ................................................................................................................. 22-13
Additional Oracle Performance Extensions................................................................................... 22-14
Oracle Row Prefetching................................................................................................................ 22-15
Setting the Oracle Prefetch Value........................................................................................ 22-15
Oracle Row-Prefetching Limitations................................................................................... 22-17
Defining Column Types............................................................................................................... 22-17
DatabaseMetaData TABLE_REMARKS Reporting.................................................................. 22-19
Considerations for getProcedures() and getProcedureColumns() Methods................. 22-20
23 JDBC Client-Side Security Features
JDBC Support for Oracle Advanced Security.................................................................................. 23-1
OCI Driver Support for Oracle Advanced Security................................................................... 23-1
Thin Driver Support for Oracle Advanced Security.................................................................. 23-2
JDBC Support for Login Authentication.......................................................................................... 23-2
JDBC Support for Data Encryption and Integrity .......................................................................... 23-2
OCI Driver Support for Encryption and Integrity ..................................................................... 23-3
Thin Driver Support for Encryption and Integrity .................................................................... 23-4
Setting Encryption and Integrity Parameters in Java ................................................................ 23-5
Complete example ................................................................................................................... 23-6
24 JDBC in Applets
Connecting to the Database through the Applet ............................................................................ 24-1
Connecting to a Database on a Different Host Than the Web Server......................................... 24-2
Using the Oracle Connection Manager........................................................................................ 24-2
Installing and Running the Oracle Connection Manager .................................................. 24-3
Writing the URL that Targets the Connection Manager.................................................... 24-4
Connecting through Multiple Connection Managers......................................................... 24-4
Using Signed Applets..................................................................................................................... 24-4
Using Applets with Firewalls ............................................................................................................ 24-5
Configuring a Firewall for Applets that use the JDBC Thin Driver ........................................ 24-5
Writing a URL to Connect through a Firewall............................................................................ 24-6
Packaging Applets................................................................................................................................. 24-7
Specifying an Applet in an HTML Page........................................................................................... 24-8
CODE, HEIGHT, and WIDTH ...................................................................................................... 24-8
CODEBASE...................................................................................................................................... 24-8
ARCHIVE......................................................................................................................................... 24-8
xviii
25 Reference Information
Valid SQL-JDBC Datatype Mappings............................................................................................... 25-1
Supported SQL and PL/SQL Datatypes............................................................................................ 25-3
Embedded SQL92 Syntax .................................................................................................................... 25-7
Disabling Escape Processing ......................................................................................................... 25-7
Time and Date Literals ................................................................................................................... 25-7
Date Literals.............................................................................................................................. 25-7
Time Literals............................................................................................................................. 25-8
Timestamp Literals .................................................................................................................. 25-8
Scalar Functions............................................................................................................................... 25-9
LIKE Escape Characters ................................................................................................................. 25-9
Outer Joins...................................................................................................................................... 25-10
Function Call Syntax..................................................................................................................... 25-10
SQL92 to SQL Syntax Example ................................................................................................... 25-10
Oracle JDBC Notes and Limitations................................................................................................ 25-11
CursorName................................................................................................................................... 25-11
SQL92 Outer Join Escapes............................................................................................................ 25-11
PL/SQL TABLE, BOOLEAN, and RECORD Types ................................................................ 25-11
IEEE 754 Floating Point Compliance.......................................................................................... 25-11
Catalog Arguments to DatabaseMetaData Calls...................................................................... 25-12
SQLWarning Class........................................................................................................................ 25-12
Binding Named Parameters ........................................................................................................ 25-12
Retaining Bound Values ....................................................................................................... 25-12
26 Server-Side Internal Driver
Introduction............................................................................................................................................ 26-1
Connecting to the Database with the Server-Side Internal Driver ............................................. 26-1
Connecting with the OracleDriver Class defaultConnection() Method ................................. 26-2
Connecting with the OracleDataSource.getConnection() Method .......................................... 26-3
Exception-Handling Extensions for the Server-Side Internal Driver ......................................... 26-3
Example ............................................................................................................................................ 26-4
Session and Transaction Context for the Server-Side Internal Driver........................................ 26-4
Testing JDBC on the Server................................................................................................................. 26-4
Loading an Application into the Server............................................................................................ 26-5
Loading Class Files into the Server .............................................................................................. 26-5
Loading Source Files into the Server............................................................................................ 26-6
Server-Side Character Set Conversion of oracle.sql.CHAR Data ................................................ 26-6
27 Proxy Authentication
Middle-Tier Authentication Through Proxy Connections............................................................ 27-1
28 Coding Tips and Troubleshooting
JDBC and Multithreading ................................................................................................................... 28-1
Performance Optimization .................................................................................................................. 28-4
Disabling Auto-Commit Mode ..................................................................................................... 28-4
Example: Disabling AutoCommit ........................................................................................ 28-5
xix
Standard Fetch Size and Oracle Row Prefetching...................................................................... 28-5
Standard and Oracle Update Batching ........................................................................................ 28-5
Mapping Between Built-in SQL and Java Types........................................................................ 28-6
Common Problems................................................................................................................................ 28-7
Memory Consumption for CHAR Columns Defined as OUT or IN/OUT Variables.......... 28-7
Memory Leaks and Running Out of Cursors.............................................................................. 28-7
Boolean Parameters in PL/SQL Stored Procedures................................................................... 28-7
Opening More Than 16 OCI Connections for a Process............................................................ 28-8
Using statement.cancel() ................................................................................................................ 28-8
Basic Debugging Procedures .............................................................................................................. 28-9
Oracle Net Tracing to Trap Network Events .............................................................................. 28-9
Client-Side Tracing ............................................................................................................... 28-10
TRACE_LEVEL_CLIENT ............................................................................................. 28-10
TRACE_DIRECTORY_CLIENT ................................................................................... 28-10
TRACE_FILE_CLIENT .................................................................................................. 28-10
TRACE_UNIQUE_CLIENT ......................................................................................... 28-11
Server-Side Tracing ............................................................................................................... 28-11
TRACE_LEVEL_SERVER ............................................................................................. 28-11
TRACE_DIRECTORY_SERVER .................................................................................. 28-11
TRACE_FILE_SERVER.................................................................................................. 28-11
Third Party Debugging Tools ..................................................................................................... 28-12
Transaction Isolation Levels and Access Modes ........................................................................... 28-12
A JDBC Error Messages
General Structure of JDBC Error Messages ....................................................................................... A-1
General JDBC Messages ........................................................................................................................ A-1
JDBC Messages Sorted by ORA Number...................................................................................... A-1
JDBC Messages Sorted Alphabetically........................................................................................... A-5
HeteroRM XA Messages ........................................................................................................................ A-9
HeteroRM XA Messages Sorted by ORA Number ...................................................................... A-9
HeteroRM XA Messages Sorted Alphabetically........................................................................... A-9
TTC Messages ........................................................................................................................................ A-10
TTC Messages Sorted by ORA Number...................................................................................... A-10
TTC Messages Sorted Alphabetically........................................................................................... A-11
Index
xx
List of Tables
3–1 Standard Datasource Properties .............................................................................................. 3-3
3–2 Oracle Extended Datasource Properties................................................................................. 3-4
3–3 Supported Database Specifiers ................................................................................................ 3-9
4–1 Import Statements for JDBC Driver ........................................................................................ 4-2
4–2 Connection Properties Recognized by Oracle JDBC Drivers .............................................. 4-3
4–3 Default Mappings Between SQL Types and Java Types................................................... 4-12
4–4 LONG and LONG RAW Data Conversions ....................................................................... 4-16
4–5 Bind-Size Limitations By........................................................................................................ 4-22
5–1 JDBC 3.0 Feature Support......................................................................................................... 5-3
5–2 Key Areas of JDBC 3.0 Functionality ...................................................................................... 5-3
5–3 BLOB Method Equivalents....................................................................................................... 5-7
5–4 CLOB Method Equivalents....................................................................................................... 5-7
6–1 Comparing Methods Used in Statement Caching................................................................. 6-3
6–2 Methods Used in Statement Allocation and Implicit Statement Caching......................... 6-6
6–3 Methods Used to Retrieve Explicitly Cached Statements.................................................... 6-8
8–1 onsctl commands........................................................................................................................ 8-3
9–1 Connection Mode Transitions.................................................................................................. 9-4
9–2 Oracle-XA Error Mapping..................................................................................................... 9-14
10–1 Oracle Datatype Classes......................................................................................................... 10-5
10–2 Key Interfaces and Classes of the oracle.jdbc Package.................................................... 10-11
11–1 getObject() and getOracleObject() Return Types ............................................................... 11-5
11–2 Summary of getXXX() Return Types.................................................................................... 11-6
11–3 Summary of setXXX() Input Parameter Types ................................................................... 11-9
11–4 Size Limitations for setBytes() and setString() Methods................................................. 11-11
13–1 JPublisher SQL Type Categories, Supported Settings, and Defaults ............................ 13-34
17–1 Visibility of Internal and External Changes for Oracle JDBC......................................... 17-19
18–1 The JDBC and Cached Row Sets Compared....................................................................... 18-8
19–1 PL/SQL Types and Corresponding JDBC Types............................................................. 19-10
19–2 Arguments of the setPlsqlIndexTable () Method ............................................................. 19-11
19–3 Arguments of the registerIndexTableOutParameter () Method .................................... 19-12
19–4 Argument of the getPlsqlIndexTable () Method .............................................................. 19-13
19–5 Argument of the getOraclePlsqlIndexTable () Method................................................... 19-14
19–6 Arguments of the getPlsqlIndexTable () Method............................................................. 19-15
20–1 OCI Instant Client Shared Libraries..................................................................................... 20-1
21–1 Maximum Lengths for End-to-End Metrics........................................................................ 21-1
22–1 Valid Column Type Specifications..................................................................................... 22-19
23–1 Client/Server Negotiations for Encryption or Integrity ................................................... 23-3
23–2 OCI Driver Client Parameters for Encryption and Integrity............................................ 23-4
23–3 Thin Driver Client Parameters for Encryption and Integrity........................................... 23-5
25–1 Valid SQL Datatype-Java Class Mappings.......................................................................... 25-1
25–2 Support for SQL Datatypes ................................................................................................... 25-3
25–3 Support for ANSI-92 SQL Datatypes................................................................................... 25-4
25–4 Support for SQL User-Defined Types.................................................................................. 25-5
25–5 Support for PL/SQL Datatypes............................................................................................ 25-5
28–1 Mapping of SQL Datatypes to Java Classes that Represent SQL Datatypes.................. 28-6
剩余431页未读,继续阅读
2009-05-11 上传
2010-01-13 上传
2023-06-18 上传
2023-04-06 上传
2023-06-18 上传
2010-09-14 上传
2023-06-18 上传
2010-02-03 上传
2023-06-18 上传
daredevil_rock
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 行业文档-设计装置-自动分离式太阳能热水器.zip
- 同城黑卡小程序集双端源码分享 后台模块+前端小程序.zip
- js图片和视频查看器插件.zip
- Uts-2018114033-Fitria-TokoBajuOnline
- [电子商务]PHP优惠促销程序源代码版[BBWPS] V2.1_bbwps_cuxiao.rar
- ipcqueue:POSIX和SYS V消息队列针对Python的实现
- ldif-preg_replace:类似于sed的修改和使用正则表达式转换LDIF文件-开源
- 4.9AdaptiveFilter-master_滤波_去燥_
- matlab代码读取hdf-EntropyCalculations:熵计算
- 中医疾病诊断编码---医保版;用于中医疾病诊断归一化
- jQuery黑白彩色图片切换.zip
- 制育秧钵机设计.zip机械设计毕业设计
- adamalbarghouthi
- 手势识别数据库预处理.zip
- FreeLunch:适用于python的元启发式优化套件
- 时空分数阶BS模型CN格式的数值解法_分数阶_Black-ScholeC-N_源码
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功