Database SecureFiles and Large Objects Developer's Guide
ContentsOpens a new window
Opens a new window
Page 35 of 37

A LOB Demonstration Files

This appendix describes files distributed with the database that demonstrate how LOBs are used in supported programmatic environments. This appendix contains these topics:

PL/SQL LOB Demonstration Files

The following table lists PL/SQL demonstration files. These files are installed in $ORACLE_HOME/rdbms/demo/lobs/plsql/. A driver program, lobdemo.sql, that calls these files is found in the same directory.

Table A-1 PL/SQL Demonstration Examples

File Name Description Usage Information

fclose_c.sql

Closing a BFILE with CLOSE

Closing a BFILE with CLOSEOpens a new window

fclose_f.sql

Closing a BFILE with FILECLOSE

Closing a BFILE with FILECLOSEOpens a new window

fclosea.sql

Closing all open BFILEs

Closing All Open BFILEs with FILECLOSEALLOpens a new window

fcompare.sql

Comparing all or parts of two BFILEs

Comparing All or Parts of Two BFILESOpens a new window

fcopyloc.sql

Copying a LOB locator for a BFILE

Assigning a BFILE LocatorOpens a new window

fdisplay.sql

Displaying BFILE data

Displaying BFILE DataOpens a new window

fexists.sql

Checking if a BFILE exists

Determining Whether a BFILE ExistsOpens a new window

ffilopen.sql

Opening a BFILE with FILEOPEN

Opening a BFILE with FILEOPENOpens a new window

ffisopen.sql

Checking if the BFILE is OPEN with FILEISOPEN

Determining Whether a BFILE Is Open with FILEISOPENOpens a new window

fgetdir.sql

Getting the directory object name and filename of a BFILE

Getting Directory Object Name and File Name of a BFILEOpens a new window

finsert.sql

Inserting row containing a BFILE by initializing a BFILE locator

Inserting a Row Containing a BFILEOpens a new window

fisopen.sql

Checking if the BFILE is open with ISOPEN

Determining Whether a BFILE Is Open Using ISOPENOpens a new window

flength.sql

Getting the length of a BFILE

Getting the Length of a BFILEOpens a new window

floadlob.sql

Loading a LOB with BFILE data

Loading a LOB with BFILE DataOpens a new window

fopen.sql

Opening a BFILE with OPEN

Opening a BFILE with OPENOpens a new window

fpattern.sql

Checking if a pattern exists in a BFILE using instr

Checking If a Pattern Exists in a BFILE Using INSTROpens a new window

fread.sql

Reading data from a BFILE

Reading Data from a BFILEOpens a new window

freadprt.sql

Reading portion of a BFILE data using substr

Reading a Portion of BFILE Data Using SUBSTROpens a new window

fupdate.sql

Updating a BFILE by initializing a BFILE locator

Updating a BFILE by Initializing a BFILE LocatorOpens a new window

lappend.sql

Appending one LOB to another

Appending One LOB to AnotherOpens a new window

lcompare.sql

Comparing all or part of LOB

Comparing All or Part of Two LOBsOpens a new window

lcopy.sql

Copying all or part of a LOB to another LOB

Copying All or Part of One LOB to Another LOBOpens a new window

lcopyloc.sql

Copying a LOB locator

Copying All or Part of One LOB to Another LOBOpens a new window

ldisplay.sql

Displaying LOB data

Displaying LOB DataOpens a new window

lerase.sql

Erasing part of a LOB

Erasing Part of a LOBOpens a new window

linsert.sql

Inserting a row by initializing LOB locator bind variable

Inserting a Row by Initializing a LOB Locator Bind VariableOpens a new window

linstr.sql

Seeing if pattern exists in LOB (instr)

Patterns: Checking for Patterns in a LOB Using INSTROpens a new window

lisopen.sql

Seeing if LOB is open

Determining Whether a LOB is OpenOpens a new window

listemp.sql

Seeing if LOB is temporary

Determining Whether a LOB instance Is TemporaryOpens a new window

lldblobf.sql

Using DBMS_LOB.LOADBLOBFROMFILE to load a BLOB with data from a BFILE

Loading a BLOB with Data from a BFILEOpens a new window

lldclobf.sql

Using DBMS_LOB.LOADCLOBFROMFILE to load a CLOB or NCLOB with data from a BFILE

Loading a CLOB or NCLOB with Data from a BFILEOpens a new window

lldclobs.sql

Using DBMS_LOB.LOADCLOBFROMFILE to load segments of a stream of data from a BFILE into different CLOBs

Loading a CLOB or NCLOB with Data from a BFILEOpens a new window

llength.sql

Getting the length of a LOB

Length: Determining the Length of a LOBOpens a new window

lloaddat.sql

Loading a LOB with BFILE data

Loading a LOB with Data from a BFILEOpens a new window

lobuse.sql

Examples of LOB API usage.

Creating Persistent and Temporary LOBs in PL/SQLOpens a new window

lread.sql

Reading data from LOB

Reading Data from a LOBOpens a new window

lsubstr.sql

Reading portion of LOB (substr)

Reading a Portion of a LOB (SUBSTR)Opens a new window

ltrim.sql

Trimming LOB data

Trimming LOB DataOpens a new window

lwrite.sql

Writing data to a LOB

Writing Data to a LOBOpens a new window

lwriteap.sql

Writing to the end of LOB (write append)

Appending to a LOBOpens a new window


OCI LOB Demonstration Files

The following table lists OCI demonstration files. These files are installed in $ORACLE_HOME/rdbms/demo/lobs/oci/. A driver program, lobdemo.c, that calls these files is found in the same directory, as is the header file lobdemo.h.

Table A-2 OCI Demonstration Examples

File Name Description Usage Information

fclose_c.c

Closing a BFILE with CLOSE

Closing a BFILE with CLOSEOpens a new window

fclose_f.c

Closing a BFILE with FILECLOSE

Closing a BFILE with FILECLOSEOpens a new window

fclosea.c

Closing all open BFILEs

Closing All Open BFILEs with FILECLOSEALLOpens a new window

fcopyloc.c

Copying a LOB locator for a BFILE

Assigning a BFILE LocatorOpens a new window

fdisplay.c

Displaying BFILE data

Displaying BFILE DataOpens a new window

fexists.c

Checking if a BFILE exists

Determining Whether a BFILE ExistsOpens a new window

ffilopen.c

Opening a BFILE with FILEOPEN

Opening a BFILE with FILEOPENOpens a new window

ffisopen.c

Checking if the BFILE is OPEN with FILEISOPEN

Determining Whether a BFILE Is Open with FILEISOPENOpens a new window

fgetdir.c

Getting the directory object name and filename of a BFILE

Getting Directory Object Name and File Name of a BFILEOpens a new window

finsert.c

Inserting row containing a BFILE by initializing a BFILE locator

Inserting a Row Containing a BFILEOpens a new window

fisopen.c

Checking if the BFILE is open with ISOPEN

Determining Whether a BFILE Is Open Using ISOPENOpens a new window

flength.c

Getting the length of a BFILE

Getting the Length of a BFILEOpens a new window

floadlob.c

Loading a LOB with BFILE data

Loading a LOB with BFILE DataOpens a new window

fopen.c

Opening a BFILE with OPEN

Opening a BFILE with OPENOpens a new window

fread.c

Reading data from a BFILE

Reading Data from a BFILEOpens a new window

fupdate.c

Updating a BFILE by initializing a BFILE locator

Updating a BFILE by Initializing a BFILE LocatorOpens a new window

lappend.c

Appending one LOB to another

Appending One LOB to AnotherOpens a new window

lcopy.c

Copying all or part of a LOB to another LOB

Copying All or Part of One LOB to Another LOBOpens a new window

lcopyloc.c

Copying a LOB locator

Copying All or Part of One LOB to Another LOBOpens a new window

ldisbuf.c

Disabling LOB buffering (persistent LOBs)

Disabling LOB BufferingOpens a new window

ldisplay.c

Displaying LOB data

Displaying LOB DataOpens a new window

lequal.c

Seeing if one LOB locator is equal to another

Equality: Checking If One LOB Locator Is Equal to AnotherOpens a new window

lerase.c

Erasing part of a LOB

Erasing Part of a LOBOpens a new window

lgetchar.c

Getting character set id

Determining Character Set IDOpens a new window

lgetchfm.c

Getting character set form of the foreign language ad text, ad_fltextn

Determining Character Set FormOpens a new window

linit.c

Seeing if a LOB locator is initialized

Determining Whether LOB Locator Is InitializedOpens a new window

linsert.c

Inserting a row by initializing LOB locator bind variable

Inserting a Row by Initializing a LOB Locator Bind VariableOpens a new window

lisopen.c

Seeing if LOB is open

Determining Whether a LOB is OpenOpens a new window

listemp.c

Seeing if LOB is temporary

Determining Whether a LOB instance Is TemporaryOpens a new window

llength.c

Getting the length of a LOB

Length: Determining the Length of a LOBOpens a new window

lloaddat.c

Loading a LOB with BFILE data

Loading a LOB with Data from a BFILEOpens a new window

lread.c

Reading data from LOB

Reading Data from a LOBOpens a new window

lreadarr.c

Reading data from an array of LOB locators

LOB Array ReadOpens a new window

ltrim.c

Trimming LOB data

Trimming LOB DataOpens a new window

lwrite.c

Writing data to a LOB

Writing Data to a LOBOpens a new window

lwritearr.c

Writing data into an array of LOB locators

LOB Array WriteOpens a new window

lwriteap.c

Writing to the end of LOB (write append)

Appending to a LOBOpens a new window


Java LOB Demonstration Files

The following table lists Java demonstration files. These files are installed in $ORACLE_HOME/rdbms/demo/lobs/java/.

Table A-3 Java Demonstration Examples

File Name Description Usage Information

Readme.txt

-

See Oracle Database JDBC Developer's GuideOpens a new window for information on setting up your system to be able to compile and run JDBC programs with the Oracle Driver

LobDemoConnectionFactory.java

-

As written LobDemoConnectionFactory uses the JDBC OCI driver with a local connection. You should edit the URL "jdbc:oracle:oci8:@" to match your setup. Again see Oracle Database JDBC Developer's GuideOpens a new window.

fclose_c.java

Closing a BFILE with CLOSE

Closing a BFILE with CLOSEOpens a new window

fclose_f.java

Closing a BFILE with FILECLOSE

Closing a BFILE with FILECLOSEOpens a new window

fclosea.java

Closing all open BFILEs

Closing All Open BFILEs with FILECLOSEALLOpens a new window

fcompare.java

Comparing all or parts of two BFILEs

Comparing All or Parts of Two BFILESOpens a new window

fexists.java

Checking if a BFILE exists

Determining Whether a BFILE ExistsOpens a new window

ffilopen.java

Opening a BFILE with FILEOPEN

Opening a BFILE with FILEOPENOpens a new window

ffisopen.java

Checking if the BFILE is OPEN with FILEISOPEN

Determining Whether a BFILE Is Open with FILEISOPENOpens a new window

fgetdir.java

Getting the directory object name and filename of a BFILE

Getting Directory Object Name and File Name of a BFILEOpens a new window

finsert.java

Inserting row containing a BFILE by initializing a BFILE locator

Inserting a Row Containing a BFILEOpens a new window

fisopen.java

Checking if the BFILE is open with ISOPEN

Determining Whether a BFILE Is Open Using ISOPENOpens a new window

flength.java

Getting the length of a BFILE

Getting the Length of a BFILEOpens a new window

fopen.java

Opening a BFILE with OPEN

Opening a BFILE with OPENOpens a new window

fpattern.java

Checking if a pattern exists in a BFILE using instr

Checking If a Pattern Exists in a BFILE Using INSTROpens a new window

fread.java

Reading data from a BFILE

Reading Data from a BFILEOpens a new window

fupdate.java

Updating a BFILE by initializing a BFILE locator

Updating a BFILE by Initializing a BFILE LocatorOpens a new window

lappend.java

Appending one LOB to another

Appending One LOB to AnotherOpens a new window

lcompare.java

Comparing all or part of LOB

Comparing All or Part of Two LOBsOpens a new window

lcopy.java

Copying all or part of a LOB to another LOB

Copying All or Part of One LOB to Another LOBOpens a new window

lerase.java

Erasing part of a LOB

Erasing Part of a LOBOpens a new window

linsert.java

Inserting a row by initializing LOB locator bind variable

Inserting a Row by Initializing a LOB Locator Bind VariableOpens a new window

linstr.java

Seeing if pattern exists in LOB (instr)

Patterns: Checking for Patterns in a LOB Using INSTROpens a new window

lisopen.java

Seeing if LOB is open

Determining Whether a LOB is OpenOpens a new window

listempb.java

Seeing if LOB is temporary

Determining Whether a LOB instance Is TemporaryOpens a new window

listempc.java

Seeing if LOB is temporary

Determining Whether a LOB instance Is TemporaryOpens a new window

llength.java

Getting the length of a LOB

Length: Determining the Length of a LOBOpens a new window

lloaddat.java

Loading a LOB with BFILE data

Loading a LOB with Data from a BFILEOpens a new window

lread.java

Reading data from LOB

Reading Data from a LOBOpens a new window

lsubstr.java

Reading portion of LOB (substr)

Reading a Portion of a LOB (SUBSTR)Opens a new window

ltrim.java

Trimming LOB data

Trimming LOB DataOpens a new window

lwrite.java

Writing data to a LOB

Writing Data to a LOBOpens a new window

lwriteap.java

Writing to the end of LOB (write append)

Appending to a LOBOpens a new window