sos

我的数据库中有一表中有40万条数据被删除了。没有数据库的任何备份,只有归档日志。
我想要回我的40万,我该怎么做?????若各位高手有办法的话,希望可以帮帮小弟。

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/1687/1687966.xml?temp=.1084558
      

  2.   

    源自oradb.net系统环境: 
    1、操作系统:Windows 2000 Server,机器内存128M
    2、数据库: Oracle 8i R2 (8.1.6) for NT 企业版
    3、安装路径:C:\ORACLE模拟现象: 先将数据库设置为归档模式SQL*Plus--创建实验表空间
    create tablespace test datafile
    'c:\test.ora' size 5M
    AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED
    default storage (initial 128K next 1M pctincrease 0)
    /--创建实验用户
      drop user test cascade;
    create user test identified by test default tablespace test;
    grant connect,resource to test;
    conn test/testcreate table a(a number);declare
    i number;
    begin
    i:=0;
    while i<100000 loop       --反复插入,达到10万条
       i:=i+1;
       insert into a values(1);     
    end loop;
    end;
    /commit;拷贝test.ora为test1.ora文件
    insert into a select * from a; --20万条
    commit;关闭数据库
    shutdown
    删除test.ora文件,把test1.ora拷贝为test.ora。重新启动数据库
    这时,可以mount上,但无法打开,因为现在使用的数据文件是旧的
    只有10万条记录,与控制文件中记载的log number不一样startup mount
    需要recover database,使数据库记录重新恢复到当前的20万条C:\>svrmgrl
    svrmgrl>connect internal
    svrmgrl>shutdown
    svrmgrl>startup mount
    svrmgrl>set autorecovery on
    svrmgrl>recover database;
    svrmgrl>alter database open;conn test/test
    select count(*) from a; --数据又恢复到20万条conn system/manager
    --删除实验表空间
    alter tablespace test offline;
    drop tablespace test INCLUDING CONTENTS;
      

  3.   

    我认为可以这样:由于你没有任何备份
    第一步:新建一个数据库,设置和你当前的库完全相同。
    第二步:把archive log file复制到新的数据库的归档文件目录下
    然后
    Mount the database and recover the data files before the time of failure.这里的时间,就是你误删除之前的时间。
    Open the database with RESETLOGS.
    Perform a closed database backup.如果你有任何时候的备份,那就不用第一、二步了
      

  4.   

    没有数据库备份,不能进行不完全恢复。看看数据库的版本,8i以上可以考虑使用logminer。
    但数据量大,会比较麻烦。