dul 10g版本的使用

dul 10g版本的使用

在自己的测试环境下(linux平台)测试下10g dul工具的使用
数据库表空间使用的有ASM管理的磁盘组,也有一般的数据文件

1)创建表空间
create tablespace TBSDATA3 datafile '+DSKGRP1' size 100M;
create table testdul (name varchar2(20)) tablespace TBSDATA3;

select name,path,total_mb,free_mb,failgroup from v$asm_disk
NAME PATH TOTAL_MB FREE_MB FAILGROUP
-------------------- ---------------------------------------- ---------- ---------- ------------------------------------------------------------
/dev/sdc 1024 0
/dev/sdd 1024 0
/dev/sdd3 196 0
/dev/sdd4 196 0
DSKGRP1_0000 /dev/sdc1 196 52 DSKGRP1_0000
DSKGRP1_0001 /dev/sdc2 196 27 DSKGRP1_0001
DSKGRP1_0002 /dev/sdc3 196 34 DSKGRP1_0002
DSKGRP1_0003 /dev/sdc4 196 57 DSKGRP1_0003
DSKGRP1_0004 /dev/sdd1 196 47 DSKGRP1_0004
DSKGRP1_0005 /dev/sdd2 196 58 DSKGRP1_0005

可以看到使用了具体下列盘
/dev/sdc1
/dev/sdc2
/dev/sdc3
/dev/sdc4
/dev/sdd1
/dev/sdd2

2)编写init.dul文件
OSD_BIG_ENDIAN_FLAG=FALSE
osd_dba_file_bits = 10
osd_c_struct_alignment = 32
osd_file_leader_size = 1
dc_columns=200000
dc_tables=100000
dc_objects=100000
dc_users = 40
dc_segments=100000
db_block_size=8192
control_file=/oracle/orainstall/dul10/control.dul
export_mode=true
compatible=10

3)编写control.dul文件
使用select ts#, rfile#, name from v$datafile查询数据文件及表空间信息
注意在该文件中添加ASM磁盘信息

disk /dev/sdc1
disk /dev/sdc2
disk /dev/sdc3
disk /dev/sdc4
disk /dev/sdd1
disk /dev/sdd2
0 1 /oradata/orcl/system01.dbf
1 2 /oradata/orcl/undotbs01.dbf
2 3 /oradata/orcl/sysaux01.dbf
4 4 /oradata/orcl/undotbs02.dbf
5 5 /oradata/orcl/users01.dbf
6 6 /oradata/orcl/testdata01.dbf
7 7 /oradata/orcl/TEST02.DBF
7 5 /oradata/orcl/TEST01.DBF
8 1024 /oradata/orcl/BIGFILE01.DBF
13 10 +DSKGRP1/orcl/datafile/tbsdata1.256.664401755
14 11 +DSKGRP1/orcl/datafile/tbsdata2.257.664401765
15 7 /oradata/trans/TEST02.DBF
15 6 /oradata/trans/TEST01.DBF
16 14 /oradata/orcl/RMAN01.DBF
17 15 +DSKGRP1/orcl/datafile/tbsdata3.267.684263423
4)关闭数据库及ASM实例
export ORACLE_SID=+ASM1
sqlplus "/ as sysdba"
SQL> shutdown abort
ASM instance shutdown
5)dul用户及表,可以看到数据库在没有打开及ASM实例没有启动的情况下,仍然能导出数据
./dul
DUL>bootstrap;
DUL>DUL> unload user scott;
About to unload SCOTT's tables ...
. unloading table DEPT 4 rows unloaded
. unloading table EMP 14 rows unloaded
. unloading table BONUS 0 rows unloaded
. unloading table SALGRADE 5 rows unloaded
. unloading table READTAB 4 rows unloaded
. unloading table TT_03_SYNC_OBJS 3 rows unloaded
. unloading table TT_03_USER_COUNT 1 row unloaded
. unloading table TT_03_AGENT_STATUS 2 rows unloaded
. unloading table TT_03_49127_L 1 row unloaded
. unloading table TESTDUL 1000 rows unloaded
DUL> unload table testdul;
. unloading table TESTDUL 1000 rows unloaded
6)先删除一个table
$ sqlplus scott/tiger
SQL> drop table testdul purge;
Table dropped.
DUL> unload table scott.testdul;
. unloading table TESTDUL 1000 rows unloaded
可以看到在dul工具在这个表的空间没有被覆盖的时候仍然能取到这个表



[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/48010/viewspace-1020666/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/48010/viewspace-1020666/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值