Silahkan Melihat Tutorial di website kami dengan nyaman ENJOY YOUR LIFE ☕

How to drop or truncade all partitions Oracle Database

[oracle@PTUD-VM02-2 oradata]$ more drop_partition_table.sql 

SET LINESIZE 32000;
SET PAGESIZE 40000;
SET LONG 50000;

select 'ALTER TABLE '||TABLE_OWNER||'.'||table_name||' DROP PARTITION '||partition_name||';' from dba_tab_partitions;

[oracle@PTUD-VM02-2 oradata]$ sqlplus / as sysdba @drop_partition_table.sql >> a.sql &

[oracle@PTUD-VM02-2 oradata]$ cat a.sql | grep 'DROP PARTITION' >> b.sql
[oracle@PTUD-VM02-2 oradata]$ sqlplus / as sysdba @b.sql





0 komentar:

Post a Comment

How to drop or truncade all partitions Oracle Database