JDBC Driver for SQL/MP 3.0
is the name of the column to be associated with the BLOB. This column should be defined to SQL/MP as
CHAR
or VARCHAR 36.
sqlmp_catalog
is the name of the catalog associated with the BLOB table.
$vol.subvol [, ... ]
is a list of one or more locations in the Guardian file system where BLOB files can be stored. You must have
write access to these volume and subvolume locations.
BlobMapFile Property
A BlobMapFile property is used to specify a unique file name in the $volume.subvolume.filename format. If the
specified file does not already exist, the JDBC driver creates a key-sequenced Enscribe file using the specified name.
This file is used to store a list of all BLOB files created by the driver for that particular application. The BLOB map
file is secured for use only by its owner. A BlobMapFile property is identified by a 'BlobMapFile' key. This property
is required for BLOB support. The BlobMapFile property is used for later cleanup of obsolete BLOB files.
Format of a BlobMapFile Property
The format of a BlobMapFile property is:
BlobFileMap,$volume.subvolume.filename
where
BlobFileMap
is the key to the property.
$volume.subvolume.filename
is a file name in Guardian format.
Example Using BlobInfo Properties and the BlobMapFile Property
This example illustrates how to create BlobInfo properties. Two BlobInfo properties are created by this example.
The column PICTURE in table $VOL1.MYVOL.PRODUCT is used to contain BLOBs. The catalog for this table is
$VOL.CTLG. BLOB files associated with this column should be created in $VOL1.SUBVOL1 and $VOL2.SUBVOL2. The
column EMPPIC in table $VOL2.MYVOL.EMPLOYEE is used to contain BLOBs. The catalog for this table is $VOL.CTLG.
BLOB files associated with this column should be created in $VOL2.SUBVOL2.
A BlobMapFile property has also been defined for this example. The file $VOL2.MYVOL.BLOBMAP is created by the
driver to store a list of all the BLOB files created by the driver for this application.
java.util.Properties prop = new java.util.Properties( );
// add BlobInfo Properties
prop.put("BlobInfo1", ","$VOL1.MYVOL.PRODUCT, PICTURE, $VOL.CTLG, $VOL1.SUBVOL1, \
> $VOL2.SUBVOL2");
prop.put("BlobInfo2", ","$VOL2.MYVOL.EMPLOYEE, EMPPIC, $VOL.CTLG, $VOL2.SUBVOL2");
");//add BlobMapFile Property
prop.put("BlobMapFile", ","$VOL2.MYVOL.BLOBMAP");
");// add other properties to java.util.Properties object.....
The BLOB table name, column name, and catalog name are required by JDBC. At least one file location per BlobInfo
property is required to provide BLOB support. If more than one file location is provided, the JDBC driver searches
through the list of file locations when creating BLOB files.
Note: The table name and catalog name must be provided in the $volume.subvolume format. Aliases for
table names or catalog names cannot be substituted for BLOB properties.