測試分割槽表部分匯出
測試過程:
expdp user/pass directory=dump4dev tables=PDATA.PC_INV dumpfile=PDATA.PC_INV.dmp logfile=PDATA.PC_INV.log query='PDATA.PC_INV:"where data_date>=20140707 and data_date<=20140708"'
create table test(
t_date varchar2(10),
t_num number(10)
)
partition by list (t_date)
(partition p_20160220 values ('20160220'),
partition p_20160221 values ('20160221'),
partition p_20160222 values ('20160222'),
partition p_20160223 values ('20160223'),
partition p_20160224 values ('20160224'),
partition p_20160225 values ('20160225'),
partition p_20160226 values ('20160226'),
partition p_20160227 values ('20160227'),
partition p_20160228 values ('20160228'),
partition p_20160229 values ('20160229'),
partition p_20160301 values ('20160301'),
partition p_20160302 values ('20160302'),
partition p_20160303 values ('20160303')
);
insert into test values('20160220',1);
insert into test values('20160221',2);
insert into test values('20160222',3);
insert into test values('20160223',4);
insert into test values('20160224',5);
insert into test values('20160225',6);
insert into test values('20160226',7);
insert into test values('20160227',8);
insert into test values('20160228',9);
insert into test values('20160229',10);
insert into test values('20160301',11);
insert into test values('20160302',12);
insert into test values('20160303',12);
select name,COLUMN_NAME from dba_PART_KEY_COLUMNS where name='TEST';
SELECT TABLE_NAME,PARTITION_NAME FROM dba_tab_partitions WHERE TABLE_NAME='TEST';
select * from test partition(P_20160222);
expdp.par內容:
DIRECTORY=DUMPDIR
DUMPFILE=test.dmp
LOGFILE=test.log
TABLE=SCOTT.TEST
INCLUDE=TABLE_DATA:"IN (select partition_name from dba_tab_partitions where table_name in ('TEST') and substr(partition_name,3,8) < '20160301')"
expdp system/oracle parfile=/server/soft/expdp.par
expdp system/oracle directory=DUMPDIR dumpfile=test.dmp logfile=test.log EXCLUDE=TABLE_DATA:"IN (select partition_name from dba_tab_partitions where table_name in ('TEST') and substr(partition_name, 3, 8) < '20160301')"
P20160312
金華銀行資料倉儲分割槽表匯出具體程式碼:
編寫一個par檔案:
expdp.par內容:
DIRECTORY=DUMPDIR
DUMPFILE=test.dmp
LOGFILE=test.log
TABLE=SCOTT.TEST
EXCLUDE=TABLE_DATA:"IN (select partition_name from dba_tab_partitions where table_name in ('TEST') and substr(partition_name,2,8) < '20150101')"
expdp system/oracle parfile=/server/soft/expdp.par
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23732248/viewspace-2285227/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [oracle] expdp 匯出分割槽表的分割槽Oracle
- mysql~關於mysql分割槽表的測試MySql
- oracle分割槽表的分類及測試Oracle
- postgresql 9.6 分割槽表測試方案與記錄SQL
- oracle分割槽表和分割槽表exchangeOracle
- oracle分割槽表和非分割槽表exchangeOracle
- mysql 8.0.17 分割槽特性測試MySql
- PostgreSQL/LightDB 分割槽表之分割槽裁剪SQL
- PG的非分割槽表線上轉分割槽表
- 【MYSQL】 分割槽表MySql
- 非分割槽錶轉換成分割槽表
- Oracle分割槽表基礎運維-07增加分割槽(3列表分割槽)Oracle運維
- oracle 分割槽表move和包含分割槽表的lob moveOracle
- 移動分割槽表和分割槽索引的表空間索引
- MySQL 分割槽表,為什麼分割槽鍵必須是主鍵的一部分?MySql
- Oracle 12.1.0.2 expdp匯出分割槽表資料遇到BUG慢的原因和解決方法Oracle
- Oracle分割槽表基礎運維-04列表分割槽Oracle運維
- Oracle分割槽表基礎運維-07增加分割槽(2 HASH分割槽)Oracle運維
- 分割槽表-實戰
- MySQL 分割槽表探索MySql
- Oracle分割槽表基礎運維-06分割槽表索引Oracle運維索引
- 【Linux】MBR磁碟分割槽表只能有四個分割槽?Linux
- oracle 線上重新定義,普通表改變分割槽表,分割槽表可以更改型別、分割槽欄位等Oracle型別
- Oracle分割槽表基礎運維-07增加分割槽(1範圍分割槽)Oracle運維
- Oracle分割槽表基礎運維-01分割槽表分類Oracle運維
- Oracle分割槽表基礎運維-09刪除分割槽Oracle運維
- Oracle分割槽表基礎運維-05組合分割槽Oracle運維
- Oracle分割槽表基礎運維-02範圍分割槽Oracle運維
- Oracle分割槽表基礎運維-03HASH分割槽Oracle運維
- 分割槽表之自動增加分割槽(11G)
- WXS與JS使用的部分割槽別JS
- Mysql表分割槽實操MySql
- OceaBase 分割槽表建立技巧
- Mysql表分割槽實現MySql
- PostgreSQL:傳統分割槽表SQL
- PostgreSQL:內建分割槽表SQL
- SQL SERVER之分割槽表SQLServer
- ORACLE分割槽表梳理系列Oracle