• aul 学习测试(测量)


    -------------------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 23:57:47
    2011-10-12 23:57:47
    AUL> UNLOAD TABLE OBJ$;
    2011-10-12 23:57:47
    UNLOAD TABLE TAB$;
    UNLOAD TABLE COL$;
    LIST TABLE SCOTT 
    2011-10-12 23:57:47
    AUL> 2011-10-12 23:57:47
    2011-10-12 23:57:47
    AUL> 2011-10-12 23:57:47
    2011-10-12 23:57:47
    AUL> 
     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;
     UNLOAD TABLE SCOTT.LIHJ TO LIHJ.txt;
    AUL> UNLOAD TABLE LIHJ
       2 ;
    AUL>  UNLOAD TABLE SCOTT.LIHJ;
    2011-10-12 23:58:25
    Unload OBJD=51626 FILE=4 BLOCK=1387 CLUSTER=0 ...
    DEPT|USERS|||VALID|10||1|255|65536||1|2147483645||||YES|N|||||||||         1|         1|    N|ENABLED|||NO||N|N|NO|DEFAULT|DISABLED|NO|NO||DISABLED|YES||DISABLED|DISABLED|NO
    EMP|USERS|||VALID|10||1|255|65536||1|2147483645||||YES|N|||||||||         1|         1|    N|ENABLED|||NO||N|N|NO|DEFAULT|DISABLED|NO|NO||DISABLED|YES||DISABLED|DISABLED|NO
    BONUS|USERS|||VALID|10||1|255|65536||1|2147483645||||YES|N|||||||||         1|         1|    N|ENABLED|||NO||N|N|NO|DEFAULT|DISABLED|NO|NO||DISABLED|YES||DISABLED|DISABLED|NO
    SALGRADE|USERS|||VALID|10||1|255|65536||1|2147483645||||YES|N|||||||||         1|         1|    N|ENABLED|||NO||N|N|NO|DEFAULT|DISABLED|NO|NO||DISABLED|YES||DISABLED|DISABLED|NO
    Sucessfully unload 4 rows ...
    2011-10-12 23:58:25
    ---------------------------------------------------------------------------------------------
    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
    ---下面的命令能够同一时候生成ctl文件和sql文件,,以后用这个顺序做
    unload table sys.source$ to sys_source.txt; 
    unload table scott.dept to scott_dept.txt; 
    -----系统生成的文件
    rac1-> ll
    total 32460
    -rw-r--r--  1 oracle oinstall  2328529 Oct 13 00:31 AULCOL.TXT
    -rw-r--r--  1 oracle oinstall  1868268 Oct 13 00:29 AULOBJ.TXT
    -rw-r--r--  1 oracle oinstall    84655 Oct 13 00:31 AULTAB.TXT
    -rw-r--r--  1 oracle oinstall      874 Oct 13 00:29 AULUSR.TXT
    -rw-r--r--  1 oracle oinstall      293 Oct 13 00:34 DEPT_sqlldr.ctl
    -rw-r--r--  1 oracle oinstall      108 Oct 13 00:34 DEPT_syntax.sql
    -rw-r--r--  1 oracle oinstall      295 Oct 13 00:31 SOURCE__sqlldr.ctl
    -rw-r--r--  1 oracle oinstall      112 Oct 13 00:31 SOURCE__syntax.sql
    -rwxr-xr-x  1 oracle oinstall   352196 Jun 28 15:23 aul5b_linux.bin
    -rw-r--r--  1 oracle oinstall      185 Oct 12 23:34 db10g.cfg
    -rw-r--r--  1 oracle oinstall       80 Oct 13 00:34 scott_dept.txt
    -rw-r--r--  1 oracle oinstall 28532163 Oct 13 00:31 sys_source.txt




    ---假设是删除的数据该怎么恢复呢!否则仅仅能恢复现有的重要的数据。工具的局限性大的工具由大牛编写。局限性非常强。做好备份。非常重要:

    相比之下该文章更有借鉴性(偷梁换柱——极端情况下的数据解救)

    http://www.hellodba.com/reader.php?

    ID=210&lang=CN

    版权声明:本文博主原创文章。博客,未经同意不得转载。

  • 相关阅读:
    分页封装实用工具类及其使用方法
    Oracle
    [置顶] Android高德地图显示气泡框
    设计模式 笔记 观察者模式
    数据质量,中国希望
    谁更胜一筹:技术解析 Google App Engine 和 Amazon EC2
    GZIP Http Servlet Response
    谁更胜一筹:技术解析 Google App Engine 和 Amazon EC2
    腾讯对外发布微博开放平台 API
    GZIP Http Servlet Response
  • 原文地址:https://www.cnblogs.com/zfyouxi/p/4791012.html
Copyright © 2020-2023  润新知