Oracle Partitioning: differenze tra le versioni
Jump to navigation
Jump to search
(Creata pagina con "=Converti Tabelle= =Indici= =Spazio disco= Categoria:Database Categoria:Oracle") |
|||
(9 versioni intermedie di uno stesso utente non sono mostrate) | |||
Riga 1: | Riga 1: | ||
=impdp= |
|||
Importare una partizione su una tabella (che potrebbe essere anche una tabella partizionata, ma con schema di partizionamento diverso) |
|||
tables="HR.EMP:P2016_53" |
|||
table_exists_action=append |
|||
partition_options=merge |
|||
data_options=TRUST_EXISTING_TABLE_PARTITIONS |
|||
=Elenca tabelle= |
|||
-- |
|||
set pagesize 200 linesize 200 trim on trims on |
|||
col owner for a30 |
|||
col table_name for a30 |
|||
col autolist for a4 |
|||
col interval for a30 |
|||
-- select owner,table_name from dba_tables where partitioned='YES' and owner not in ('SYS','SYSTEM'); |
|||
select owner,table_name,partitioning_type,autolist,interval from dba_part_tables where owner not in ('SYS','SYSTEM','AUDSYS'); |
|||
=Converti Tabelle= |
=Converti Tabelle= |
||
==converti da partizionamento manuale a partizionamento automatico== |
|||
-- |
|||
set pagesize 200 linesize 200 trim on trims on |
|||
select 'alter table ' || owner || '.' || table_name || ' set partitioning automatic;' |
|||
from dba_part_tables where partitioning_type='LIST' and autolist!='YES' and owner not in ('SYS','SYSTEM','AUDSYS'); |
|||
=Indici= |
=Indici= |
||
=Spazio disco= |
=Spazio disco= |
||
=ILM= |
|||
(ADO richiede licenza Advanced Compression) |
|||
alter table PART_TABLE ilm add policy compress basic segment after 14 days of creation; |
|||
alter table PART_TABLE ilm add policy compress basic segment after 14 days of no modification; |
|||
[[Categoria:Database]] |
[[Categoria:Database]] |
Versione attuale delle 15:31, 17 ott 2023
impdp
Importare una partizione su una tabella (che potrebbe essere anche una tabella partizionata, ma con schema di partizionamento diverso)
tables="HR.EMP:P2016_53" table_exists_action=append partition_options=merge data_options=TRUST_EXISTING_TABLE_PARTITIONS
Elenca tabelle
-- set pagesize 200 linesize 200 trim on trims on col owner for a30 col table_name for a30 col autolist for a4 col interval for a30 -- select owner,table_name from dba_tables where partitioned='YES' and owner not in ('SYS','SYSTEM'); select owner,table_name,partitioning_type,autolist,interval from dba_part_tables where owner not in ('SYS','SYSTEM','AUDSYS');
Converti Tabelle
converti da partizionamento manuale a partizionamento automatico
-- set pagesize 200 linesize 200 trim on trims on select 'alter table ' || owner || '.' || table_name || ' set partitioning automatic;' from dba_part_tables where partitioning_type='LIST' and autolist!='YES' and owner not in ('SYS','SYSTEM','AUDSYS');
Indici
Spazio disco
ILM
(ADO richiede licenza Advanced Compression)
alter table PART_TABLE ilm add policy compress basic segment after 14 days of creation; alter table PART_TABLE ilm add policy compress basic segment after 14 days of no modification;