Here is an Oracle SQL statement that will return a script to convert all LONG columns into CLOBs:
select 'alter table '||table_name||' modify ('||column_name||' clob);'
from user_tab_columns
where data_type='LONG';
Doing this might invalidate some indexes, reported by a message such as:
ORA-01502: index 'SOME_SCHEMA.SOME_INDEX' or partition of
such index is in unusable state
Here is a statement that will create a script to rebuild all invalid indexes:
select 'alter index '||index_name||' rebuild;'
from user_indexes
where status<>'VALID';