# NCLOB in Alarm Journal - not in DB tables (Oracle)

**URL:** <https://forum.inductiveautomation.com/t/nclob-in-alarm-journal-not-in-db-tables-oracle/77711>\
**Category:** Ignition\
**Created:** [August 10, 2023, 6:00pm UTC](https://forum.inductiveautomation.com/t/nclob-in-alarm-journal-not-in-db-tables-oracle/77711 "2023-08-10T18:00:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [August 10, 2023, 6:00pm UTC](https://forum.inductiveautomation.com/t/nclob-in-alarm-journal-not-in-db-tables-oracle/77711/1 "2023-08-10T18:00:33Z")

</div>

Hi folks,

Ignition 8.1.24  
Oracle XE 18.0

We're seeing event data showing up as "oracle.sql.NCLOB", while the actual data in the tables is correct:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8f9d515d4480d354f17dca220a465c7a58397f85.png)

~~And the columns appear correct:~~  
**It appears as though the auto-generated column type is a NCLOB, rather than VARCHAR. Is this something that needs to be changed?**  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/7/a751b6ecffda8a88e0e4e94e255bd91afa236c3d.png)

Referred to both other threads on this ([thread 1](https://forum.inductiveautomation.com/t/label-column-showing-nclob-data-in-alarm-journal-table/48056) and [thread 2](https://forum.inductiveautomation.com/t/alarm-journal-not-displaying-correct-alarm-information-for-label/51464)), but was unable to find a solution.

Short of running my own query to get the data and putting it in a table, does anyone have ideas as to how to fix this, or what the root cause may be?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [August 10, 2023, 8:02pm UTC](https://forum.inductiveautomation.com/t/nclob-in-alarm-journal-not-in-db-tables-oracle/77711/2 "2023-08-10T20:02:32Z")

</div>

Ran this series of commands to change it from CLOB to VARCHAR. Picked a length of 500 to leave room for longer descriptions (my longest was 293).

```auto
--create new column
alter table ALARM_EVENT_DATA add ("strvalue2" varchar2(500));
--copy clob to varchar
update ALARM_EVENT_DATA set "strvalues" = dbms_lob.substr("strvalue",500,1);
--rename clob, then rename new column
alter table ALARM_EVENT_DATA rename column "strvalue" to "strvalueClob";
alter table ALARM_EVENT_DATA rename column "strvalue2" to "strvalue";

```

I was hesitant to drop the CLOB just yet, but it will happen once I'm content this is working.

Since this is a system created table, perhaps the folks at IA can make these changes for future releases?

Cheers!

Edit:  
Used this command to get the max clob length for determining my new VARCHAR size.

> SELECT max(dbms\_lob.getlength("strvalue")) FROM ALARM\_EVENT\_DATA
