By following the above steps, it will update the RDD table column to the appropriate type as required. Validate from the UI that the msg column is mapped correctly to the msg field. Re-sync from the date you upgraded to Sentinel 8 to get the lost data back to the database
spool ./log_1021125.txt
set serveroutput on
set linesize 1000
set heading off
DECLARE
v_table_name varchar2(100);
BEGIN
v_table_name := '&RDD_table_name' ;
execute immediate 'create table ' || v_table_name ||TO_CHAR(SYSDATE, 'YYYYMMDD') || ' as select * from '|| v_table_name;
dbms_output.put_line('Table ' || v_table_name ||TO_CHAR(SYSDATE, 'YYYYMMDD') || ' created.');
execute immediate 'alter table ' || v_table_name || ' add (msg_clob nclob)';
dbms_output.put_line('Table ' || v_table_name || ' altered added column msg_clob of type nclob');
execute immediate 'update '|| v_table_name || ' set msg_clob = msg ';
dbms_output.put_line('Table '|| v_table_name || ' updated');
execute immediate 'alter table '|| v_table_name || ' drop (msg)';
dbms_output.put_line('Table '|| v_table_name || ' altered column msg dropped');
execute immediate 'alter table '|| v_table_name || ' add (msg nclob)';
dbms_output.put_line('Table '|| v_table_name || ' altered, added column (msg nclob)');
execute immediate 'update '|| v_table_name ||' set msg = msg_clob';
dbms_output.put_line('Table '|| v_table_name ||' updated');
execute immediate 'alter table '||v_table_name|| ' drop (msg_clob)';
dbms_output.put_line('Table '|| v_table_name ||' altered, column msg_clob dropped');
END;
/
spool off
set serveroutput off
exit 0;