JDBC Type 4 Driver 1.1 Programmer's Reference

Creating LOB Tables
Except as noted below, use the -create and -execute options of the Lob Admin Utility to create LOB tables.
Note: Partitioned LOB tables must be manually created. You cannot use the Lob Admin Utility if your site needs
partitioned LOB tables. Do not use the -execute option of the Lob Admin Utility. Follow these steps to
manually create partitioned LOB tables:
Use the -create and -out options of the Lob Admin Utility to have SQL statements written to a file.1.
Modify the generated SQL statements as needed for your partitioning requirements.2.
Add the modified SQL statements to an MXCI script file.3.
Move the MXCI script file to the OSS environment, and run it.4.
Using SQL/MX Triggers to Delete LOB Data
Use the Type 4 Lob Admin Utility to generate triggers that delete LOB data from the LOB table when the base row is
deleted. These triggers ensure that orphan LOB data does not occur in the LOB table. To manage the triggers, use these
Type 4 Lob Admin Utility options:
-trigger
Generates SQL statements to create triggers.
-drop
Generates SQL statements to drop triggers.
-exec
Executes the SQL statements that are generated.
For example, the following command generates the SQL statements to create the triggers for the base table
sales.paris.pictures, which contains a BLOB column, and executes those statements. Note: This command must
be typed on one line.
java -Dt4sqlmx.blobTableName=sales.paris.lobTable4pictures
com.tandem.t4jdbc.T4LobAdmin
-trigger
-exec sales.paris.pictures
Backing Up and Restoring LOB Columns
For basic information about backing up and restoring databases, see the SQL/MX Installation and Management Manual.
That discussion describes the special considerations you must take for backing up and restoring tables that have LOB
columns implemented for the Type 4 driver (because both base tables and LOB tables are involved).
When backing up and restoring a base table, make sure that the name of the table is unchanged. LOB data is not be
accessible after restoration if the base table name has changed.
Triggers cannot be restored by using Backup and Restore 2.0. You can capture the DDL for the CREATE
statements executed for these objects and use this information to manually recreate these objects after a Restore
operation.
Make sure that the time interval in the backup of the base tables and LOB tables is not large. A smaller time interval
ensures that the data referred to by the base table is present in the LOB table.