Consultor Eletrônico



Kbase P117881: How to move a LOB to another storage area?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   6/9/2010
Status: Verified

GOAL:

How to move a LOB to another storage area?

GOAL:

How to move a BLOB to another storage area?

GOAL:

How to move a CLOB to another storage area?

FACT(s) (Environment):

OpenEdge 10.1x
OpenEdge 10.2x
All Supported Operating Systems

FIX:

In the current product implementation, PROUTIL database features exist to move table and/or move index database objects, but not LOB database objects. So when the table and related indexes are moved to another storage area, the LOBs are left in their existing storage area. This feature enhancement has been raised but not implemented to-date (Bug# OE00113879)

To move the LOB objects, either of the following two Methods need to be considered.

METHOD #1:

1. Dump the df for the table.
2. Dump the data.
3. Modify the LOB-AREA section of the dumped schema df file to reflect the new storage area.
4. Backup the database.
5. Drop the table.
6. Reload the df and data.

METHOD #2:

1) Dump the table definition of the table which contains the BLOB / CLOB.
2) Add the new areas to the database to which the table will be moved.
3) Modify the definition file (.df file) dumped in step 1 so that references for the table, indices and blobs are redefined to the new areas added in step 2.
4) Use the Data Dictionary tool to RENAME the original table.
5) Load the modified .df file.
6) Create ABL code to buffer-copy each record of the original table which has been renamed, to the new table definition loaded in step 5.
Example pseudo-code:
for each renamedtable.
buffer-copy renamedtable to originaltablename.