我的数据库采用的归档方式。
我用RMAN定时备份是成功的,可是我把数据库里的数据删除后,恢复数据还是没能恢复回来。恢复也是用的RMAN,在Enterprise console中显示备份与恢复都是成功的。我查看输出,备份也是执行了的。
各位前辈,请指点。我会送分的。

解决方案 »

  1.   

    可以使用命令行方式
    1,用RMAN用户连接 C:\> rman target system/manager nocatalog
    2,执行下列脚本:
    RMAN> startup mount
    RMAN> run {
    2> allocate channel d1 type disk;
    3> allocate channel d2 type disk; # Parallel Restore
    4> restore database;
    5> recover database;
    6> sql “alter database open”;}如果是备份到磁带则用allocate channel T1 type sbt_tape;
    应该就可以自动恢复了
      

  2.   

    不好意思,我几天没空看我的贴子。
    谢谢各位同仁。
    我用命令执行了。出现以下错误。
    RMAN>run {
    2> allocate channel CAN1 type disk;
    3> restore database;
    4> recover database;
    5> sql "alter database open"; }RMAN-03022:正在编译命令:allocate
    RMAN-03023:正在执行命令:allocate
    RMAN-08030:分配的通道:CAN1
    RMAN-08500:通道 CAN1:sid=26 devtype=DISKRMAN-03022:正在编译命令:restoreRMAN-03022:正在编译命令:IRESTORE
    RMAN-03026:在释放通道资源时出现错误恢复
    RMAN-08031:释放的通道:CAN1
    RMAN-00571: ====================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ========
    RMAN-00571: ====================================================
    RMAN-03002: failure during compilation of command
    RMAN-03013: command type: restore
    RMAN-03002: failure during compilation of command
    RMAN-03013: command type: IRESTORE
    RMAN-06003: ORACLE error from target database: ORA-01843: 无效的
    RMAN-06097: text of failing SQL statement: select decode(bitand(
    ),128,fecps,4096,fecps,0) ,decode(bitand(festa,(4096+128)),128,2
    096,controlfile_change#,0) ,decode(bitand(festa,(4096+128)),128,
    trolfile_time,to_date('JAN 01 1988','MON DD YYYY')) ,feofs ,feon
    vl(feonc_tim,'01/01/88 00:01:01'),'MM/DD/RR HH24:MI:SS') into :b
    5,:b6  from x$kccfe ,v$database where (fenum=:b7 and fedup=1)
    RMAN-06099: error occurred in source file: krmk.pc, line: 21652
      

  3.   

    是时间问题,备份和恢复时都要设环境变量NLS_DATE_FORMAT=YYYY-MM-DD:hh24:mi:ss
      

  4.   

    是时间问题,即时恢复脚本如下:
    rman>run{
    sql "alter session set NLS_LANG=american";
    sql "alter session set NLS_DATA_FORMAT='MON-DD-YYYY HH24:MI:SS'";
    set until time '06-13-2003 16:00:00';
    allocate chnnel t1 type 'sbt_tape';
    restore database;
    recover database;
    alter database open resetlogs;
    }
    rman>reset database;
      

  5.   

    各们仁兄,我试了,可是还是不能。
    RMAN>run {
    2> sql "alter session set NLS_LANG=american";
    3> sql "alter session set NLS_DATE_FORMAT='MON-DD-YYYY HH24:MI:SS'";
    4> set until time '06-10-2003 11:00:00';
    5> allocate channel CAN1 type disk;
    6>  restore database;
    7>  recover database;
    8>  alter database open resetlogs;
    9> }RMAN-03022:正在编译命令:sql
    RMAN-06162:sql 语句:alter session set NLS_LANG=american
    RMAN-03023:正在执行命令:sql
    RMAN-03026:在释放通道资源时出现错误恢复
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03006: non-retryable error occurred during execution of command: sql
    RMAN-07004: unhandled exception during command execution on channel default
    RMAN-20000: abnormal termination of job step
    RMAN-11003: failure during parse/execution of SQL statement: alter session set N
    LS_LANG=american
    RMAN-11001: Oracle Error: ORA-00922: ???????
      

  6.   

    dongjh 我设定这个参数据出错呀RMAN>run {
    2>  sql "alter session set NLS_DATE_FORMAT='YYYY-MM-DD:hh24:mi:ss'";
    3> }RMAN-03022:正在编译命令:sql
    RMAN-06162:sql 语句:alter session set NLS_DATE_FORMAT='YYYY-MM-DD:hh24:mi:ss'
    RMAN-03023:正在执行命令:sql
    RMAN-03026:在释放通道资源时出现错误恢复
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03006: non-retryable error occurred during execution of command: sql
    RMAN-07004: unhandled exception during command execution on channel default
    RMAN-10015: error compiling PL/SQL program
    RMAN-10014: PL/SQL error 103 on line 4 column 53: 出现符号 "MI"在需要下列之一时

    .(),*@%&=-+</>atinmodnotrem
       <an exponent (**)><> or != or ~=>=<=<>andorlikebetween
       is nullis not||is dangling
    RMAN-10014: PL/SQL error 103 on line 4 column 43: 出现符号 "YYYY"在需要下列之一
    时:
    .(),*@%&=-+</>atinmodnot
       rem<an exponent (**)><> or != or ~=>=<=<>andorlikebetween
       is nullis not||is dangling
    符号 "." 被替换为 "YYYY" 后继续。