This post share some techniques you can try to handle Oracle LONG data type while working with legacy systems. While recently working on integrating one of the legacy system with latest technologies (JPA/Hibernate) we came across some of the challenges in doing the same. Here we will see how to find way around for one of such problem, Oracle LONG data type, or how to get rid of it.
Getting rid of Oracle LONG data type: Depending upon the nature of data you store in the column, you can plan to change the column type
LONG->VARCHAR (If you have limited data, 4000)
LONG->CLOB (for bigger data size)
You can use the below Stored Procedure to convert the column type:
Read the rest of this entry »

