DB2 BLOB Tools - Import, Export, View and Edit

In DB2, BLOB (Binary Large Object) is a data type used to store large amounts of binary data, such as images, audio files, video files, and other unstructured binary data. More: DB2 BLOB.

DB2 BLOB - type family and size limits

Type in IBM DB2Maximum size
BLOB(n)up to 2 GB (2,147,483,647 bytes)
BLOB (no length)defaults to only 1 MB
BLOB FILEstores a file reference, data stays in the file system

BLOB versus CLOB in IBM DB2

BLOB holds raw bytes and DB2 never converts them; CLOB is decoded with the database code page and its length counts characters. Images, archives and encrypted blobs can only go into a BLOB.

What limits you first

DB2 keeps LOB data in a separate LOB tablespace, and db2 export only writes a lob locator unless you pass a lob to directory. Miss it and the export "succeeds" while the actual data is never written.

BLOB from the command line

Things that bite with BLOB in IBM DB2