Mysql对应的dul_DUL 恢复简单表测试

--1. 构造测试数据SQL> alter database datafile '/oracle/app/oracle/oradata/test/users01.dbf' resize 100m;

SQL> create table ducw.test_dul tablespace users

2  as

3  select * from dba_objects;

SQL> select count(1) from ducw.test_dul;

SQL> exit;

--2. 构造DUL使用的控制文件

在control.dul中必须包含SYSTEM表空间的文件信息,以及想UNLOAD的表的表空间文件信息。

SQL> select ts# || ' '|| rfile# || ' '|| name || ' block_size '|| block_size

2  from v$datafile

3  /

TS#||''||RFILE#||''||NAME||'BLOCK_SIZE'||BLOCK_SIZE

--------------------------------------------------------------------------------

0 1 /oracle/app/oracle/oradata/test/system01.dbf block_size 8192

1 2 /oracle/app/oracle/oradata/test/sysaux01.dbf block_size 8192

2 3 /oracle/app/oracle/oradata/test/undotbs01.dbf block_size 8192

4 4 /oracle/app/oracle/oradata/test/users01.dbf block_size 8192

4 5 /oracle/app/oracle/oradata/test/users02.dbf block_size 8192

--2.1 DUL控制文件(python3venv) [oracle@sqlaudit ~]$ cat control.dul

0 1 /oracle/app/oracle/oradata/test/system01.dbf block_size 8192

1 2 /oracle/app/oracle/oradata/test/sysaux01.dbf block_size 8192

2 3 /oracle/app/oracle/oradata/test/undotbs01.dbf block_size 8192

4 4 /oracle/app/oracle/oradata/test/users01.dbf block_size 8192

4 5 /oracle/app/oracle/oradata/test/users02.dbf block_size 8192

--2.2 DUL参数文件(python3venv) [oracle@sqlaudit ~]$ cat init.dul

#Platform specific parameter

OSD_BIG_ENDIAN_FLAG=FALSE

OSD_DBA_FILE_BITS=10

OSD_C_STRUCT_ALIGNMENT=32

OSD_FILE_LEADER_SIZE=1

OSD_WORD_SIZE=32

# Size of dul dictionary caches. If one of these is too low startup will fail.

DC_COLUMNS=200000

DC_TABLES=100000

DC_OBJECTS=100000

DC_USERS=100

DC_SEGMENTS=100000

# Location and filename ofthe control file

CONTROL_FILE=/home/oracle/control.dul

# Database blocksize

DB_BLOCK_SIZE=8192

# Using Import to restore the data retrieved

EXPORT_MODE=TRUE

# Using SQL*Loader to restore the data retrieved

#EXPORT_MODE=FALSE

# Compatible parameter

COMPATIBLE=10

FILE_SIZE_IN_MB=1000

BUFFER=200000000

--3. 运行DULrm *.ctl

rm *.dat

rm *.log

rm *.ddl

rm *.out

--3.1 在DUL运行环境下执行BOOTSTRAP命令,生成字典信息,为UNLOAD做必要的准备。

(python3venv) [oracle@sqlaudit ~]$ ./dul

DUL> bootstrap;

--3.2 在DUL运行环境下执行UNLOAD过程:UNLOAD TABLE owner.table ;This will unload the one table definition and the table's data.

UNLOAD USER user name ;This unloads all tables and data for the specified user.

UNLOAD DATABASE ;This unloads all of the database tables available. (except the user SYS).

DUL>

unload table ducw.test_dul;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值