Fixing very slow OLE response times

This can only work when it's known that the embedded OLE object can be drastically reduced in size by for example: removing images, replacing .bmp images with .jpg images, removing secondary embedded objects e.g., a .pdf file embedded in a Word document, replacing a corrupted object, replacing full color fax images with black and white images.



Corruption of the object stored in TIDBLOB can occur if for example a Word document contained an embedded .pdf document, the OLE was saved, then opened and the .pdf document deleted and the OLE saved. The OLE might not give up the space.



Example for Contract Requisition Statement of Work


1. Access the Contract Requisition’s (CR_original) Statement of Work large OLE and use File, Save Copy As to save a copy of the document.


If this doesn’t work, contact a programmer and see notes.


2. Create dummy CR (CR_dummy) on N100 (do not background CR_original as that will copy the large OLE) and create the Statement of Work on X291. Open the OLE and create it in the same way as the saved document from the original CR. Let a programmer know the dummy CR number.


3. Programmer figures out the OLE ID’s for the old and new X291 documents and replaces the old OLE (OLE_original) with the new OLE (OLE_new) in the Contract Requisition table.


Select contr_requisition, ole_id_scope
from passport.tidcnreq
where contr_requisition in (CR_original, CR_dummy);


Update passport.tidcnreq
set ole_id_scope = OLE_new
where contr_requisition = CR_original;


Update passport.tidoblok
set ole_object_owner =
(select ole_object_owner
from passport.tidoblok
where ole_object_id = OLE_old
)
,ole_object_status =
(select ole_object_status
from passport.tidoblok
where ole_object_id = OLE_old
)
,last_updated_by = ‘DATAFIX’
where ole_object_id = OLE_new;


4. Programmer disconnects the new OLE from the dummy CR.


Update passport.tidcnreq
set ole_id_scope = ‘ ‘
where contr_requisition = CR_dummy


5. Programmer deletes the old OLE from the database.


Delete from passport.tidoblok
where ole_object_id = OLE_old;


Delete from passport.tidblob
where ole_object_id = OLE_old;


Notes:


a) Note that all of this work is being done in the target PassPort region. There is no migration of data between PassPort regions.


b) Programmer accessing and saving OLE.


Method 1


Go to the panel and open the OLE. Wait until OLE is displayed in Word. The big OLE’s should all be embedded.


Under File, try “Save Copy As”. If that doesn’t work and you’re pretty sure the entire document as been retrieved and is displayed, then kill Portal/J using the Windows Task Manager.


Start Word and access the most recent document in c:\documents and settings\user ID\Local Settings\temp. You should be able to find the file via the combination of Size and Date Modified. If the file does not open in Word, then something else is going on outside of the scope of this document.


Method 2


Use readBlob.java from PassPortGeek.com.