Table of Contents
- List of Tables
- Title and Copyright Information
- Preface
- Changes in This Release for Oracle Database JDBC Developer's Guide
-
Part I Overview
- 1 Introducing JDBC
-
2
Getting Started
- 2.1 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
- 3.1 Support for JDBC 2.0 Standard
- 3.2 Support for JDBC 3.0 Standard
- 3.3 Support for JDBC 4.0 Standard
- 3.4 Support for JDBC 4.1 Standard
- 3.5 Support for JDBC 4.2 Standard
-
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
-
3
JDBC Standards Support
-
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 Data 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 LOBs and BFILEs
- 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 Support for Reactive Streams Ingestion
-
23
OCI Connection Pooling
- 23.1 Background of OCI Driver Connection Pooling
- 23.2 Comparison Between OCI Driver Connection Pooling and Shared Servers
- 23.3 About Defining an OCI Connection Pool
- 23.4 About Connecting to an OCI Connection Pool
- 23.5 Sample Code for OCI Connection Pooling
- 23.6 Statement Handling and Caching
- 23.7 JNDI and the OCI Connection Pool
- 24 Database Resident Connection Pooling
- 25 JDBC Support for Database Sharding
-
26
Oracle Advanced Queuing
- 26.1 Functionality and Framework of Oracle Advanced Queuing
- 26.2 Making Changes to the Database
- 26.3 AQ Asynchronous Event Notification
- 26.4 About Creating Messages
- 26.5 Example: Creating a Message and Setting a Payload
- 26.6 Enqueuing Messages
- 26.7 Dequeuing Messages
- 26.8 Examples: Enqueuing and Dequeuing
- 27 Continuous Query Notification
-
20
Statement and Result Set Caching
-
Part VI High Availability
- 28 Transaction Guard for Java
-
29
Application Continuity for Java
- 29.1 About Configuring Oracle JDBC for Application Continuity for Java
- 29.2 About Configuring Oracle Database for Application Continuity for Java
- 29.3 Application Continuity with DRCP
- 29.4 Application Continuity Support for XA Data Source
- 29.5 About Identifying Request Boundaries in Application Continuity for Java
- 29.6 Support for Transparent Application Continuity
- 29.7 Establishing the Initial State Before Application Continuity Replays
- 29.8 About Delaying the Reconnection in Application Continuity for Java
- 29.9 About Retaining Mutable Values in Application Continuity for Java
- 29.10 Application Continuity Statistics
-
29.11
About Disabling Replay in Application Continuity for Java
- 29.11.1 How to Disable Replay
-
29.11.2
When to Disable Replay
- 29.11.2.1 Application Calls External Systems that Should not Be Repeated
- 29.11.2.2 Application Synchronizes Independent Sessions
- 29.11.2.3 Application Uses Time at the Middle-tier in the Execution Logic
- 29.11.2.4 Application assumes that ROWIds do not change
- 29.11.2.5 Application Assumes that Side Effects Execute Once
- 29.11.2.6 Application Assumes that Location Values Do not Change
- 29.11.3 Diagnostics and Tracing
- 30 Oracle JDBC Support for FAN Events
- 31 Transparent Application Failover
-
32
Single Client Access Name
- 32.1 Overview of Single Client Access Name
- 32.2 About Configuring the Database Using the SCAN
- 32.3 How Connection Load Balancing Works Using the SCAN
- 32.4 Version and Backward Compatibility
- 32.5 Using the SCAN in a Maximum Availability Architecture Environment
- 32.6 Using the SCAN With Oracle Connection Manager
- Part VII Transaction Management
-
Part VIII Manageability
- 34 Database Administration
-
35
Diagnosability in JDBC
- 35.1 About Logging Feature of Oracle JDBC Drivers
- 35.2 Diagnosability Management
- 36 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