Salesforce

How are LOB dump files named when dumped from the Data Administration tool?

« Go Back

Information

 
TitleHow are LOB dump files named when dumped from the Data Administration tool?
URL Name000030687
Article Number000144318
EnvironmentProduct: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Other: BLOB, CLOB, Data Administration, Data Dictionary, EXPORT
Question/Problem Description
What naming convention is used when dumping LOB data from the database using the Data Dictionary or Data Administration tool?
What naming convention is used when exporting LOB data ?
Are LOBS dumped when a Table is dumped?
Where can the LOB be found when a record is exported with ABL?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
When a Table includes LOB objects, the LOB cannot optionally be excluded when Binary dump is used, but can when dumped through the Data Dictionary (CHUI), Data Administration (GUI) or OpenEdge 11 Database Administration (Browser) tool.  These tools use the same logic as the ABL: EXPORT statement when dumping tables that include LOB database objects. It allows the same options:

ABL:EXPORT     Tools
--------------.--------------

NO-LOBS        Include LOB
LOB-DIR        LOB Directory


The remainder of this Article discusses this topic from the ABL: EXPORT perspective, which can be similarly applied to the Data Dictionary/Administration tool functionality.

When EXPORT is used to dump large object (LOB) data from a database, a uniquely named file with a .blb extension is generated for each BLOB or CLOB:

CLOB: <field name> + !<codepage>! + <PID of dumping process> + <sequence>.blb
BLOB: <field name> + <PID of dumping process> + <sequence>.blb


By default, the .blb file is written to the same location as the file in the OUTPUT TO statement.
The optional LOB-DIR dir-name phrase can also be used on the OUTPUT TO statement, where "dir-name" evaluates to the name of the directory to write the resulting .blb file to.

EXPORT stores the exported LOB file names in the exported table related data file (eg: <tablename>.d file), in the position where the ordinary field data would be placed as if the field contained non-LOB data:
  • If the LOB field has the Unknown value (?), the AVM writes a question mark (?) in place;
  • If it is a zero-length LOB, the AVM still creates a file as it does for any LOB field, but the file has a zero length.
While it is not possible to dump only lobs through the Data Administration/Dictionary tools, the following example simply demonstrates that the actual content of the BLOB field are not written to the named "blob.d" file. Instead, the contents of the BLOB field is written to a new file with a .blb extension:

OUTPUT TO C:\DumpedData\blob.d.
  FIND FIRST <lobtable> NO-LOCK.
  EXPORT <lobtable>.<lobfieldname>.
OUTPUT CLOSE.


The resulting blob.d contains nothing:
Failure in large object operation, error = -8 (16683)
Could not retrieve blob to write to file. (11268)


Instead the BLOB itself has been written to the resulting <lobfieldname><PID><Sequence>.blb file eg: C:\DumpedData\blobdata4552_1.blb in the same directory as the 'blob.d' file.

LOBS can be re-directed to another location. This is particularly useful in terms of space requirements when there are a lot of LOB objects to be dumped. In the following example, the names of the files that contain the BLOB data are written to the customer.d file along with the non-lob customer field data in the C:\DumpedData\ directory and the LOB files are written to C:\DumpedData\custblob. If the LOB-DIR phrase is left off of the OUTPUT TO statement, the BLOB files are created in the C:\DumpedData directory. The AVM will not create the LOB-DIR directory if it does not pre-exist.

OUTPUT TO C:\DumpedData\customer.d LOB-DIR "custblob".

FOR EACH customer:
  EXPORT customer.
END.

OUTPUT CLOSE.


An excerpt from the contents of the resulting customer.d file, shows the exported LOB file names in the exported table related data file, in the position where the ordinary field data would be placed as if the field contained non-LOB data:

"lift line skiing", 1, "photo_123456.blb", 617-9666673, "boston"
"off the wall", 2, "photo_234567.blb", 781-5555554, "new york"
"flying fat", 3, ? , 303-9992222, "washington"
  • The generated LOB filename is always unique using the current process' PID and a sequence counter.
  • The  third customer record had no data in the BLOB photo field and therefore is the Unknown value (?).
For CLOB dumps, the code page of the CLOB is part of the filename generated by the EXPORT statement. The file name consists of the field or variable name, followed by the code page name surrounded by exclamation marks (!), followed by the unique name and the .blb extension. For example:

Fclob!UTF-8!12345_6.blb

Dumping all data except large objects
Table data (records) can be dumped, excluding large objects with the NO-LOBS option on the EXPORT statement. 

Example:

FOR EACH customer NO-LOCK:
  EXPORT customer NO-LOBS.
END.


An excerpt from the contents of the resulting customer.d file, shows that the LOB data was excluded from the data dump and is instead represented by the Unknown value (?):

“lift line skiing”, 1, ? , 617-9666673, “boston”
“off the wall”, 2, ? , 781-5555554, “new york”
“flying fat”, 3, ? , 303-9992222, “washington”
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:29 AM

Powered by