NBU异机恢复ORACLE(遇到的问题)

 

NBU异机恢复ORACLE(遇到的问题)
成功版本参考 《NBU异机恢复ORACLE成功版本》

源端:oracle10grac1 oracle10grac2 RAC+ASM 
目标端:ora10 

在 Master Server的/usr/openv/netbackup/db/altnames目录下创建文件 No.Restrictions 

源段:
select 'set newname for datafile '||t.file_id||' to'||'''/opt/oracle/oradata/orcl/' ||replace(t.file_name,'+DATA/orcl/datafile/','')||''';' from dba_data_files t order by t.file_id;

select dbid from v$database;
 
目标端: oracle_link需要做
 
否则会报 ORA-19554  ORA-27211 产生误导,以为是犯了错
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' clear; 这条适合下面这个网页的情况,但是我们不存在这种情况
http://www.eygle.com/archives/2005/10/oracle_howto_ora-19554_sbt_tape.html
[oracle@ora10 ~]$   /usr/openv/netbackup/bin/oracle_link

[oracle@oracle10grac1 dbs]$ scp orapworcl1 ora10:/opt/oracle/10g/db/dbs
[oracle@ora10 dbs]$ mv orapworcl1 orapworcl
initorcl.ora也传一份过来手工修改成单机模式,相应目录应建好,ora10只安装oracle软件,特别注意版本要升级成源端的版本

[oracle@ora10 ~]$ more initorcl.ora
orcl.__db_cache_size=32914560
orcl.__java_pool_size=2194304
orcl.__large_pool_size=2194304
orcl.__shared_pool_size=60023424
orcl.__streams_pool_size=0
*.audit_file_dest='/opt/oracle/admin/orcl/adump'
*.background_dump_dest='/opt/oracle/admin/orcl/bdump'
*.compatible='10.2.0.5.0'
*.control_files='/opt/oracle/oradata/orcl/orcl.ctl'
*.core_dump_dest='/opt/oracle/admin/orcl/cdump'
*.db_block_size=8192
*.db_create_file_dest='/opt/oracle/oradata/orcl'
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='orcl'
*.db_recovery_file_dest='/opt/oracle/flash'
*.db_recovery_file_dest_size=2097152000
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.job_queue_processes=10
*.log_archive_dest_1='location=/opt/oracle/arch'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=31457280
*.processes=500
*.remote_login_passwordfile='exclusive'
*.sessions=555
*.sga_target=209715200
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/opt/oracle/admin/orcl/udump'

 
目标端:
SQL> startup nomount pfile='/home/oracle/initorcl.ora';
 
源端:( 备份完成过后就可以做,然后传到目标端
SQL> alter database backup controlfile to '/home/oracle/orcl.ctl';
[oracle@oracle10grac1 ~]$ scp orcl.ctl ora10:/home/oracle/
 
目标端:
RMAN> set dbid=1307155182

executing command: SET DBID

RMAN> restore controlfile from '/home/oracle/orcl.ctl';

Starting restore at 11-APR-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=540 devtype=DISK

channel ORA_DISK_1: copied control file copy
output filename=/opt/oracle/oradata/orcl/orcl.ctl
Finished restore at 11-APR-12

SQL>  alter database mount;


RUN {
ALLOCATE CHANNEL ch00 TYPE  'SBT_TAPE';
SEND 'NB_ORA_SERV=nbuserver,NB_ORA_CLIENT=oracle10grac1';
set newname for datafile 1 to'/opt/oracle/oradata/orcl/system.256.779374375';
set newname for datafile 2 to'/opt/oracle/oradata/orcl/undotbs1.258.779374377';
set newname for datafile 3 to'/opt/oracle/oradata/orcl/sysaux.257.779374377';
set newname for datafile 4 to'/opt/oracle/oradata/orcl/users.259.779374377';
set newname for datafile 5 to'/opt/oracle/oradata/orcl/undotbs2.264.779374547';
set newname for datafile 6 to'/opt/oracle/oradata/orcl/test01.dbf';
RESTORE    DATABASE;
RESTORE ARCHIVELOG ALL;
RELEASE CHANNEL ch00;
}
 

-- 本来这部做完之后,再recover就好了,可是recover的时候出了问题
 
 
RMAN> RUN {
2> ALLOCATE CHANNEL ch00 TYPE  'SBT_TAPE';
3> SEND 'NB_ORA_SERV=nbuserver,NB_ORA_CLIENT=oracle10grac1';
4> set newname for datafile 1 to'/opt/oracle/oradata/orcl/system.256.779374375';
5> set newname for datafile 2 to'/opt/oracle/oradata/orcl/undotbs1.258.779374377';
6> set newname for datafile 3 to'/opt/oracle/oradata/orcl/sysaux.257.779374377';
7> set newname for datafile 4 to'/opt/oracle/oradata/orcl/users.259.779374377';
8> set newname for datafile 5 to'/opt/oracle/oradata/orcl/undotbs2.264.779374547';
9> set newname for datafile 6 to'/opt/oracle/oradata/orcl/test01.dbf';
10> RESTORE    DATABASE;
11> RELEASE CHANNEL ch00;
12> }

released channel: ORA_DISK_1
allocated channel: ch00
channel ch00: sid=540 devtype=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.1 (2011020316)

sent command to channel: ch00

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 11-APR-12
Starting implicit crosscheck backup at 11-APR-12
Crosschecked 16 objects
Finished implicit crosscheck backup at 11-APR-12

Starting implicit crosscheck copy at 11-APR-12
Crosschecked 2 objects
Finished implicit crosscheck copy at 11-APR-12

searching for all files in the recovery area
cataloging files...
no files cataloged


channel ch00: starting datafile backupset restore
channel ch00: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /opt/oracle/oradata/orcl/undotbs1.258.779374377
restoring datafile 00003 to /opt/oracle/oradata/orcl/sysaux.257.779374377
restoring datafile 00006 to /opt/oracle/oradata/orcl/test01.dbf
channel ch00: reading from backup piece bk_376_1_780357313
channel ch00: restored backup piece 1
piece handle=bk_376_1_780357313 tag=HOT_DB_BK_LEVEL0
channel ch00: restore complete, elapsed time: 00:00:46
channel ch00: starting datafile backupset restore
channel ch00: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /opt/oracle/oradata/orcl/system.256.779374375
restoring datafile 00004 to /opt/oracle/oradata/orcl/users.259.779374377
restoring datafile 00005 to /opt/oracle/oradata/orcl/undotbs2.264.779374547
channel ch00: reading from backup piece bk_375_1_780357313
channel ch00: restored backup piece 1
piece handle=bk_375_1_780357313 tag=HOT_DB_BK_LEVEL0
channel ch00: restore complete, elapsed time: 00:00:55
Finished restore at 11-APR-12

released channel: ch00

RMAN> RUN {
2> ALLOCATE CHANNEL ch00 TYPE  'SBT_TAPE';
3> SEND 'NB_ORA_SERV=nbuserver,NB_ORA_CLIENT=oracle10grac1';
4> set newname for datafile 1 to'/opt/oracle/oradata/orcl/system.256.779374375';
5> set newname for datafile 2 to'/opt/oracle/oradata/orcl/undotbs1.258.779374377';
6> set newname for datafile 3 to'/opt/oracle/oradata/orcl/sysaux.257.779374377';
7> set newname for datafile 4 to'/opt/oracle/oradata/orcl/users.259.779374377';
8> set newname for datafile 5 to'/opt/oracle/oradata/orcl/undotbs2.264.779374547';
9> set newname for datafile 6 to'/opt/oracle/oradata/orcl/test01.dbf';
10> RESTORE    DATABASE;
11> RESTORE ARCHIVELOG ALL;
12> RELEASE CHANNEL ch00;
13> }

allocated channel: ch00
channel ch00: sid=540 devtype=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.1 (2011020316)

sent command to channel: ch00

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 11-APR-12

skipping datafile 2; already restored to file /opt/oracle/oradata/orcl/undotbs1.258.779374377
skipping datafile 3; already restored to file /opt/oracle/oradata/orcl/sysaux.257.779374377
skipping datafile 6; already restored to file /opt/oracle/oradata/orcl/test01.dbf
skipping datafile 1; already restored to file /opt/oracle/oradata/orcl/system.256.779374375
skipping datafile 4; already restored to file /opt/oracle/oradata/orcl/users.259.779374377
skipping datafile 5; already restored to file /opt/oracle/oradata/orcl/undotbs2.264.779374547
Finished restore at 11-APR-12

Starting restore at 11-APR-12

released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/11/2012 22:19:29
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of log thread 2 seq 130 lowscn 929777 found to restore
RMAN-06025: no backup of log thread 2 seq 24 lowscn 440269 found to restore
RMAN-06025: no backup of log thread 2 seq 23 lowscn 439595 found to restore
RMAN-06025: no backup of log thread 2 seq 22 lowscn 438461 found to restore
RMAN-06025: no backup of log thread 2 seq 21 lowscn 438396 found to restore
RMAN-06025: no backup of log thread 2 seq 20 lowscn 438172 found to restore
RMAN-06025: no backup of log thread 2 seq 19 lowscn 438148 found to restore
RMAN-06025: no backup of log thread 2 seq 18 lowscn 437934 found to restore
RMAN-06025: no backup of log thread 2 seq 17 lowscn 437909 found to restore
RMAN-06025: no backup of log thread 2 seq 16 lowscn 437791 found to restore
RMAN-06025: no backup of log thread 2 seq 15 lowscn 437770 found to restore
RMAN-06025: no backup of log thread 2 seq 14 lowscn 437655 found to restore
RMAN-06025: no backup of log thread 2 seq 13 lowscn 437629 found to restore
RMAN-06025: no backup of log thread 2 seq 12 lowscn 436883 found to restore
RMAN-06025: no backup of log thread 2 seq 11 lowscn 435254 found to restore
RMAN-06025: no backup of log thread 2 seq 10 lowscn 434190 found to restore
RMAN-06025: no backup of log thread 2 seq 9 lowscn 434186 found to restore
RMAN-06025: no backup of log thread 2 seq 8 lowscn 434176 found to restore
RMAN-06025: no backup of log thread 2 seq 7 lowscn 433779 found to restore
RMAN-06025: no backup of log thread 2 seq 6 lowscn 433317 found to restore
RMAN-06025: no backup of log thread 2 seq 5 lowscn 431666 found to restore
RMAN-06025: no backup of log thread 2 seq 4 lowscn 431648 found to restore
RMAN-06025: no backup of log thread 2 seq 3 lowscn 403797 found to restore
RMAN-06025: no backup of log thread 2 seq 2 lowscn 401973 found to restore
RMAN-06025: no backup of log thread 2 seq 1 lowscn 398422 found to restore
RMAN-06025: no backup of log thread 1 seq 131 lowscn 929783 found to restore
RMAN-06025: no backup of log thread 1 seq 15 lowscn 437906 found to restore
RMAN-06025: no backup of log thread 1 seq 14 lowscn 437793 found to restore
RMAN-06025: no backup of log thread 1 seq 13 lowscn 437768 found to restore
RMAN-06025: no backup of log thread 1 seq 12 lowscn 437658 found to restore
RMAN-06025: no backup of log thread 1 seq 11 lowscn 437627 found to restore
RMAN-06025: no backup of log thread 1 seq 10 lowscn 436879 found to restore
RMAN-06025: no backup of log thread 1 seq 9 lowscn 435257 found to restore
RMAN-06025: no backup of log thread 1 seq 8 lowscn 434179 found to restore
RMAN-06025: no backup of log thread 1 seq 7 lowscn 431669 found to restore
RMAN-06025: no backup of log thread 1 seq 6 lowscn 431645 found to restore
RMAN-06025: no backup of log thread 1 seq 5 lowscn 429741 found to restore
RMAN-06025: no backup of log thread 1 seq 4 lowscn 403799 found to restore
RMAN-06025: no backup of log thread 1 seq 3 lowscn 402118 found to restore
RMAN-06025: no backup of log thread 1 seq 2 lowscn 393397 found to restore

RMAN> RECOVER DATABASE ;

Starting recover at 11-APR-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=540 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/11/2012 22:19:46
RMAN-06094: datafile 1 must be restored
 
这样也还是报错,那就不是分配通道的问题了
 
RMAN> RUN{
2> ALLOCATE CHANNEL ch11 TYPE  'SBT_TAPE';
3> SEND 'NB_ORA_SERV=nbuserver,NB_ORA_CLIENT=oracle10grac1';
4> recover database;
5> RELEASE CHANNEL ch11;
6> }


allocated channel: ch11
channel ch11: sid=540 devtype=SBT_TAPE
channel ch11: Veritas NetBackup for Oracle - Release 7.1 (2011020316)

sent command to channel: ch11

Starting recover at 11-APR-12
released channel: ch11
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/11/2012 23:23:21
RMAN-06094: datafile 1 must be restored

最后发现,虽然set newname为新库的目录了,但是system数据文件还是在控制文件中是原来数据库ASM上的位置
 
RMAN> alter database open resetlogs;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 04/11/2012 23:30:22
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '+DATA/orcl/datafile/system.256.779374375'
 
最后发现,TMD控制文件放文件的位置怎么全部都在原来ASM上
SQL> /

     FILE# NAME                                                         STATUS
---------- ------------------------------------------------------------ -------
         1 +DATA/orcl/datafile/system.256.779374375                     SYSTEM
         2 +DATA/orcl/datafile/undotbs1.258.779374377                   ONLINE
         3 +DATA/orcl/datafile/sysaux.257.779374377                     ONLINE
         4 +DATA/orcl/datafile/users.259.779374377                      ONLINE
         5 +DATA/orcl/datafile/undotbs2.264.779374547                   ONLINE
         6 +DATA/orcl/datafile/test01.dbf                               ONLINE

6 rows selected.

SQL> 
 
FUCK,原来是set newname没起作用,是没用到switch datafile all;
RUN {
ALLOCATE CHANNEL ch00 TYPE  'SBT_TAPE';
SEND 'NB_ORA_SERV=nbuserver,NB_ORA_CLIENT=oracle10grac1';
set newname for datafile 1 to'/opt/oracle/oradata/orcl/system.256.779374375';
set newname for datafile 2 to'/opt/oracle/oradata/orcl/undotbs1.258.779374377';
set newname for datafile 3 to'/opt/oracle/oradata/orcl/sysaux.257.779374377';
set newname for datafile 4 to'/opt/oracle/oradata/orcl/users.259.779374377';
set newname for datafile 5 to'/opt/oracle/oradata/orcl/undotbs2.264.779374547';
set newname for datafile 6 to'/opt/oracle/oradata/orcl/test01.dbf';
RESTORE    DATABASE;
switch datafile all;
RESTORE ARCHIVELOG ALL;
RELEASE CHANNEL ch00;
}

--但是还是硬要找归档日志
RMAN> RUN {
2> ALLOCATE CHANNEL ch00 TYPE  'SBT_TAPE';
3> SEND 'NB_ORA_SERV=nbuserver,NB_ORA_CLIENT=oracle10grac1';
4> set newname for datafile 1 to'/opt/oracle/oradata/orcl/system.256.779374375';
5> set newname for datafile 2 to'/opt/oracle/oradata/orcl/undotbs1.258.779374377';
6> set newname for datafile 3 to'/opt/oracle/oradata/orcl/sysaux.257.779374377';
7> set newname for datafile 4 to'/opt/oracle/oradata/orcl/users.259.779374377';
8> set newname for datafile 5 to'/opt/oracle/oradata/orcl/undotbs2.264.779374547';
9> set newname for datafile 6 to'/opt/oracle/oradata/orcl/test01.dbf';
10> RESTORE    DATABASE;
11> switch datafile all;
12> RESTORE ARCHIVELOG ALL;
13> RELEASE CHANNEL ch00;
14> }

released channel: ORA_DISK_1
allocated channel: ch00
channel ch00: sid=540 devtype=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.1 (2011020316)

sent command to channel: ch00

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 11-APR-12

skipping datafile 1; already restored to file /opt/oracle/oradata/orcl/system.256.779374375
skipping datafile 4; already restored to file /opt/oracle/oradata/orcl/users.259.779374377
skipping datafile 5; already restored to file /opt/oracle/oradata/orcl/undotbs2.264.779374547
skipping datafile 2; already restored to file /opt/oracle/oradata/orcl/undotbs1.258.779374377
skipping datafile 3; already restored to file /opt/oracle/oradata/orcl/sysaux.257.779374377
skipping datafile 6; already restored to file /opt/oracle/oradata/orcl/test01.dbf
Finished restore at 11-APR-12


Starting restore at 11-APR-12

released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/11/2012 23:39:43
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of log thread 2 seq 131 lowscn 929896 found to restore
RMAN-06025: no backup of log thread 2 seq 130 lowscn 929777 found to restore
RMAN-06025: no backup of log thread 2 seq 129 lowscn 929724 found to restore
RMAN-06025: no backup of log thread 2 seq 128 lowscn 928733 found to restore
RMAN-06025: no backup of log thread 2 seq 127 lowscn 907963 found to restore
RMAN-06025: no backup of log thread 2 seq 126 lowscn 907776 found to restore
RMAN-06025: no backup of log thread 2 seq 125 lowscn 906250 found to restore
RMAN-06025: no backup of log thread 2 seq 124 lowscn 885594 found to restore
RMAN-06025: no backup of log thread 2 seq 123 lowscn 865475 found to restore
RMAN-06025: no backup of log thread 2 seq 122 lowscn 864010 found to restore
RMAN-06025: no backup of log thread 2 seq 121 lowscn 863247 found to restore
RMAN-06025: no backup of log thread 2 seq 120 lowscn 863140 found to restore
RMAN-06025: no backup of log thread 2 seq 119 lowscn 859445 found to restore
RMAN-06025: no backup of log thread 2 seq 118 lowscn 854593 found to restore
RMAN-06025: no backup of log thread 2 seq 117 lowscn 854454 found to restore
RMAN-06025: no backup of log thread 2 seq 116 lowscn 854003 found to restore
RMAN-06025: no backup of log thread 2 seq 115 lowscn 851640 found to restore
RMAN-06025: no backup of log thread 2 seq 114 lowscn 808961 found to restore
RMAN-06025: no backup of log thread 2 seq 113 lowscn 785764 found to restore
RMAN-06025: no backup of log thread 2 seq 112 lowscn 765763 found to restore
RMAN-06025: no backup of log thread 2 seq 111 lowscn 765689 found to restore
RMAN-06025: no backup of log thread 2 seq 110 lowscn 745300 found to restore
RMAN-06025: no backup of log thread 2 seq 109 lowscn 723232 found to restore
RMAN-06025: no backup of log thread 2 seq 108 lowscn 685345 found to restore
RMAN-06025: no backup of log thread 2 seq 107 lowscn 685303 found to restore
RMAN-06025: no backup of log thread 2 seq 106 lowscn 685194 found to restore
RMAN-06025: no backup of log thread 2 seq 105 lowscn 685167 found to restore
RMAN-06025: no backup of log thread 2 seq 104 lowscn 685012 found to restore
RMAN-06025: no backup of log thread 2 seq 103 lowscn 684991 found to restore
RMAN-06025: no backup of log thread 2 seq 102 lowscn 658111 found to restore
RMAN-06025: no backup of log thread 2 seq 101 lowscn 658045 found to restore
RMAN-06025: no backup of log thread 2 seq 100 lowscn 658006 found to restore
RMAN-06025: no backup of log thread 2 seq 99 lowscn 657949 found to restore
RMAN-06025: no backup of log thread 2 seq 98 lowscn 656969 found to restore
RMAN-06025: no backup of log thread 2 seq 97 lowscn 656944 found to restore
RMAN-06025: no backup of log thread 2 seq 96 lowscn 624908 found to restore
RMAN-06025: no backup of log thread 2 seq 95 lowscn 624869 found to restore
RMAN-06025: no backup of log thread 2 seq 94 lowscn 624260 found to restore
RMAN-06025: no backup of log thread 2 seq 93 lowscn 623703 found to restore
RMAN-06025: no backup of log thread 2 seq 92 lowscn 622621 found to restore
RMAN-06025: no backup of log thread 2 seq 91 lowscn 622596 found to restore
RMAN-06025: no backup of log thread 2 seq 90 lowscn 621818 found to restore
RMAN-06025: no backup of log thread 2 seq 89 lowscn 621791 found to restore
RMAN-06025: no backup of log thread 2 seq 88 lowscn 613706 found to restore
RMAN-06025: no backup of log thread 2 seq 87 lowscn 613316 found to restore
RMAN-06025: no backup of log thread 2 seq 86 lowscn 612817 found to restore
RMAN-06025: no backup of log thread 2 seq 85 lowscn 592253 found to restore
RMAN-06025: no backup of log thread 2 seq 84 lowscn 592225 found to restore
RMAN-06025: no backup of log thread 2 seq 83 lowscn 587065 found to restore
RMAN-06025: no backup of log thread 2 seq 82 lowscn 546386 found to restore
RMAN-06025: no backup of log thread 2 seq 81 lowscn 522027 found to restore
RMAN-06025: no backup of log thread 2 seq 80 lowscn 490716 found to restore
RMAN-06025: no backup of log thread 2 seq 79 lowscn 490683 found to restore
RMAN-06025: no backup of log thread 2 seq 78 lowscn 483478 found to restore
RMAN-06025: no backup of log thread 2 seq 77 lowscn 483457 found to restore
RMAN-06025: no backup of log thread 2 seq 76 lowscn 483217 found to restore
RMAN-06025: no backup of log thread 2 seq 75 lowscn 483183 found to restore
RMAN-06025: no backup of log thread 2 seq 74 lowscn 483040 found to restore
RMAN-06025: no backup of log thread 2 seq 73 lowscn 483020 found to restore
RMAN-06025: no backup of log thread 2 seq 72 lowscn 482284 found to restore
MAN-06025: no backup of log thread 2 seq 71 lowscn 482258 found to restore
RMAN> recover database;

Starting recover at 11-APR-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=540 devtype=DISK

starting media recovery

unable to find archive log
archive log thread=1 sequence=133
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/11/2012 23:39:55
RMAN-06054: media recovery requesting unknown log: thread 1 seq 133 lowscn 942619

RMAN> alter database open resetlogs;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 04/11/2012 23:40:11
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system.256.779374375'

RMAN> 
 
 
 
按照提示是缺少在线日志 133,本来应该可以open resetlogs的啊?
SQL> select SEQUENCE#,status,archived from v$log;

SEQUENCE# STATUS           ARC
---------- ---------------- ---
       133 CURRENT          NO
       132 INACTIVE         YES
       131 INACTIVE         YES
       132 CURRENT          NO
 
参考这个网址,明天解决
http://www.itpub.net/thread-1410747-1-1.html
 
确实我的 全备脚本应该加上归档日志

你可能感兴趣的:(oracle,职场,休闲,NBU)