标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-00742 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (103)
- 数据库 (1,701)
- DB2 (22)
- MySQL (74)
- Oracle (1,562)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (159)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (68)
- Oracle Bug (8)
- Oracle RAC (53)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (571)
- Oracle安装升级 (94)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (81)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- fio测试io,导致磁盘文件系统损坏故障恢复
- ORA-742 写丢失常见bug记录
- Oracle 19c 202501补丁(RUs+OJVM)
- 避免 19c 数据库性能问题需要考虑的事项 (Doc ID 3050476.1)
- Bug 21915719 Database hang or may fail to OPEN in 12c IBM AIX or HPUX Itanium – ORA-742, DEADLOCK or ORA-600 [kcrfrgv_nextlwn_scn] ORA-600 [krr_process_read_error_2]
- ORA-600 ktuPopDictI_1恢复
- impdp导入数据丢失sys授权问题分析
- impdp 创建index提示ORA-00942: table or view does not exist
- 数据泵导出 (expdp) 和导入 (impdp)工具性能降低分析参考
- 19c非归档数据库断电导致ORA-00742故障恢复
- Oracle 19c – 手动升级到 Non-CDB Oracle Database 19c 的完整核对清单
- sqlite数据库简单操作
- Oracle 暂定和恢复功能
- .pzpq扩展名勒索恢复
- Oracle read only用户—23ai新特性:只读用户
- 迁移awr快照数据到自定义表空间
- .hmallox加密mariadb/mysql数据库恢复
- 2025年首个故障恢复—ORA-600 kcbzib_kcrsds_1
- 第一例Oracle 21c恢复咨询
- ORA-15411: Failure groups in disk group DATA have different number of disks.
标签归档:dul分区表
dul处理分区表
创建SALES分区表案例
CREATE TABLE SALES ( PRODUCT_ID VARCHAR2(5), SALES_DATE DATE, SALES_COST NUMBER(10), STATUS VARCHAR2(20) ) PARTITION BY RANGE(SALES_DATE) SUBPARTITION BY LIST (STATUS) SUBPARTITION TEMPLATE ( SUBPARTITION SUB1 VALUES ('ACTIVE') , SUBPARTITION SUB2 VALUES ('INACTIVE') ) ( PARTITION P1 VALUES LESS THAN (TO_DATE('2003-01-01','YYYY-MM-DD')), PARTITION P2 VALUES LESS THAN (TO_DATE('2003-03-01','YYYY-MM-DD')) ) / INSERT INTO SALES VALUES('00001','01-Jan-02',100,'ACTIVE') / INSERT INTO SALES VALUES('00002','01-Jan-01',200,'ACTIVE') / INSERT INTO SALES VALUES('00003','01-Feb-03',300,'INACTIVE') / INSERT INTO SALES VALUES('00004','04-Feb-03',300,'INACTIVE') / INSERT INTO SALES VALUES('00005','04-Feb-02',300,'INACTIVE') /
查询结果
SQL> select * from sales; PRODU SALES_DATE SALES_COST STATUS ----- ------------ ---------- -------------------- 00001 01-JAN-02 100 ACTIVE 00002 01-JAN-01 200 ACTIVE 00005 04-FEB-02 300 INACTIVE 00003 01-FEB-03 300 INACTIVE 00004 04-FEB-03 300 INACTIVE SQL> select * from sales PARTITION(p1); PRODU SALES_DATE SALES_COST STATUS ----- ------------ ---------- -------------------- 00001 01-JAN-02 100 ACTIVE 00002 01-JAN-01 200 ACTIVE 00005 04-FEB-02 300 INACTIVE SQL> select * from sales PARTITION(p2); PRODU SALES_DATE SALES_COST STATUS ----- ------------ ---------- -------------------- 00003 01-FEB-03 300 INACTIVE 00004 04-FEB-03 300 INACTIVE SQL> select * from sales SUBPARTITION(p1_sub1); PRODU SALES_DATE SALES_COST STATUS ----- ------------ ---------- -------------------- 00001 01-JAN-02 100 ACTIVE 00002 01-JAN-01 200 ACTIVE SQL> select * from sales SUBPARTITION(p1_sub2); PRODU SALES_DATE SALES_COST STATUS ----- ------------ ---------- -------------------- 00005 04-FEB-02 300 INACTIVE SQL> select * from sales SUBPARTITION(p2_sub1); no rows selected SQL> select * from sales SUBPARTITION(p2_sub2); PRODU SALES_DATE SALES_COST STATUS ----- ------------ ---------- -------------------- 00003 01-FEB-03 300 INACTIVE 00004 04-FEB-03 300 INACTIVE
启动dul
[oracle@xifenfei dul]$ ./dul Data UnLoader: 10.2.0.5.20 - Internal Only - on Sat Jan 19 17:37:45 2013 with 64-bit io functions Copyright (c) 1994 2013 Bernard van Duijnen All rights reserved. Strictly Oracle Internal Use Only DUL: Warning: Recreating file "dul.log" Reading USER.dat 91 entries loaded Reading OBJ.dat 74764 entries loaded and sorted 74764 entries Reading TAB.dat 2882 entries loaded Reading COL.dat 94598 entries loaded and sorted 94598 entries Reading SEG.dat 17 entries loaded Reading EXT.dat 43 entries loaded and sorted 43 entries Reading TABPART.dat 150 entries loaded and sorted 150 entries Reading TABCOMPART.dat 3 entries loaded and sorted 3 entries Reading TABSUBPART.dat 36 entries loaded and sorted 36 entries Reading INDPART.dat 169 entries loaded and sorted 169 entries Reading INDCOMPART.dat 0 entries loaded and sorted 0 entries Reading INDSUBPART.dat 0 entries loaded and sorted 0 entries Reading IND.dat 5150 entries loaded Reading LOB.dat DUL: Warning: Increased the size of DC_LOBS from 1024 to 8192 entries 1286 entries loaded Reading ICOL.dat 7569 entries loaded Reading COLTYPE.dat 3003 entries loaded Reading TYPE.dat 2872 entries loaded Reading ATTRIBUTE.dat 11127 entries loaded Reading COLLECTION.dat 985 entries loaded Reading COMPATSEG.dat 0 entries loaded Reading BOOTSTRAP.dat 60 entries loaded Reading LOBFRAG.dat 1 entries loaded and sorted 1 entries Reading LOBCOMPPART.dat 0 entries loaded and sorted 0 entries Reading UNDO.dat 21 entries loaded Reading TS.dat 10 entries loaded Reading PROPS.dat 36 entries loaded Database character set is ZHS16GBK Database national character set is AL16UTF16 Found db_id = 4188950066 Found db_name = ORA11G
unload 语法
UNLOAD [TABLE] [ schema_name . ] table_name [ PARTITION( partition_name ) ] [ SUBPARTITION( sub_partition_name ) ] [ ( column_definitions ) ] [ cluster_clause ] [ storage_clause ] ;
unload整个表
DUL> unload table chf.SALES; . unloading table SALES . Unloading partition P1 . Unloading sub partition P1_SUB1 . Unloading sub partition P1_SUB2 . Unloading partition P2 . Unloading sub partition P2_SUB1 . Unloading sub partition P2_SUB2 . table SALES total 5 rows unloaded [root@xifenfei dul]# ls -l CHF_SALES* -rw-r--r-- 1 oracle oinstall 421 Jan 19 18:09 CHF_SALES.ctl -rw-r--r-- 1 oracle oinstall 251 Jan 19 18:09 CHF_SALES.dat [root@xifenfei dul]# more CHF_SALES.dat |00001| |01-JAN-2002 AD 00:00:00| |100| |ACTIVE| |00002| |01-JAN-2001 AD 00:00:00| |200| |ACTIVE| |00005| |04-FEB-2002 AD 00:00:00| |300| |INACTIVE| |00003| |01-FEB-2003 AD 00:00:00| |300| |INACTIVE| |00004| |04-FEB-2003 AD 00:00:00| |300| |INACTIVE|
unload 分区表
DUL> unload table chf.SALES PARTITION(p1); . unloading table SALES . Unloading partition P1 . Unloading sub partition P1_SUB1 . Unloading sub partition P1_SUB2 . table SALES total 3 rows unloaded [root@xifenfei dul]# ls -l CHF_SALES_P1* -rw-r--r-- 1 oracle oinstall 424 Jan 19 18:10 CHF_SALES_P1.ctl -rw-r--r-- 1 oracle oinstall 149 Jan 19 18:10 CHF_SALES_P1.dat [root@xifenfei dul]# more CHF_SALES_P1.dat |00001| |01-JAN-2002 AD 00:00:00| |100| |ACTIVE| |00002| |01-JAN-2001 AD 00:00:00| |200| |ACTIVE| |00005| |04-FEB-2002 AD 00:00:00| |300| |INACTIVE|
unload 子分区表
DUL> unload table chf.SALES SUBPARTITION(p2_SUB2); . unloading table SALES . Unloading partition P1 . Unloading partition P2 . Unloading sub partition P2_SUB2 . table SALES total 2 rows unloaded [root@xifenfei dul]# ls -l CHF_SALES_P2_SUB2* -rw-r--r-- 1 oracle oinstall 429 Jan 19 18:14 CHF_SALES_P2_SUB2.ctl -rw-r--r-- 1 oracle oinstall 102 Jan 19 18:14 CHF_SALES_P2_SUB2.dat [root@xifenfei dul]# more CHF_SALES_P2_SUB2.dat |00003| |01-FEB-2003 AD 00:00:00| |300| |INACTIVE| |00004| |04-FEB-2003 AD 00:00:00| |300| |INACTIVE|
验证控制文件
[root@xifenfei dul]# ls -l CHF_SALES* -rw-r--r-- 1 oracle oinstall 421 Jan 19 18:09 CHF_SALES.ctl -rw-r--r-- 1 oracle oinstall 251 Jan 19 18:09 CHF_SALES.dat -rw-r--r-- 1 oracle oinstall 424 Jan 19 18:10 CHF_SALES_P1.ctl -rw-r--r-- 1 oracle oinstall 149 Jan 19 18:10 CHF_SALES_P1.dat -rw-r--r-- 1 oracle oinstall 429 Jan 19 18:14 CHF_SALES_P2_SUB2.ctl -rw-r--r-- 1 oracle oinstall 102 Jan 19 18:14 CHF_SALES_P2_SUB2.dat [root@xifenfei dul]# more CHF_SALES.ctl load data CHARACTERSET ZHS16GBK infile 'CHF_SALES.dat' insert into table "CHF"."SALES" fields terminated by whitespace ( "PRODUCT_ID" CHAR(5) enclosed by X'7C' ,"SALES_DATE" DATE "DD-MON-YYYY AD HH24:MI:SS" enclosed by X'7C' ,"SALES_COST" CHAR(3) enclosed by X'7C' ,"STATUS" CHAR(8) enclosed by X'7C' ) [root@xifenfei dul]# more CHF_SALES_P1.ctl load data CHARACTERSET ZHS16GBK infile 'CHF_SALES_P1.dat' insert into table "CHF"."SALES" fields terminated by whitespace ( "PRODUCT_ID" CHAR(5) enclosed by X'7C' ,"SALES_DATE" DATE "DD-MON-YYYY AD HH24:MI:SS" enclosed by X'7C' ,"SALES_COST" CHAR(3) enclosed by X'7C' ,"STATUS" CHAR(8) enclosed by X'7C' ) [root@xifenfei dul]# more CHF_SALES_P2_SUB2.ctl load data CHARACTERSET ZHS16GBK infile 'CHF_SALES_P2_SUB2.dat' insert into table "CHF"."SALES" fields terminated by whitespace ( "PRODUCT_ID" CHAR(5) enclosed by X'7C' ,"SALES_DATE" DATE "DD-MON-YYYY AD HH24:MI:SS" enclosed by X'7C' ,"SALES_COST" CHAR(3) enclosed by X'7C' ,"STATUS" CHAR(8) enclosed by X'7C' )
这里证明所有的控制文件中的表结构都是整个表的结构,而不是分区表,在实际处理过程中,可以考虑交换分区来实现