I have a table which is already populated.

I need to change the data type of one column from LONG to CLOB

However this database is hosted by a third party and the tablespace is limited.

I know the command:

ALTER TABLE myTable MODIFY my_data CLOB

However I then receive the error after a long wait:

ORA-01652: unable to extend temp segment by 128 in tablespace

Increasing the table space is not an option.

Is there any work arounds?

Could I create a new column with the data type CLOB then copy and convert the data from my_data ( LONG) without draing table space? Could i turn undo off to help?

Many thanks

有帮助吗?

解决方案

I would say the best option is to create a new column with the new data type, update it based on the old column and then drop the old column but since you are having space issues that may not be an option.

Or you could try to do this in a series of bathces. For example, move 10000 rows of data to the new column and then set the old value to null on these 10000 to free some space.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top