DBA Hub

📋Steps in this guide1/1

Move partition to new tablespace

- Move a single partition to a new tablespace

oracle configurationintermediate
by OracleDba
12 views
1

Move partition to new tablespace

- Move a single partition to a new tablespace --- Move a single partition to a new tablespace WITH PARALLEL - Dynamic script to move all partitions of a table

Code/Command (click line numbers to comment):

1
2
3
4
5
ALTER TABLE SCOTT.EMP MOVE PARTITION EMP_Q1 TABLESPACE TS_USERS;
ALTER TABLE SCOTT.EMP MOVE PARTITION EMP_Q1 TABLESPACE TS_USERS PARALLEL(DEGREE 4) NOLOGGING;
select
'ALTER TABLE '||TABLE_OWNER ||'.'||table_name||' MOVE PARTITION '||partition_name||' TABLESPACE TS_USERS PARALLEL(DEGREE 4) NOLOGGING;'
from dba_tab_partitions where table_name='&TABLE_NAME' and table_owner='&SCHEMA_NAME';

Comments (0)

Please to add comments

No comments yet. Be the first to comment!