ITPub博客

首页 > 数据库 > Oracle > aul 测试

aul 测试

原创 Oracle 作者:imlihj2007 时间:2011-10-13 00:42:08 0 删除 编辑

-------------------aul5 ----------test0-------------------------

select file#,rfile#,name from v$datafile

rac1-> ./...bin

Register Code: VDTL-ZSMR-RBBL-ATFV-JBKK

AUL : AnySQL UnLoader(MyDUL) for Oracle 8/8i/9i/10g/11g, release 5.1.2

(C) Copyright Lou Fangxin 2005-2010 (AnySQL.net), all rights reserved.

AUL> UNLOAD TABLE USER$;

2011-10-12 23:39:04

2011-10-12 23:39:04

AUL> UNLOAD TABLE OBJ$;

2011-10-12 23:39:14

2011-10-12 23:39:14 --这个时候查询txt文件 你会发现 里面是空的

AUL> open db10g.cfg --而且必须先执行这条命令 才可以真正吧内容给搞出来

* ts# fno rfn ver bsize blocks filename

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

Y 0 1 1 a2 8192 64000 /u01/app/oracle/oradata/test/system01.dbf

Y 1 2 2 a2 8192 3200 /u01/app/oracle/oradata/test/undotbs01.dbf

Y 2 3 3 a2 8192 29440 /u01/app/oracle/oradata/test/sysaux01.dbf

Y 4 4 4 a2 8192 64000 /u01/app/oracle/oradata/test/users01.dbf

AUL> UNLOAD TABLE USER$; --这样文件就有内容了

2011-10-12 23:39:40

2011-10-12 23:39:40

-----------------------------aul5 ----------test1--------------------

--1 conn sys/ as sysdba

create table lihj as select * from user_tables

--

select * from user_tables where table_name='LIHJ'

select * from all_users

AUL> LIST TABLE SCOTT

UNLOAD TABLE SCOTT.DEPT TO DEPT.txt;

UNLOAD TABLE SCOTT.EMP TO EMP.txt;

UNLOAD TABLE SCOTT.BONUS TO BONUS.txt;

UNLOAD TABLE SCOTT.SALGRADE TO SALGRADE.txt;

AUL> UNLOAD TABLE SCOTT.DEPT ;

2011-10-12 23:52:29

Unload OBJD=51146 FILE=4 BLOCK=11 CLUSTER=0 ...

10|ACCOUNTING|NEW YORK

20|RESEARCH|DALLAS

30|SALES|CHICAGO

40|OPERATIONS|BOSTON

Sucessfully unload 4 rows ...

2011-10-12 23:52:29

-------------------------------aul5-----------test2---------------------------

--下面的实验证明了一个小问题:先要unload字典,system的用户创建的可能unload不出来

AUL> UNLOAD TABLE USER$;

2011-10-12 23:51:02

2011-10-12 23:51:02

AUL> UNLOAD TABLE OBJ$;

2011-10-12 23:51:08

2011-10-12 23:51:08

AUL> UNLOAD TABLE TAB$;

2011-10-12 23:51:13

2011-10-12 23:51:13

AUL> UNLOAD TABLE COL$;

2011-10-12 23:51:18

2011-10-12 23:51:19

AUL> UNLOAD TABLE LIHJ

2 ;

AUL> LIST TABLE SCOTT

-------------------------------------------注意这些步骤的顺序,刚刚checkpoint的数据要重新加载

UNLOAD TABLE SCOTT.DEPT TO DEPT.txt;

UNLOAD TABLE SCOTT.EMP TO EMP.txt;

UNLOAD TABLE SCOTT.BONUS TO BONUS.txt;

UNLOAD TABLE SCOTT.SALGRADE TO SALGRADE.txt;

AUL> UNLOAD TABLE SCOTT.DEPT ;

2011-10-12 23:52:29

Unload OBJD=51146 FILE=4 BLOCK=11 CLUSTER=0 ...

10|ACCOUNTING|NEW YORK

20|RESEARCH|DALLAS

30|SALES|CHICAGO

40|OPERATIONS|BOSTON

Sucessfully unload 4 rows ...

2011-10-12 23:52:29

AUL> LIST TABLE SCOTT;

UNLOAD TABLE SCOTT.DEPT TO DEPT.txt;

UNLOAD TABLE SCOTT.EMP TO EMP.txt;

UNLOAD TABLE SCOTT.BONUS TO BONUS.txt;

UNLOAD TABLE SCOTT.SALGRADE TO SALGRADE.txt;

AUL> UNLOAD TABLE USER$;

2011-10-12<

open db10g.cfg

unload table USER$

unload table OBJ$

unload table TAB$

unload table COL$ --以上四个步骤好像都需要的

--刚刚开始的时候 前面不能添加

SET FIELD_TAG x07

SET RECORD_TAG x06unload table sys.view$ to sys_view2.txt;

--视图可以搞出来 牛

--关键是数据

---------------------------------以下的顺序算是比较成功的------------------------------------

open db10g.cfg --这个文件需要上传的

unload table USER$;

unload table OBJ$;

unload table TAB$;

unload table COL$;

set field_tag x07

set record_tag x06

---

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

上一篇: 平均事务时间
下一篇: gdb 简易入门
请登录后发表评论 登录
全部评论

注册时间:2011-05-25

  • 博文量
    109
  • 访问量
    1577024