Oracle9i Application Developer's Guide - Large Objects (LOBs)
Release 1 (9.0.1)

Part Number A88879-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Temporary LOBs, 4 of 29


Features Specific to Temporary LOBs

The following features are specific to temporary LOBs:

Security Issues with Temporary LOBs

Security is provided through the LOB locator.

NOCOPY Restrictions

See PL/SQL User's Guide and Reference, Chapter 7: "SUBPROGRAMS" -- NOCOPY COMPILER HINT, for guidelines, restrictions, and tips on using NOCOPY.

Managing Temporary LOBs

Oracle keeps track of temporary LOBs per session, and provides a v$ view called v$temporary_lobs. From the session the application can determine that user owns the temporary LOBs. This view can be used by DBAs to monitor and guide any emergency cleanup of temporary space used by temporary LOBs.

Using JDBC and Temporary LOBs

Oracle9i JDBC drivers contain APIs to create and close temporary LOBs. These APIs should replace the previous workaround of using dbms_lob.createTemporary(), dbms_lob.isTemporary() and dbms_lob.freeTemporary() in dbms_lob PL/SQL package.

Using JDBC and Temporary BLOBs

oracle.sql.BLOB class is the Oracle JDBC driver's implementation of standard JDBC java.sql.Blob interface. Each oracle.sql.BLOB instance represents a BLOB object in the database. Table 11-2 lists new Oracle extension APIs in oracle.sql.BLOB to access temporary BLOBs.


Table 11-2 JDBC: Temporary BLOB APIs
Methods  Description 

public static BLOB createTemporary(Connection conn, boolean cache, int duration) throws SQLException 

Creates a temporary BLOB. See  

public static boolean isTemporary(BLOB blob) throws SQLException 

Checks if the specified BLOB locator refers to a temporary BLOB  

public boolean isTemporary() throws SQLException 

Checks if the current BLOB locator refers to a temporary BLOB 

public static void freeTemporary(BLOB temp_blob) throws SQLException 

Frees the specified temporary BLOB 

public void freeTemporary() throws SQLException 

Frees the temporary BLOB 

Using JDBC and Temporary CLOBs

oracle.sql.CLOB class is the Oracle JDBC driver's implementation of standard JDBC java.sql.Clob interface. Table 11-3 lists the new Oracle extension APIs in oracle.sql.CLOB for accessing temporary CLOBs.


Table 11-3 JDBC: Temporary CLOB APIs
Methods  Description 

public static CLOB createTemporary(Connection conn, boolean cache, int duration) throws SQLException 

Creates a temporary CLOB 

public static boolean isTemporary(CLOB clob) throws SQLException 

Checks if the specified CLOB locator refers to a temporary CLOB  

public boolean isTemporary() throws SQLException 

Checks if the current CLOB locator refers to a temporary CLOB 

public static void freeTemporary(CLOB temp_clob) throws SQLException 

Frees the specified temporary CLOB 

public void freeTemporary() throws SQLException 

Frees the temporary CLOB 



Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback