Maximo MAXINTMSGTRK table:如何从 MSGDATA 列中提取文本? (巨大的)

Maximo MAXINTMSGTRK table: How to extract text from MSGDATA column? (HUGEBLOB)

我正在尝试从 MAXINTMSGTRK 的 MSGDATA 列 (HUGEBLOB) 中提取文本 table:

我已经尝试过此处列出的选项::

select
    msg.*,
    utl_raw.cast_to_varchar2(dbms_lob.substr(msgdata,1000,1)) msgdata_expanded,
    dbms_lob.substr(msgdata, 1000,1) msgdata_expanded_2
from
    maxintmsgtrk msg
where
    rownum = 1

但是,输出不是文本:

如何从 MSGDATA 列中提取文本?

听起来不可能因为值被压缩了:

Starting in Maximo 7.6, the messages written by the Message Tracking application are stored in the database. They are no longer written as xml files as in previous versions.

Customers have asked how to search and view MSGDATA data from the MAXINTMSGTRK table.

It is not possible to search or retrieve the data in the maxintmsgtrk table in 7.6.using SQL. The BLOB field is stored compressed.

MIF 7.6 Message tracking changes

可以使用自动化脚本来完成,使用 psdi.iface.jms.MessageUtil class.

解压缩数据
from psdi.iface.jms import MessageUtil
...
msgdata_blob = maxintmsgtrkMbo.getBytes("msgdata")
byteArray = MessageUtil.uncompressMessage(msgdata_blob, maxintmsgtrkMbo.getLong("msglength"))

msgdata_clob = ""
for symb1 in byteArray:
    msgdata_clob = msgdata_clob + chr(symb1)