On an Oracle 12c database I want to reorganize a LOB segment. I used to following sql to generate the alter move command:
select 'ALTER TABLE '||s.owner||'.'||l.table_name||' move to('||l.column_name||') store as (TABLESPACE NAME1);' from dba_segments s, dba_lobs l where s.segment_name = l.segment_name and s.tablespace_name = 'NAME1' and segment_type='LOBSEGMENT' and partition_name is null;
The lob segment I want to rebuild is about 200Gb. Can I use the same tablespace the lob is in? The total free space in that tablespace needs to be 200Gb? During moving the lob is locked?