Table of Contents
- List of Tables
- Title and Copyright Information
- Preface
-
Part I Overview
- 1 Introducing JDBC
-
2
Getting Started
- 2.1 RDBMS and JDK Version Compatibility for Oracle JDBC Drivers
- 2.2 Verifying a JDBC Client Installation
-
2.3
Basic Steps in JDBC
- 2.3.1 Importing Packages
- 2.3.2 Opening a Connection to a Database
- 2.3.3 Creating a Statement Object
- 2.3.4 Running a Query and Retrieving a Result Set Object
- 2.3.5 Processing the Result Set Object
- 2.3.6 Closing the Result Set and Statement Objects
- 2.3.7 Making Changes to the Database
- 2.3.8 About Committing Changes
- 2.3.9 Closing the Connection
- 2.4 Sample: Connecting, Querying, and Processing the Results
- 2.5 Support for Invisible Columns
- 2.6 Support for Verifying JSON Data
- 2.7 Support for Implicit Results
- 2.8 Support for Lightweight Connection Validation
- 2.9 Support for Deprioritization of Database Nodes
- 2.10 Support for Oracle Connection Manager in Traffic Director Mode
- 2.11 Stored Procedure Calls in JDBC Programs
- 2.12 About Processing SQL Exceptions
-
Part II Oracle JDBC
- 3 JDBC Standards Support
-
4
Oracle Extensions
- 4.1 Overview of Oracle Extensions
- 4.2 Features of the Oracle Extensions
- 4.3 Oracle JDBC Packages
- 4.4 Oracle Character Data Types Support
-
4.5
Additional Oracle Type Extensions
- 4.5.1 Oracle ROWID Type
- 4.5.2 Oracle REF CURSOR Type Category
- 4.5.3 Oracle BINARY_FLOAT and BINARY_DOUBLE Types
- 4.5.4 Oracle SYS.ANYTYPE and SYS.ANYDATA Types
-
4.5.5
The oracle.jdbc Package
- 4.5.5.1 Interface oracle.jdbc.OracleConnection
- 4.5.5.2 Interface oracle.jdbc.OracleStatement
- 4.5.5.3 Interface oracle.jdbc.OraclePreparedStatement
- 4.5.5.4 Interface oracle.jdbc.OracleCallableStatement
- 4.5.5.5 Interface oracle.jdbc.OracleResultSet
- 4.5.5.6 Interface oracle.jdbc.OracleResultSetMetaData
- 4.5.5.7 Class oracle.jdbc.OracleTypes
- 4.6 DML Returning
- 4.7 Accessing PL/SQL Associative Arrays
- 5 Features Specific to JDBC Thin
-
6
Features Specific to JDBC OCI Driver
- 6.1 OCI Connection Pooling
- 6.2 Transparent Application Failover
- 6.3 OCI Native XA
-
6.4
OCI Instant Client
- 6.4.1 Overview of Instant Client
- 6.4.2 OCI Instant Client Shared Libraries
- 6.4.3 Benefits of Instant Client
- 6.4.4 JDBC OCI Instant Client Installation Process
- 6.4.5 Usage of Instant Client
- 6.4.6 About Patching Instant Client Shared Libraries
- 6.4.7 Regeneration of Data Shared Library and ZIP files
- 6.4.8 Database Connection Names for OCI Instant Client
- 6.4.9 Environment Variables for OCI Instant Client
- 6.5 About Instant Client Light (English)
- 7 Server-Side Internal Driver
-
Part III Connection and Security
-
8
Data Sources and URLs
-
8.1
About Data Sources
- 8.1.1 Overview of Oracle Data Source Support for JNDI
- 8.1.2 Features and Properties of Data Sources
- 8.1.3 Creating a Data Source Instance and Connecting
- 8.1.4 Creating a Data Source Instance, Registering with JNDI, and Connecting
- 8.1.5 Supported Connection Properties
- 8.1.6 About Using Roles for SYS Login
- 8.1.7 Configuring Database Remote Login
- 8.1.8 Using Bequeath Connection and SYS Logon
- 8.1.9 Setting Properties for Oracle Performance Extensions
- 8.1.10 Support for Network Data Compression
- 8.2 Database URLs and Database Specifiers
-
8.1
About Data Sources
-
9
JDBC Client-Side Security Features
- 9.1 Support for Oracle Advanced Security
- 9.2 Support for Login Authentication
- 9.3 Support for Strong Authentication
- 9.4 Support for Network Encryption and Integrity
-
9.5
Support for SSL
- 9.5.1 Overview of JDBC Support for SSL
- 9.5.2 About Managing Certificates and Wallets
- 9.5.3 About Keys and certificates containers
- 9.5.4 Database Connectivity Over TLS Version 1.2 Using JDBC Thin and JKS
- 9.5.5 Automatic SSL Connection Configuration
- 9.5.6 Support for Default SSL Context
- 9.5.7 Support for Key Store Service
- 9.6 Support for Kerberos
- 9.7 Support for RADIUS
- 9.8 About Secure External Password Store
- 10 Proxy Authentication
-
8
Data Sources and URLs
-
Part IV Data Access and Manipulation
-
11
Accessing and Manipulating Oracle Data
- 11.1 Data Type Mappings
- 11.2 Data Conversion Considerations
- 11.3 Result Set and Statement Extensions
-
11.4
Comparison of Oracle get and set Methods to Standard JDBC
- 11.4.1 Standard getObject Method
- 11.4.2 Oracle getOracleObject Method
- 11.4.3 Summary of getObject and getOracleObject Return Types
- 11.4.4 Other getXXX Methods
- 11.4.5 Data Types For Returned Objects from getObject and getXXX
- 11.4.6 The setObject and setOracleObject Methods
- 11.4.7 Other setXXX Methods
- 11.5 Using Result Set Metadata Extensions
- 11.6 About Using SQL CALL and CALL INTO Statements
- 12 Java Streams in JDBC
-
13
Working with Oracle Object Types
- 13.1 About Mapping Oracle Objects
- 13.2 About Using the Default STRUCT Class for Oracle Objects
-
13.3
About Creating and Using Custom Object Classes for Oracle Objects
- 13.3.1 Overview of Creating and Using Custom Object Classes
- 13.3.2 Relative Advantages of OracleData versus SQLData
- 13.3.3 About Type Maps for SQLData Implementations
- 13.3.4 About Creating Type Map and Defining Mappings for a SQLData Implementation
- 13.3.5 About Reading and Writing Data with a SQLData Implementation
- 13.3.6 About the OracleData Interface
- 13.3.7 About Reading and Writing Data with an OracleData Implementation
- 13.3.8 Additional Uses of OracleData
- 13.4 Object-Type Inheritance
- 13.5 About Describing an Object Type
- 14 Working with Large Objects and SecureFiles
- 15 Using Oracle Object References
-
16
Working with Oracle Collections
- 16.1 Oracle Extensions for Collections
- 16.2 Overview of Collection Functionality
- 16.3 ARRAY Performance Extension Methods
-
16.4
Creating and Using Arrays
- 16.4.1 Creating ARRAY Objects
-
16.4.2
Retrieving an Array and Its Elements
- 16.4.2.1 About Retrieving the Array
- 16.4.2.2 Data Retrieval Methods
- 16.4.2.3 Comparing the Data Retrieval Methods
- 16.4.2.4 Retrieving Elements of a Structured Object Array According to a Type Map
- 16.4.2.5 Retrieving a Subset of Array Elements
- 16.4.2.6 Retrieving Array Elements into an oracle.sql.Datum Array
- 16.4.2.7 About Accessing Multilevel Collection Elements
- 16.4.3 Passing Arrays to Statement Objects
- 16.5 Using a Type Map to Map Array Elements
- 17 Result Set
- 18 JDBC RowSets
- 19 Globalization Support
-
11
Accessing and Manipulating Oracle Data
-
Part V Performance and Scalability
-
20
Statement and Result Set Caching
- 20.1 About Statement Caching
- 20.2 About Using Statement Caching
- 20.3 About Reusing Statements Objects
- 20.4 About Result Set Caching
-
21
Performance Extensions
-
21.1
Update Batching
- 21.1.1 Overview of Update Batching
-
21.1.2
Standard Update Batching
- 21.1.2.1 Limitations in the Oracle Implementation of Standard Batching
- 21.1.2.2 About Adding Operations to the Batch
- 21.1.2.3 About Processing the Batch
- 21.1.2.4 Row Count per Iteration for Array DMLs
- 21.1.2.5 About Committing the Changes in the Oracle Implementation of Standard Batching
- 21.1.2.6 About Clearing the Batch
- 21.1.2.7 Update Counts in the Oracle Implementation of Standard Batching
- 21.1.2.8 Error Handling in the Oracle Implementation of Standard Batching
- 21.1.2.9 About Intermixing Batched Statements and Nonbatched Statements
- 21.1.3 Premature Batch Flush
- 21.2 Additional Oracle Performance Extensions
-
21.1
Update Batching
-
22
JDBC Reactive Extensions
- 22.1 Overview of JDBC Reactive Extensions
-
22.2
About Building an Application with Reactive Streams Extensions
- 22.2.1 Opening a Connection Using Asynchronous Methods
- 22.2.2 Execution of SQL Statements with Asynchronous Methods
- 22.2.3 About Fetching Row Data with Asynchronous Methods
- 22.2.4 Reading LOB Data Using Asynchronous Methods
- 22.2.5 Writing LOB Data Using Asynchronous Methods
- 22.2.6 Committing a Transaction Using Asynchronous Methods
- 22.2.7 Closing a Connection Using Asynchronous Methods
- 22.3 Threading Model of Asynchronous Methods
- 22.4 About the Flow API
- 22.5 Using the FlowAdapters Class
- 22.6 Streaming Row Data with the Reactor Library
- 22.7 Streaming Row Data with the RxJava Library
- 22.8 Streaming Row Data with the Akka Streams Library
- 22.9 Limitations of JDBC Reactive Extensions
- 23 Support for Java library for Reactive Streams Ingestion
-
24
OCI Connection Pooling
- 24.1 Background of OCI Driver Connection Pooling
- 24.2 Comparison Between OCI Driver Connection Pooling and Shared Servers
- 24.3 About Defining an OCI Connection Pool
- 24.4 About Connecting to an OCI Connection Pool
- 24.5 Sample Code for OCI Connection Pooling
- 24.6 Statement Handling and Caching
- 24.7 JNDI and the OCI Connection Pool
-
25
Database Resident Connection Pooling
- 25.1 Overview of Database Resident Connection Pooling
- 25.2 Enabling Database Resident Connection Pooling
- 25.3 Pooled Server Processes Across Multiple Connection Pools
- 25.4 Tagging Support in Database Resident Connection Pooling
- 25.5 PL/SQL Callback for Session State Fix Up
- 25.6 APIs for Using Database Resident Connection Pooling
- 26 JDBC Support for Database Sharding
-
27
Oracle Advanced Queuing
- 27.1 Functionality and Framework of Oracle Advanced Queuing
- 27.2 Making Changes to the Database
- 27.3 AQ Asynchronous Event Notification
- 27.4 About Creating Messages
- 27.5 Example: Creating a Message and Setting a Payload
- 27.6 Enqueuing Messages
- 27.7 Dequeuing Messages
- 27.8 Examples: Enqueuing and Dequeuing
- 28 Continuous Query Notification
-
20
Statement and Result Set Caching
-
Part VI High Availability
- 29 Transaction Guard for Java
-
30
Application Continuity for Java
- 30.1 About Configuring Oracle JDBC for Application Continuity for Java
- 30.2 About Configuring Oracle Database for Application Continuity for Java
- 30.3 Application Continuity with DRCP
- 30.4 Application Continuity Support for XA Data Source
- 30.5 About Identifying Request Boundaries in Application Continuity for Java
- 30.6 Support for Transparent Application Continuity
- 30.7 Establishing the Initial State Before Application Continuity Replays
- 30.8 About Delaying the Reconnection in Application Continuity for Java
- 30.9 About Retaining Mutable Values in Application Continuity for Java
- 30.10 Application Continuity Statistics
-
30.11
About Disabling Replay in Application Continuity for Java
- 30.11.1 How to Disable Replay
-
30.11.2
When to Disable Replay
- 30.11.2.1 Application Calls External Systems that Should not Be Repeated
- 30.11.2.2 Application Synchronizes Independent Sessions
- 30.11.2.3 Application Uses Time at the Middle-tier in the Execution Logic
- 30.11.2.4 Application assumes that ROWIds do not change
- 30.11.2.5 Application Assumes that Side Effects Execute Once
- 30.11.2.6 Application Assumes that Location Values Do not Change
- 30.11.3 Diagnostics and Tracing
- 31 Oracle JDBC Support for FAN Events
- 32 Transparent Application Failover
-
33
Single Client Access Name
- 33.1 Overview of Single Client Access Name
- 33.2 About Configuring the Database Using the SCAN
- 33.3 How Connection Load Balancing Works Using the SCAN
- 33.4 Version and Backward Compatibility
- 33.5 Using the SCAN in a Maximum Availability Architecture Environment
- 33.6 Using the SCAN With Oracle Connection Manager
- Part VII Transaction Management
-
Part VIII Manageability
- 35 Database Administration
-
36
Diagnosability in JDBC
- 36.1 About Logging Feature of Oracle JDBC Drivers
- 36.2 Diagnosability Management
- 37 JDBC DMS Metrics
-
Appendixes
- A JDBC Reference Information
- B Oracle RAC Fast Application Notification
-
C
JDBC Coding Tips
- C.1 JDBC and Multithreading
- C.2 Performance Optimization of JDBC Programs
- C.3 Transaction Isolation Levels and Access Modes in JDBC
- D JDBC Error Messages
-
E
Troubleshooting
-
E.1
Common Problems
- E.1.1 Memory Consumption for CHAR Columns Defined as OUT or IN/OUT Variables
- E.1.2 Memory Leaks and Running Out of Cursors
- E.1.3 Opening More than 16 OCI Connections for a Process
- E.1.4 Using statement.cancel
- E.1.5 Using JDBC with Firewalls
- E.1.6 Frequent Abrupt Disconnection from Server
- E.1.7 Network Adapter Cannot Establish Connection
- E.2 Basic Debugging Procedures
-
E.1
Common Problems
- Index