我现在是在aix 操作系统上面oracle9。0。2。1。0操作,不小心把数据库中一个表通过PLSQL,运行创建表结构的SQL语句,把原来表中的数据和表空间,索引都覆盖了,请问有什么办法解决吗?(有一个7月10号的冷备份,有归档日志)
各位DBA高手,如果能够解决这个问题,不盛感激,有什么好的方法可以联系:
[email protected], 0752-2611998 曾铁环

解决方案 »

  1.   

    recover database unitl time '';
      

  2.   

    我是用PLSQL运行创建表的原始语句(用Pdesigner生成的),现在情况是这样:我在7月10号进行的一次全部数据库冷备份,数据库有日志和归档,到昨天晚上18:22发生了这个表被重建
      

  3.   

    系统环境: 
    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);
    insert into a values(1);
    insert into a select * from a; --反复插入,达到10万条
    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;
      

  4.   

    我的方法:
     把7月10号数据库冷备份恢复
    然后
    sqlplus /nolog
    sql>conn /as sysdba
    sql>shutdown
    sql>startup mount
    sql>recover database until time '2004-07-15:17:50:50';
    sql>alter database open resetlogs;
      

  5.   

    发生问题的时候,有一个DBA进行的操作:关闭数据库,关闭机器,拷贝文件,对数据库进行恢复,当进行到第四个日志进行回滚的时候出现错误,代码是328
      

  6.   

    如果可以的话怎么能够确保数据不丢失,请教高手,我现在在广东惠州TCL移动通信,如果真的有高手能够解决这个问题可以联系:0752-2611998,曾铁环,或者联系:
    [email protected]