Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > UNLOAD >

Unloading Smart Large Objects (IDS)

The database server unloads smart large objects (BLOB and CLOB columns) into a separate operating-system file on the client computer, in the same directory as the UNLOAD TO file. The file has a name in one of these formats:

In the preceding formats, the pound (#) symbols represent the digits of the unique hexadecimal smart-large-object identifier. The database server uses the hexadecimal ID for the first smart large object in the file. The maximum number of digits for a smart-large-object identifier is 17. Most smart large objects, however, would have an identifier with fewer digits.

When the database server unloads the first smart large object, it creates the appropriate BLOB or CLOB client file with the hexadecimal identifier of the smart large object. If additional smart-large-object values are present, the database server creates another BLOB or CLOB client file whose filename contains the hexadecimal identifier of the next smart large object to unload.

In an UNLOAD TO file, a BLOB or CLOB column value appears as follows:

start_off,length,client_path

In this format, start_off is the starting offset (in hexadecimal format) of the smart-large-object value within the client file, length is the length (in hexadecimal) of the BLOB or CLOB value, and client_path is the pathname for the client file. No blank spaces can appear between these values. If a CLOB value is 512 bytes long and is at offset 256 in the /usr/apps/clob9ce7.318 file, for example, then the CLOB value appears as follows in the UNLOAD TO file:

|100,200,/usr/apps/clob9ce7.318|

If a BLOB or CLOB column value occupies an entire client file, the CLOB or BLOB column value appears as follows in the UNLOAD TO file:

client_path

For example, if a CLOB value occupies the entire file /usr/apps/clob9ce7.318, the CLOB value appears as follows in the UNLOAD TO file:

|/usr/apps/clob9ce7.318|

For locales that support multibyte code sets, be sure that the declared size (in bytes) of any column that receives character data is large enough to store the entire data string. For some locales, this can require up to 4 times the number of logical characters in the longest data string.

The database server handles any required code-set conversions for CLOB data. For more information, see the IBM Informix GLS User's Guide.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]