|
Size: 47626
Comment:
|
Size: 12442
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| @@ Message: Other users will be warned until 2018-09-13 06:21:37 that @ you are editing this page. @@ Comment: None @@ Trivial: (x) Yes ( ) No Describe désert/workarea/ayy/restore-EASDB here.@@ Syntax: 1.5 @@ Message: Other users will be warned until 2018-09-13 06:20:34 that @ you are editing this page. @@ Comment: None @@ Trivial: (x) Yes ( ) No Describe désert/Netbackup/Restore here. <<TableOfContents()>> |
|
| Line 16: | Line 5: |
| * Master Server: nbumaster (NBU Appliance 5230, 7.6.0.1) * RAC node1: mls-rac01 (OEL6.7, Oracle database 11.2.0.4) * Destination Client: rac-restore (OEL6.7, Oracle database 11.2.0.4) |
* Master Server: Netbackup-master (NBU 7.7.3) * Source node: MC-PMS-DB(OEL6.7, Oracle database 11.2.0.4) * Destination Client: MC-POSHIS-DB (OEL6.7, Oracle database 11.2.0.4) |
| Line 20: | Line 9: |
| * DBID=920906249 | * DBID=2147825860 |
| Line 28: | Line 17: |
| I. Touch the file on the master server: => /usr/openv/netbackup/db/altnames/No.Restrictions | |
| Line 33: | Line 23: |
| NAME ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +EAS_DATA/easdb/datafile/system.256.943035169 +EAS_DATA/easdb/datafile/sysaux.257.943035169 +EAS_DATA/easdb/datafile/undotbs1.258.943035169 +EAS_DATA/easdb/datafile/users.259.943035169 +EAS_DATA/easdb/datafile/undotbs2.264.943035365 +EAS_DATA/easdb/datafile/eas_d_mls2015db_index.268.945306733 +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.270.945306749 +EAS_DATA/easdb/datafile/eas_d_mls2015db_temp2.279.945306769 +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.269.945306785 +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.272.945306829 +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.273.945307171 +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.274.945307197 +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.275.945307213 +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.276.945307231 +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.277.945307251 +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.281.945307259 +EAS_DATA/easdb/datafile/eas_d_mls2015db_index.280.945307301 +EAS_DATA/easdb/datafile/mls_d_mlsmid_standard.278.945360691 +EAS_DATA/easdb/datafile/eas_d_eas8_index.261.945083521 +EAS_DATA/easdb/datafile/eas_d_eas8_standard.266.945083533 +EAS_DATA/easdb/datafile/eas_d_eas8_temp2.265.945083541 +EAS_DATA/easdb/datafile/mls_d_dsp1_standard.283.945362643 22 rows selected. |
|
| Line 61: | Line 24: |
| Press Return to Continue NAME ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +EAS_DATA/easdb/tempfile/temp.263.943035277 +EAS_DATA/easdb/tempfile/eas_t_mls2015db_standard.271.945306775 +EAS_DATA/easdb/tempfile/eas_t_eas8_standard.262.945085313 +EAS_DATA/easdb/tempfile/mls_t_mlsmid_standard.282.945360745 +EAS_DATA/easdb/tempfile/mls_t_dsp1_standard.284.945362645 |
|
| Line 72: | Line 26: |
| Press Return to Continue NAME ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +EAS_DATA/easdb/controlfile/current.260.943035273 +CRS/easdb/controlfile/current.258.943637341 |
|
| Line 81: | Line 30: |
| nbumaster:/home/maintenance # tail -5 /etc/hosts {{{ 192.168.24.73 it003 it003 192.168.17.161 mls-rac01 192.168.17.162 mls-rac02 192.168.17.168 eas-new 192.168.17.169 rac-restore |
Netbackup-master:/home/maintenance # tail -5 /etc/hosts {{{ 192.168.74.151 MC-PMS-DB 192.168.80.155 Netbackup-master 192.168.80.152 oem 192.168.80.162 MC-POSHIS-DB |
| Line 93: | Line 42: |
| nbumaster:/home/maintenance # cat /usr/openv/netbackup/bp.conf SERVER = nbumaster SERVER = TEST_SEVER SERVER = opscenter CLIENT_NAME = nbumaster USE_VXSS = PROHIBITED VXSS_SERVICE_TYPE = INTEGRITYANDCONFIDENTIALITY EMMSERVER = nbumaster VXDBMS_NB_DATA = /usr/openv/db/data ENABLE_ROBUST_LOGGING = YES VERBOSE = 5 NETBACKUP_APPLIANCE_MODE = MANUAL_MASTER_APPLIANCE IP_ADDRESS_FAMILY = AF_UNSPEC VM_PROXY_SERVER = nbumaster OPS_CENTER_SERVER_NAME = TEST_SEVER OPS_CENTER_SERVER_NAME = opscenter TELEMETRY_UPLOAD = YES }}} * Source Client (mls-rac01) {{{ [oracle@mls-rac01 ~]$ cat /usr/openv/netbackup/bp.conf SERVER = nbumaster CLIENT_NAME = mls-rac01 |
Netbackup-master: ~# cat /usr/openv/netbackup/bp.conf }}} * Source Client (MC-PMS-DB) {{{ [oracle@MC-PMS-DB ~]$ cat /usr/openv/netbackup/bp.conf SERVER = Netbackup-master CLIENT_NAME = MC-PMS-DB |
| Line 120: | Line 53: |
| * Destination Client (rac-restore) {{{ [root@rac-restore ~]# cat /usr/openv/netbackup/bp.conf SERVER = nbumaster CLIENT_NAME = rac-restore |
* Destination Client (MC-POSHIS-DB) {{{ [root@MC-POSHIS-DB ~]# cat /usr/openv/netbackup/bp.conf SERVER = Netbackup-master CLIENT_NAME = MC-POSHIS-DB |
| Line 129: | Line 62: |
| === Create initEASDB.ora & orapwd file === copy pfile from Source client mls-rac02 OR create new one. {{{ EASDB.__db_cache_size=5737807872 EASDB.__java_pool_size=117440512 EASDB.__large_pool_size=134217728 EASDB.__pga_aggregate_target=3221225472 EASDB.__sga_target=7516192768 EASDB.__shared_io_pool_size=0 EASDB.__shared_pool_size=1308622848 EASDB.__streams_pool_size=0 *.audit_file_dest='/u01/app/oracle/admin/EASDB/adump' |
=== Create initPMSDB.ora & orapwd file === copy pfile from Source client MC-PMS-DB OR create new one. {{{ HDPMS.__db_cache_size=4160749568 HDPMS.__java_pool_size=16777216 HDPMS.__large_pool_size=33554432 HDPMS.__oracle_base='/oracle/app/oracle'#ORACLE_BASE set from environment HDPMS.__pga_aggregate_target=894498816 HDPMS.__sga_target=3066719232 HDPMS.__shared_io_pool_size=0 HDPMS.__shared_pool_size=805306368 HDPMS.__streams_pool_size=16777216 *.audit_file_dest='/oracle/app/oracle/admin/HDPMS/adump' |
| Line 145: | Line 79: |
| *.control_files='/rac-restore/EASDB/controlfile/ctrl_dEASDB.ctl' | *.control_files='/oracle/app/oracle/oradata/HDPMS/control01.ctl','/oracle/app/oracle/oradata/HDPMS/control02.ctl' |
| Line 147: | Line 81: |
| *.db_create_file_dest='/rac-restore' | |
| Line 149: | Line 82: |
| *.db_name='EASDB' *.diagnostic_dest='/u01/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=EASDBXDB)' *.log_archive_dest_1='LOCATION=/rac-restore/EASDB/arch' *.log_archive_format='arch_%t_%s_%r.arc' |
*.db_name='HDPMS' *.diagnostic_dest='/oracle/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=HDPMSXDB)' *.log_archive_dest_1='LOCATION=/oradata/HDPMS/archlog' |
| Line 155: | Line 87: |
| *.pga_aggregate_target=3221225472 *.processes=300 *.remote_login_passwordfile='exclusive' *.sessions=335 *.sga_target=7516192768 |
*.pga_aggregate_target=1684013056 *.processes=1500 *.remote_login_passwordfile='EXCLUSIVE' *.sessions=1655 *.sga_target=5052039168 *.undo_retention=7200 |
| Line 163: | Line 96: |
{{{ [oracle@rac-restore dbs]$ orapwd password=Systec36 file=orapwEASDB [oracle@rac-restore dbs]$ ls hc_EASDB.dat initEASDB.ora initEASDB.ora.old init.ora orapwEASDB |
* option {{{ [oracle@MC-POSHIS-DB dbs]$ orapwd password=Systec36 file=orapwPMSDB |
| Line 173: | Line 103: |
| [root@rac-restore ]# mkdir -pv /rac-restore/EASDB/{controlfile,arch} [root@rac-restore ]# chown -Rv oracle:oinstall /rac-restore/EASDB/ [oracle@rac-restore dbs]$ mkdir -pv /u01/app/oracle/admin/EASDB/{adump,bdump,cdump,ddump,udump,pfile} mkdir: created directory `/u01/app/oracle/admin/EASDB' mkdir: created directory `/u01/app/oracle/admin/EASDB/adump' mkdir: created directory `/u01/app/oracle/admin/EASDB/bdump' mkdir: created directory `/u01/app/oracle/admin/EASDB/cdump' mkdir: created directory `/u01/app/oracle/admin/EASDB/ddump' mkdir: created directory `/u01/app/oracle/admin/EASDB/udump' mkdir: created directory `/u01/app/oracle/admin/EASDB/pfile' |
mkdir -pv /oracle/app/oracle/admin/HDPMS/adump mkdir -pv /oracle/app/oracle/oradata/HDPMS mkdir -pv /oradata/HDPMS/archlog mkdir -pv /oradata/HDPMS/datafiles/ |
| Line 189: | Line 111: |
| /usr/openv/netbackup/bin/bplist -S nbumaster -C mls-rac02 -t 4 -l -R / | tee nbu_backups20170704_mls-rac02.txt {{{ export ORACLE_SID=EASDB rman target / nocatalog RMAN> startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initEASDB.ora'; RMAN> set DBID=920906249 |
/usr/openv/netbackup/bin/bplist -S Netbackup-master -C MC-PMS-DB -t 4 -l -R / | tee nbu_backups`date +%F`_MC-PMS-DB.txt {{{ $ export ORACLE_SID=HDPMS $ rman target / catalog rman/rman@orcl RMAN> startup nomount; RMAN> set DBID=2147825860 |
| Line 200: | Line 122: |
| SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; # 07-02 2:00 #restore controlfile from '/ctrl_dEASDB_um5s8a6ll_s1733_p1_t948247221'; # 06-30 21:05 restore controlfile from '/ctrl_dEASDB_ukps84cjs_s1689_p1_t948056700'; # 06-29 22:18 # restore controlfile from '/ctrl_dEASDB_uj7s81sie_s1639_p1_t947974734'; |
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB'; restore controlfile from '/cntrl_HDPMS_set11_piece1_20180913_0btd0ica_1_1'; |
| Line 215: | Line 130: |
| * output {{{ run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; restore controlfile from '/ctrl_dEASDB_u09s8ehds_s9_p1_t948389308'; |
* Output {{{ ~$ rman target / catalog rman/rman@orcl Recovery Manager: Release 11.2.0.4.0 - Production on Thu Sep 13 15:50:24 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database (not started) connected to recovery catalog database RMAN> startup nomount; Oracle instance started Total System Global Area 5044088832 bytes Fixed Size 2261928 bytes Variable Size 1442843736 bytes Database Buffers 3590324224 bytes Redo Buffers 8658944 bytes RMAN> set DBID=2147825860 executing command: SET DBID database name is "HDPMS" and DBID is 2147825860 RMAN> run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB'; restore controlfile from '/cntrl_HDPMS_set11_piece1_20180913_0btd0ica_1_1'; |
| Line 222: | Line 163: |
6> } |
} 2> 3> 4> 5> 6> |
| Line 226: | Line 166: |
| channel ch00: SID=122 device type=SBT_TAPE channel ch00: Veritas NetBackup for Oracle - Release 7.6 (2013111313) |
channel ch00: SID=1423 device type=SBT_TAPE channel ch00: Veritas NetBackup for Oracle - Release 7.7.3 (2016051915) |
| Line 231: | Line 171: |
| Starting restore at 04-7月 -2017 16:08:44 | Starting restore at 2018-09-13 15:52:16 |
| Line 234: | Line 174: |
| channel ch00: restore complete, elapsed time: 00:00:15 output file name=/rac-restore/EASDB/controlfile/ctrl_dEASDB.ctl Finished restore at 04-7月 -2017 16:08:59 |
channel ch00: restore complete, elapsed time: 00:00:07 output file name=/oracle/app/oracle/oradata/HDPMS/control01.ctl output file name=/oracle/app/oracle/oradata/HDPMS/control02.ctl Finished restore at 2018-09-13 15:52:23 |
| Line 240: | Line 181: |
| RMAN> startup mount; database is already started database mounted |
RMAN> |
| Line 247: | Line 186: |
| === restore database by UNTIL TIME === | === restore database === |
| Line 250: | Line 189: |
| spool log to rman_restore-EASDB-preview.log | spool log to rman_restore-PMSDB-preview.log |
| Line 259: | Line 198: |
| SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac01'; | SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB'; |
| Line 261: | Line 200: |
| SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; #set UNTIL TIME "to_date('2017-07-01 17:00:00','YYYY-MM-DD HH24:MI:SS')"; SET UNTIL TIME "to_date('2017-07-01:17:00:00','YYYY-MM-DD:HH24:MI:SS')"; restore database preview; restore database validate; |
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB'; crosscheck backupset of database; restore database preview; restore database validate; |
| Line 276: | Line 213: |
| spool log to rman_restore-EASDB-v1.log | spool log to rman_restore-PMSDB-v1.log |
| Line 280: | Line 217: |
| SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; set UNTIL TIME "to_date('2017-07-01 17:00:00','YYYY-MM-DD HH24:MI:SS')"; |
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB'; ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB'; |
| Line 283: | Line 221: |
| restore archivelog all; | |
| Line 284: | Line 223: |
| RELEASE CHANNEL ch00; } spool log off }}} === recover database by UNTIL TIME === {{{ RMAN > spool log to rman_recover-EASDB-v1.log set echo on run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; set UNTIL TIME "to_date('2017-06-29 18:00:00','YYYY-MM-DD HH24:MI:SS')"; recover database; RELEASE CHANNEL ch00; } spool log off }}} {{{ run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; #set UNTIL TIME "to_date('2017-07-01 17:00:00','YYYY-MM-DD HH24:MI:SS')"; restore datafile 2; RELEASE CHANNEL ch00; } }}} ==== restore archivelog by UNTIL TIME ==== {{{ RMAN > list backup of archivelog time between "to_date('2017-06-29 17:00:00','YYYY-MM-DD HH24:MI:SS')" and "to_date('2017-07-01 17:00:00','YYYY-MM-DD HH24:MI:SS')"; }}} {{{ spool log to rman_v1.log set echo on run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac01'; ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; #set UNTIL TIME "to_date('2017-07-01 17:00:00','YYYY-MM-DD HH24:MI:SS')"; #restore validate database archivelog from sequence 33171; #RESTORE VALIDATE CHECK LOGICAL ARCHIVELOG from sequence 33171; restore archivelog from logseq 30013 until logseq 30019 thread=1; restore archivelog from logseq 33161 until logseq 33169 thread=2; |
|
| Line 342: | Line 230: |
{{{ spool log to rman_v1.log set echo on |
* Output {{{ Spooling started in log file: rman_restore-PMSDB-v1.log Recovery Manager11.2.0.4.0 RMAN> set echo on echo set on |
| Line 347: | Line 241: |
| ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; set UNTIL TIME "to_date('2017-07-01 17:00:00','YYYY-MM-DD HH24:MI:SS')"; set until sequence 30024 thread 1; recover database; #restore validate database archivelog all; #restore validate archivelog all; #restore archivelog from time "TRUNC(sysdate)" until time "sysdate"; #restore validate archivelog from scn 31231 until scn 33225; #restore validate archivelog from scn 31178 until scn 33171; RELEASE CHANNEL ch00; } spool log off }}} {{{ archived log file name=/rac-restore/EASDB/arch/arch_1_45_948384202.arc thread=1 sequence=45 |
2> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; 3> SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB'; 4> ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; 5> SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB'; 6> restore database; 7> restore archivelog all; 8> RELEASE CHANNEL ch00; 9> RELEASE CHANNEL ch01; 10> } allocated channel: ch00 channel ch00: SID=1423 device type=SBT_TAPE channel ch00: Veritas NetBackup for Oracle - Release 7.7.3 (2016051915) sent command to channel: ch00 allocated channel: ch01 channel ch01: SID=1707 device type=SBT_TAPE channel ch01: Veritas NetBackup for Oracle - Release 7.7.3 (2016051915) sent command to channel: ch00 sent command to channel: ch01 Starting restore at 2018-09-13 14:45:18 skipping datafile 1; already restored to file /oradata/HDPMS/system01.dbf skipping datafile 2; already restored to file /oradata/HDPMS/sysaux01.dbf skipping datafile 3; already restored to file /oradata/HDPMS/undotbs01.dbf skipping datafile 4; already restored to file /oradata/HDPMS/users01.dbf channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00006 to /oradata/HDPMS/datafiles/HDPMS02.dbf channel ch00: reading from backup piece HDPMS_set2_piece1_20180913_02td0i8q_1_1 channel ch01: starting datafile backup set restore channel ch01: specifying datafile(s) to restore from backup set channel ch01: restoring datafile 00005 to /oradata/HDPMS/datafiles/HDPMS01.dbf channel ch01: reading from backup piece HDPMS_set1_piece1_20180913_01td0i8q_1_1 channel ch00: piece handle=HDPMS_set2_piece1_20180913_02td0i8q_1_1 tag=TAG20180913T111849 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:25 channel ch01: piece handle=HDPMS_set1_piece1_20180913_01td0i8q_1_1 tag=TAG20180913T111849 channel ch01: restored backup piece 1 channel ch01: restore complete, elapsed time: 00:05:45 Finished restore at 2018-09-13 14:51:04 Starting restore at 2018-09-13 14:51:04 channel ch00: starting archived log restore to default destination channel ch00: restoring archived log archived log thread=1 sequence=3 channel ch00: reading from backup piece arch_HDPMS_set9_piece1_20180913_09td0ic2_1_1 channel ch01: starting archived log restore to default destination channel ch01: restoring archived log archived log thread=1 sequence=4 channel ch01: reading from backup piece arch_HDPMS_set10_piece1_20180913_0atd0ic2_1_1 channel ch00: piece handle=arch_HDPMS_set9_piece1_20180913_09td0ic2_1_1 tag=TAG20180913T112034 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:07 channel ch01: piece handle=arch_HDPMS_set10_piece1_20180913_0atd0ic2_1_1 tag=TAG20180913T112034 channel ch01: restored backup piece 1 channel ch01: restore complete, elapsed time: 00:00:07 Finished restore at 2018-09-13 14:51:12 released channel: ch00 released channel: ch01 RMAN> run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';2> 3> 4> recover database; 5> RELEASE CHANNEL ch00; 6> } allocated channel: ch00 channel ch00: SID=1994 device type=SBT_TAPE channel ch00: Veritas NetBackup for Oracle - Release 7.7.3 (2016051915) sent command to channel: ch00 Starting recover at 2018-09-13 16:29:39 starting media recovery archived log for thread 1 with sequence 3 is already on disk as file /oradata/HDPMS/archlog/1_3_984912390.dbf archived log for thread 1 with sequence 4 is already on disk as file /oradata/HDPMS/archlog/1_4_984912390.dbf archived log file name=/oradata/HDPMS/archlog/1_3_984912390.dbf thread=1 sequence=3 archived log file name=/oradata/HDPMS/archlog/1_4_984912390.dbf thread=1 sequence=4 |
| Line 367: | Line 331: |
| archived log thread=1 sequence=46 | archived log thread=1 sequence=5 |
| Line 372: | Line 336: |
| RMAN-03002: failure of recover command at 07/04/2017 16:20:36 RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 46 and starting SCN of 1025994 run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; 3> SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; 4> RESTORE ARCHIVELOG FROM SEQUENCE 46; 5> RELEASE CHANNEL ch00; 6> } allocated channel: ch00 channel ch00: SID=122 device type=SBT_TAPE channel ch00: Veritas NetBackup for Oracle - Release 7.6 (2013111313) sent command to channel: ch00 Starting restore at 04-7月 -2017 16:24:53 released channel: ch00 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 07/04/2017 16:24:53 RMAN-20242: specification does not match any archived log in the repository }}} https://www.veritas.com/support/en_US/article.000021590 {{{ RMAN> run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; #restore controlfile from '/ctrl_dEASDB_u09s8ehds_s9_p1_t948389308'; restore controlfile from '/ctrl_dEASDB_u0is8epih_s18_p1_t948397649'; RELEASE CHANNEL ch00; |
RMAN-03002: failure of recover command at 09/13/2018 16:29:40 RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 5 and starting SCN of 1817651 }}} {{{ $ export ORACLE_SID=HDPMS; sqlplus / as sysdba SQL> recover database until cancel using backup controlfile; ORA-00279: change 1817651 generated at 09/13/2018 11:20:33 needed for thread 1 ORA-00289: suggestion : /oradata/HDPMS/archlog/1_5_984912390.dbf ORA-00280: change 1817651 for thread 1 is in sequence #5 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} ==> CANCEL Media recovery cancelled. }}} * Output v2 {{{ SQL> recover database until cancel using backup controlfile; ORA-00279: change 1817378 generated at 09/13/2018 11:18:50 needed for thread 1 ORA-00289: suggestion : /oradata/HDPMS/archlog/1_3_984912390.dbf ORA-00280: change 1817378 for thread 1 is in sequence #3 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} CANCEL ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/oradata/HDPMS/system01.dbf' ORA-01112: media recovery not started |
| Line 411: | Line 377: |
| [oracle@rac-restore dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on 星期二 7月 4 16:43:54 2017 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ EASDB MOUNTED SQL> alter database open; alter database open * ERROR at line 1: ORA-01589: 要打开数据库则必须使用 RESETLOGS 或 NORESETLOGS 选项 |
|
| Line 436: | Line 379: |
SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ EASDB OPEN SQL> create spfile from pfile; }}} == NBU restore script == * recovery catalog (if used). At the rman command prompt, enter the following: {{{ crosscheck backupset of database; }}} Use restore ... validate when you want RMAN to choose the backups to test. NetBackup 7.7.1 AdministratorGuide => 131 to 138 pages https://www.veritas.com/support/en_US/article.HOWTO64200 1. Make sure you have installed Oracle with the same user as used on the original source client machine 2. Install NetBackup Client and Oracle agent 3. Patch if needed 4. Touch the file on the master server: => /usr/openv/netbackup/db/altnames/No.Restrictions 5. Browse the Oracle backups by running /usr/openv/netbackup/bin/bplist -S <master server> - C <Oracle source client name> -t 4 -l -R / => Make sure you can browse the backups 6. Restore the control file (in NOMOUNT mode) - See exact steps for this procedure in technote HOWTO63971 {{{ => SQL> STARTUP NOMOUNT pfile='/u01/xxx.ora' rman nocatalog => RMAN> connect target => RMAN> SET DBID=XXXXXX RMAN> restore controlfile from '/tmp/xxx'; }}} 7. Restore the database (in MOUNT mode) {{{ RMAN> mount database 8. Restore the database using the script in /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/database_restore.sh {{{ SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS; ALTER DATABASE RENAME FILE '/old/location' TO '/new/location'; SQL> select log_mode from v$database; SQL> select name from v$datafile; SQL> select member from v$logfile; SQL> select name from v$tempfile; SQL> select name from v$controlfile; }}} * SQL> SELECT NAME,FILE#,STATUS FROM V$DATAFILE; {{{ RUN { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE'; ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE'; SEND 'NB_ORA_SERV=<master server>, NB_ORA_CLIENT=<Oracle source client name>’; set newname for datafile 1 to '/data/lsdb/datafile/system01.dbf' set newname for datafile 2 to '/data/lsdb/datafile/sysaux01.dbf' RESTORE DATABASE; RECOVER DATABASE; sql 'alter database open resetlogs'; RELEASE CHANNEL ch00; RELEASE CHANNEL ch01; } }}} = Troubleshooting = == ORA-01152: file 1 was not restored from a sufficiently old backup == {{{ ORA-01152: file 3 was not restored from a sufficiently old backup This means your controlfile and datafile are not synchronized. your controlfile is older and datafile 3 is newer. Why you restore controlfile? if you have latest controlfile available then restore it then restore backup and then try to recover database. Make sure that all archived log file are available to recover database. }}} NetBackup 7.7.1 AdministratorGuide => 208 pages /usr/openv/netbackup/logs/user_ops UNIX: /usr/openv/netbackup/logs/dbclient/log.mmddyy The debug logs are located in /usr/openv/netbackup/logs . {{{ To set the debug level on a UNIX client Enter the following line in the bp.conf file. VERBOSE = X Where X is the debug level you want. }}} == Modifying the maxjobs for "NBU_POLICY" == * Info nbrb (pid=3037) Limit has been reached for the logical resource <Master server>.NBU_POLICY.MAXJOBS.<Policy name> you can chage that form your Policy attributes but do make sure that it will not effect the other jobs... if you increase value there may be a possiblity that other polices run out of resources for backups.. its you need to make sure that ,chaning this value will not impact the other jobs to get the resources.. {{{ Select the Policy in the GUI and adjust Limit Jobs per Policy }}} == Restore & Recover LOGS == {{{ Spooling started in log file: rman_restore-EASDB-v3.log Recovery Manager11.2.0.4.0 RMAN> echo set on RMAN> run { 2> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; 3> SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; 4> restore database; 5> recover database; 6> RELEASE CHANNEL ch00; 7> } allocated channel: ch00 channel ch00: SID=122 device type=SBT_TAPE channel ch00: Veritas NetBackup for Oracle - Release 7.6 (2013111313) sent command to channel: ch00 Starting restore at 06-7月 -2017 01:02:30 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00003 to +EAS_DATA/easdb/datafile/undotbs1.258.943035169 channel ch00: reading from backup piece bk_dEASDB_uj8s847r9_s1640_p1_t948051817 channel ch00: piece handle=bk_dEASDB_uj8s847r9_s1640_p1_t948051817 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:05:05 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00009 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.269.945306785 channel ch00: reading from backup piece bk_dEASDB_uj9s84855_s1641_p1_t948052133 channel ch00: piece handle=bk_dEASDB_uj9s84855_s1641_p1_t948052133 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:45 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00013 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.275.945307213 channel ch00: reading from backup piece bk_dEASDB_ujas848e2_s1642_p1_t948052418 channel ch00: piece handle=bk_dEASDB_ujas848e2_s1642_p1_t948052418 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:56 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00014 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.276.945307231 channel ch00: reading from backup piece bk_dEASDB_ujbs848mv_s1643_p1_t948052703 channel ch00: piece handle=bk_dEASDB_ujbs848mv_s1643_p1_t948052703 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:35 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00010 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.272.945306829 channel ch00: reading from backup piece bk_dEASDB_ujcs848vt_s1644_p1_t948052989 channel ch00: piece handle=bk_dEASDB_ujcs848vt_s1644_p1_t948052989 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:25 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00012 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.274.945307197 channel ch00: reading from backup piece bk_dEASDB_ujds8498g_s1645_p1_t948053264 channel ch00: piece handle=bk_dEASDB_ujds8498g_s1645_p1_t948053264 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:35 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00011 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.273.945307171 channel ch00: reading from backup piece bk_dEASDB_ujes849hd_s1646_p1_t948053549 channel ch00: piece handle=bk_dEASDB_ujes849hd_s1646_p1_t948053549 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:35 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00007 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.270.945306749 channel ch00: reading from backup piece bk_dEASDB_ujfs849pm_s1647_p1_t948053814 channel ch00: piece handle=bk_dEASDB_ujfs849pm_s1647_p1_t948053814 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:45 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00015 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.277.945307251 channel ch00: reading from backup piece bk_dEASDB_ujgs84a1v_s1648_p1_t948054079 channel ch00: piece handle=bk_dEASDB_ujgs84a1v_s1648_p1_t948054079 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:35 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00016 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_standard.281.945307259 channel ch00: reading from backup piece bk_dEASDB_ujhs84aa9_s1649_p1_t948054345 channel ch00: piece handle=bk_dEASDB_ujhs84aa9_s1649_p1_t948054345 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:46 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00006 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_index.268.945306733 channel ch00: reading from backup piece bk_dEASDB_ujis84aj6_s1650_p1_t948054630 channel ch00: piece handle=bk_dEASDB_ujis84aj6_s1650_p1_t948054630 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:04:25 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00017 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_index.280.945307301 channel ch00: reading from backup piece bk_dEASDB_ujjs84ar5_s1651_p1_t948054885 channel ch00: piece handle=bk_dEASDB_ujjs84ar5_s1651_p1_t948054885 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:03:45 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00005 to +EAS_DATA/easdb/datafile/undotbs2.264.943035365 channel ch00: reading from backup piece bk_dEASDB_ujks84b1s_s1652_p1_t948055100 channel ch00: piece handle=bk_dEASDB_ujks84b1s_s1652_p1_t948055100 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:01:25 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00002 to +EAS_DATA/easdb/datafile/sysaux.257.943035169 channel ch00: reading from backup piece bk_dEASDB_ujls84b4r_s1653_p1_t948055195 channel ch00: piece handle=bk_dEASDB_ujls84b4r_s1653_p1_t948055195 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:01:15 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00020 to +EAS_DATA/easdb/datafile/eas_d_eas8_standard.266.945083533 channel ch00: reading from backup piece bk_dEASDB_ujms84b6t_s1654_p1_t948055261 channel ch00: piece handle=bk_dEASDB_ujms84b6t_s1654_p1_t948055261 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:35 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00001 to +EAS_DATA/easdb/datafile/system.256.943035169 channel ch00: reading from backup piece bk_dEASDB_ujns84b8k_s1655_p1_t948055316 channel ch00: piece handle=bk_dEASDB_ujns84b8k_s1655_p1_t948055316 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:35 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00008 to +EAS_DATA/easdb/datafile/eas_d_mls2015db_temp2.279.945306769 channel ch00: reading from backup piece bk_dEASDB_ujos84ba1_s1656_p1_t948055361 channel ch00: piece handle=bk_dEASDB_ujos84ba1_s1656_p1_t948055361 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:35 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00019 to +EAS_DATA/easdb/datafile/eas_d_eas8_index.261.945083521 channel ch00: reading from backup piece bk_dEASDB_ujps84bbe_s1657_p1_t948055406 channel ch00: piece handle=bk_dEASDB_ujps84bbe_s1657_p1_t948055406 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:15 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00021 to +EAS_DATA/easdb/datafile/eas_d_eas8_temp2.265.945083541 channel ch00: reading from backup piece bk_dEASDB_ujqs84bch_s1658_p1_t948055441 channel ch00: piece handle=bk_dEASDB_ujqs84bch_s1658_p1_t948055441 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:15 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00018 to +EAS_DATA/easdb/datafile/mls_d_mlsmid_standard.278.945360691 channel ch00: reading from backup piece bk_dEASDB_ujss84ber_s1660_p1_t948055515 channel ch00: piece handle=bk_dEASDB_ujss84ber_s1660_p1_t948055515 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:07 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00022 to +EAS_DATA/easdb/datafile/mls_d_dsp1_standard.283.945362643 channel ch00: reading from backup piece bk_dEASDB_ujts84bfk_s1661_p1_t948055540 channel ch00: piece handle=bk_dEASDB_ujts84bfk_s1661_p1_t948055540 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:07 channel ch00: starting datafile backup set restore channel ch00: specifying datafile(s) to restore from backup set channel ch00: restoring datafile 00004 to +EAS_DATA/easdb/datafile/users.259.943035169 channel ch00: reading from backup piece bk_dEASDB_ujus84bh1_s1662_p1_t948055585 channel ch00: piece handle=bk_dEASDB_ujus84bh1_s1662_p1_t948055585 tag=TAG20170630T194337 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:07 Finished restore at 06-7月 -2017 02:03:03 Starting recover at 06-7月 -2017 02:03:03 starting media recovery Oracle Error: ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/rac-restore/EASDB/datafile/o1_mf_system_dotbc725_.dbf' released channel: ch00 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 07/06/2017 02:03:06 RMAN-06053: unable to perform media recovery because of missing log RMAN-06025: no backup of archived log for thread 2 with sequence 33171 and starting SCN of 16689609185 found to restore RMAN-06025: no backup of archived log for thread 2 with sequence 33170 and starting SCN of 16689566652 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 30022 and starting SCN of 16689655939 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 30021 and starting SCN of 16689654014 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 30020 and starting SCN of 16689566649 found to restore RMAN> spool log off }}} |
}}} * Output |
| Line 757: | Line 386: |
| ORA-01152: 文件 1 没有从过旧的备份中还原 ORA-01110: 数据文件 1: '/rac-restore/EASDB/datafile/o1_mf_system_dotbc725_.dbf' SQL> !oerr ora 01152 01152, 00000, "file %s was not restored from a sufficiently old backup " // *Cause: An incomplete recovery session was started, but an insufficient // number of logs were applied to make the database consistent. This // file is still in the future of the last log applied. The most // likely cause of this error is forgetting to restore the file // from a backup before doing incomplete recovery. // *Action: Either apply more logs until the database is consistent or // restore the database file from an older backup and repeat recovery. }}} {{{ RMAN> list archivelog all; list archivelog all; List of Archived Log Copies for database with db_unique_name EASDB ===================================================================== Key Thrd Seq S Low Time ------- ---- ------- - --------------------- 58482 1 30020 A 30-6月 -2017 20:47:25 Name: +EAS_ARCH/easdb/archivelog/2017_06_30/thread_1_seq_30020.1934.948056333 58483 1 30021 A 30-6月 -2017 20:58:53 Name: +EAS_ARCH/easdb/archivelog/2017_06_30/thread_1_seq_30021.953.948056337 58485 1 30022 A 30-6月 -2017 20:58:57 Name: +EAS_ARCH/easdb/archivelog/2017_06_30/thread_1_seq_30022.515.948056509 58481 2 33170 A 30-6月 -2017 20:47:25 Name: +EAS_ARCH/easdb/archivelog/2017_06_30/thread_2_seq_33170.1261.948056047 58484 2 33171 A 30-6月 -2017 20:54:06 Name: +EAS_ARCH/easdb/archivelog/2017_06_30/thread_2_seq_33171.1911.948056413 RMAN> list backup of archivelog sequence 30020 thread 1; list backup of archivelog sequence 30020 thread 1; specification does not match any backup in the repository }}} {{{ run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; restore archivelog from logseq 33161 until logseq 33169 thread 2; RELEASE CHANNEL ch00; } }}} {{{ run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; restore archivelog from logseq 30013 until logseq 30019 thread 1; RELEASE CHANNEL ch00; } }}} {{{ SQL> recover database until cancel using backup controlfile; ORA-00279: 更改 16688849813 (在 06/30/2017 19:43:38 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33153_943035275.arc ORA-00280: 更改 16688849813 (用于线程 2) 在序列 #33153 中 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} auto ORA-00308: cannot open archived log '/rac-restore/EASDB/arch/arch_2_33153_943035275.arc' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00308: cannot open archived log '/rac-restore/EASDB/arch/arch_2_33153_943035275.arc' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below |
|
| Line 845: | Line 387: |
| ORA-01110: data file 1: '/rac-restore/EASDB/datafile/o1_mf_system_dovdgn9l_.dbf' SQL> select * from v$log where SEQUENCE#='33153'; no rows selected }}} {{{ run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; ALLOCATE CHANNEL ch02 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; ALLOCATE CHANNEL ch03 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbumaster, NB_ORA_CLIENT=mls-rac02'; restore archivelog logseq 33153 thread 2; restore archivelog logseq 30005 thread 1; restore archivelog logseq 30006 thread 1; restore archivelog from logseq 30001 until logseq 30019 thread=1; restore archivelog from logseq 33000 until logseq 33169 thread=2; RELEASE CHANNEL ch00; RELEASE CHANNEL ch01; RELEASE CHANNEL ch02; RELEASE CHANNEL ch03; } allocated channel: ch00 channel ch00: SID=122 device type=SBT_TAPE channel ch00: Veritas NetBackup for Oracle - Release 7.6 (2013111313) sent command to channel: ch00 Starting restore at 06-7月 -2017 12:01:52 channel ch00: starting archived log restore to default destination channel ch00: restoring archived log archived log thread=2 sequence=33153 channel ch00: reading from backup piece arch_dEASDB_ukns84chd_s1687_p1_t948056621 channel ch00: piece handle=arch_dEASDB_ukns84chd_s1687_p1_t948056621 tag=TAG20170630T204727 channel ch00: restored backup piece 1 channel ch00: restore complete, elapsed time: 00:00:35 Finished restore at 06-7月 -2017 12:02:29 released channel: ch00 }}} Then Database open normal!!! {{{ SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01152: 文件 1 没有从过旧的备份中还原 ORA-01110: 数据文件 1: '/rac-restore/EASDB/datafile/o1_mf_system_dovdgn9l_.dbf' SQL> recover database until cancel using backup controlfile; ORA-00279: 更改 16688961842 (在 06/30/2017 19:54:10 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30008_943035275.arc ORA-00280: 更改 16688961842 (用于线程 1) 在序列 #30008 中 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} auto ORA-00279: 更改 16688961842 (在 06/30/2017 19:50:11 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33155_943035275.arc ORA-00280: 更改 16688961842 (用于线程 2) 在序列 #33155 中 ORA-00279: 更改 16688969496 (在 06/30/2017 19:55:09 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33156_943035275.arc ORA-00280: 更改 16688969496 (用于线程 2) 在序列 #33156 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33155_943035275.arc' ORA-00279: 更改 16689017975 (在 06/30/2017 19:58:18 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30009_943035275.arc ORA-00280: 更改 16689017975 (用于线程 1) 在序列 #30009 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30008_943035275.arc' ORA-00279: 更改 16689019180 (在 06/30/2017 19:58:24 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33157_943035275.arc ORA-00280: 更改 16689019180 (用于线程 2) 在序列 #33157 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33156_943035275.arc' ORA-00279: 更改 16689036239 (在 06/30/2017 20:00:05 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33158_943035275.arc ORA-00280: 更改 16689036239 (用于线程 2) 在序列 #33158 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33157_943035275.arc' ORA-00279: 更改 16689038966 (在 06/30/2017 20:00:12 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30010_943035275.arc ORA-00280: 更改 16689038966 (用于线程 1) 在序列 #30010 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30009_943035275.arc' ORA-00279: 更改 16689058869 (在 06/30/2017 20:01:50 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33159_943035275.arc ORA-00280: 更改 16689058869 (用于线程 2) 在序列 #33159 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33158_943035275.arc' ORA-00279: 更改 16689072470 (在 06/30/2017 20:02:23 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30011_943035275.arc ORA-00280: 更改 16689072470 (用于线程 1) 在序列 #30011 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30010_943035275.arc' ORA-00279: 更改 16689124031 (在 06/30/2017 20:05:42 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30012_943035275.arc ORA-00280: 更改 16689124031 (用于线程 1) 在序列 #30012 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30011_943035275.arc' ORA-00279: 更改 16689125267 (在 06/30/2017 20:05:45 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33160_943035275.arc ORA-00280: 更改 16689125267 (用于线程 2) 在序列 #33160 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33159_943035275.arc' ORA-00279: 更改 16689171808 (在 06/30/2017 20:09:13 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33161_943035275.arc ORA-00280: 更改 16689171808 (用于线程 2) 在序列 #33161 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33160_943035275.arc' ORA-00279: 更改 16689186881 (在 06/30/2017 20:12:01 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30013_943035275.arc ORA-00280: 更改 16689186881 (用于线程 1) 在序列 #30013 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30012_943035275.arc' ORA-00279: 更改 16689190432 (在 06/30/2017 20:12:43 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33162_943035275.arc ORA-00280: 更改 16689190432 (用于线程 2) 在序列 #33162 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33161_943035275.arc' ORA-00279: 更改 16689277590 (在 06/30/2017 20:19:26 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30014_943035275.arc ORA-00280: 更改 16689277590 (用于线程 1) 在序列 #30014 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30013_943035275.arc' ORA-00279: 更改 16689279641 (在 06/30/2017 20:19:56 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33163_943035275.arc ORA-00280: 更改 16689279641 (用于线程 2) 在序列 #33163 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33162_943035275.arc' ORA-00279: 更改 16689365643 (在 06/30/2017 20:26:31 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33164_943035275.arc ORA-00280: 更改 16689365643 (用于线程 2) 在序列 #33164 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33163_943035275.arc' ORA-00279: 更改 16689376783 (在 06/30/2017 20:29:08 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30015_943035275.arc ORA-00280: 更改 16689376783 (用于线程 1) 在序列 #30015 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30014_943035275.arc' ORA-00279: 更改 16689415457 (在 06/30/2017 20:31:03 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30016_943035275.arc ORA-00280: 更改 16689415457 (用于线程 1) 在序列 #30016 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30015_943035275.arc' ORA-00279: 更改 16689416211 (在 06/30/2017 20:31:11 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33165_943035275.arc ORA-00280: 更改 16689416211 (用于线程 2) 在序列 #33165 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33164_943035275.arc' ORA-00279: 更改 16689464374 (在 06/30/2017 20:36:32 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30017_943035275.arc ORA-00280: 更改 16689464374 (用于线程 1) 在序列 #30017 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30016_943035275.arc' BP Key: 1682 Status: AVAILABLE Compressed: NO Tag: TAG20170630T204727 Handle: arch_dEASDB_ukns84chd_s1687_p1_t948056621 Media: @aaaag List of Archived Logs in backup set 1682 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------------------- ---------- --------- 1 30005 16688830396 30-6月 -2017 19:41:43 16688854322 30-6月 -2017 19:44:54 2 33153 16688834231 30-6月 -2017 19:41:52 16688859961 30-6月 -2017 19:45:12 1 30006 16688854322 30-6月 -2017 19:44:54 16688915262 30-6月 -2017 19:49:26 2 33154 16688859961 30-6月 -2017 19:45:12 16688917421 30-6月 -2017 19:50:11 1 30007 16688915262 30-6月 -2017 19:49:26 16688961842 30-6月 -2017 19:54:10 archived log thread=2 sequence=33109 channel ch00: restoring archived log archived log thread=2 sequence=33110 ORA-00279: 更改 16689468168 (在 06/30/2017 20:37:14 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33166_943035275.arc ORA-00280: 更改 16689468168 (用于线程 2) 在序列 #33166 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33165_943035275.arc' ORA-00279: 更改 16689469255 (在 06/30/2017 20:37:15 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33167_943035275.arc ORA-00280: 更改 16689469255 (用于线程 2) 在序列 #33167 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33166_943035275.arc' ORA-00279: 更改 16689513199 (在 06/30/2017 20:42:30 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30018_943035275.arc ORA-00280: 更改 16689513199 (用于线程 1) 在序列 #30018 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30017_943035275.arc' ORA-00279: 更改 16689519577 (在 06/30/2017 20:43:24 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33168_943035275.arc ORA-00280: 更改 16689519577 (用于线程 2) 在序列 #33168 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33167_943035275.arc' ORA-00279: 更改 16689566404 (在 06/30/2017 20:47:17 生成) 对于线程 2 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_2_33169_943035275.arc ORA-00280: 更改 16689566404 (用于线程 2) 在序列 #33169 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_2_33168_943035275.arc' ORA-00279: 更改 16689566586 (在 06/30/2017 20:47:19 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30019_943035275.arc ORA-00280: 更改 16689566586 (用于线程 1) 在序列 #30019 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30018_943035275.arc' ORA-00279: 更改 16689566649 (在 06/30/2017 20:47:25 生成) 对于线程 1 是必需的 ORA-00289: 建议: /rac-restore/EASDB/arch/arch_1_30020_943035275.arc ORA-00280: 更改 16689566649 (用于线程 1) 在序列 #30020 中 ORA-00278: 此恢复不再需要日志文件 '/rac-restore/EASDB/arch/arch_1_30019_943035275.arc' ORA-00308: cannot open archived log '/rac-restore/EASDB/arch/arch_1_30020_943035275.arc' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 SQL> alter database open resetlogs; Database altered. SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ EASDB OPEN SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ EASDB OPEN }}} |
ORA-01110: data file 1: '/oradata/HDPMS/system01.dbf' }}} = Troubleshooting = |
Restore RAC database to different client
Envirenment
- Master Server: Netbackup-master (NBU 7.7.3)
- Source node: MC-PMS-DB(OEL6.7, Oracle database 11.2.0.4)
- Destination Client: MC-POSHIS-DB (OEL6.7, Oracle database 11.2.0.4)
- DBID=2147825860
requirements
- Successful Netbackup backup of set.
- Same version of database.
- Record Source DBID/DATAFILE/TABLESPACE.
- Install database software only on Destination client.
- Install Netbackup client software on Destination client.
Touch the file on the master server: => /usr/openv/netbackup/db/altnames/No.Restrictions
SQL> select name from v$datafile; Press Return to Continue SQL> select name from v$tempfile; SQL> select name from v$controlfile;
Master Server hosts file
Netbackup-master:/home/maintenance # tail -5 /etc/hosts
192.168.74.151 MC-PMS-DB 192.168.80.155 Netbackup-master 192.168.80.152 oem 192.168.80.162 MC-POSHIS-DB
Client/Media Server
Master&Media
Netbackup-master: ~# cat /usr/openv/netbackup/bp.conf
- Source Client (MC-PMS-DB)
[oracle@MC-PMS-DB ~]$ cat /usr/openv/netbackup/bp.conf SERVER = Netbackup-master CLIENT_NAME = MC-PMS-DB CONNECT_OPTIONS = localhost 1 0 2
- Destination Client (MC-POSHIS-DB)
[root@MC-POSHIS-DB ~]# cat /usr/openv/netbackup/bp.conf SERVER = Netbackup-master CLIENT_NAME = MC-POSHIS-DB CONNECT_OPTIONS = localhost 1 0 2
Excute restore
Create initPMSDB.ora & orapwd file
copy pfile from Source client MC-PMS-DB OR create new one.
HDPMS.__db_cache_size=4160749568 HDPMS.__java_pool_size=16777216 HDPMS.__large_pool_size=33554432 HDPMS.__oracle_base='/oracle/app/oracle'#ORACLE_BASE set from environment HDPMS.__pga_aggregate_target=894498816 HDPMS.__sga_target=3066719232 HDPMS.__shared_io_pool_size=0 HDPMS.__shared_pool_size=805306368 HDPMS.__streams_pool_size=16777216 *.audit_file_dest='/oracle/app/oracle/admin/HDPMS/adump' *.audit_trail='db' *.compatible='11.2.0.4.0' *.control_files='/oracle/app/oracle/oradata/HDPMS/control01.ctl','/oracle/app/oracle/oradata/HDPMS/control02.ctl' *.db_block_size=8192 *.db_domain='' *.db_name='HDPMS' *.diagnostic_dest='/oracle/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=HDPMSXDB)' *.log_archive_dest_1='LOCATION=/oradata/HDPMS/archlog' *.open_cursors=300 *.pga_aggregate_target=1684013056 *.processes=1500 *.remote_login_passwordfile='EXCLUSIVE' *.sessions=1655 *.sga_target=5052039168 *.undo_retention=7200 *.undo_tablespace='UNDOTBS1'
- option
[oracle@MC-POSHIS-DB dbs]$ orapwd password=Systec36 file=orapwPMSDB
create directories
mkdir -pv /oracle/app/oracle/admin/HDPMS/adump mkdir -pv /oracle/app/oracle/oradata/HDPMS mkdir -pv /oradata/HDPMS/archlog mkdir -pv /oradata/HDPMS/datafiles/
restore controlfile
- find out correct controlfile in Netbackup
/usr/openv/netbackup/bin/bplist -S Netbackup-master -C MC-PMS-DB -t 4 -l -R / | tee nbu_backupsdate +%F_MC-PMS-DB.txt
$ export ORACLE_SID=HDPMS
$ rman target / catalog rman/rman@orcl
RMAN> startup nomount;
RMAN> set DBID=2147825860
run {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';
restore controlfile from '/cntrl_HDPMS_set11_piece1_20180913_0btd0ica_1_1';
RELEASE CHANNEL ch00;
}
RMAN> startup mount- Output
~$ rman target / catalog rman/rman@orcl
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Sep 13 15:50:24 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
connected to recovery catalog database
RMAN> startup nomount;
Oracle instance started
Total System Global Area 5044088832 bytes
Fixed Size 2261928 bytes
Variable Size 1442843736 bytes
Database Buffers 3590324224 bytes
Redo Buffers 8658944 bytes
RMAN> set DBID=2147825860
executing command: SET DBID
database name is "HDPMS" and DBID is 2147825860
RMAN> run {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';
restore controlfile from '/cntrl_HDPMS_set11_piece1_20180913_0btd0ica_1_1';
RELEASE CHANNEL ch00;
}
2> 3> 4> 5> 6>
allocated channel: ch00
channel ch00: SID=1423 device type=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.7.3 (2016051915)
sent command to channel: ch00
Starting restore at 2018-09-13 15:52:16
channel ch00: restoring control file
channel ch00: restore complete, elapsed time: 00:00:07
output file name=/oracle/app/oracle/oradata/HDPMS/control01.ctl
output file name=/oracle/app/oracle/oradata/HDPMS/control02.ctl
Finished restore at 2018-09-13 15:52:23
released channel: ch00
RMAN>
restore database
- Following is the very important script that one can use to check the recoverability of the DB.
spool log to rman_restore-PMSDB-preview.log
set echo on
show all;
report schema;
list backup summary;
list backup;
list copy;
run {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';
crosscheck backupset of database;
restore database preview;
restore database validate;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}
spool log offRMAN>
spool log to rman_restore-PMSDB-v1.log
set echo on
run {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';
restore database;
restore archivelog all;
recover database;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}
spool log off- Output
Spooling started in log file: rman_restore-PMSDB-v1.log
Recovery Manager11.2.0.4.0
RMAN> set echo on
echo set on
RMAN> run {
2> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
3> SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';
4> ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
5> SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';
6> restore database;
7> restore archivelog all;
8> RELEASE CHANNEL ch00;
9> RELEASE CHANNEL ch01;
10> }
allocated channel: ch00
channel ch00: SID=1423 device type=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.7.3 (2016051915)
sent command to channel: ch00
allocated channel: ch01
channel ch01: SID=1707 device type=SBT_TAPE
channel ch01: Veritas NetBackup for Oracle - Release 7.7.3 (2016051915)
sent command to channel: ch00
sent command to channel: ch01
Starting restore at 2018-09-13 14:45:18
skipping datafile 1; already restored to file /oradata/HDPMS/system01.dbf
skipping datafile 2; already restored to file /oradata/HDPMS/sysaux01.dbf
skipping datafile 3; already restored to file /oradata/HDPMS/undotbs01.dbf
skipping datafile 4; already restored to file /oradata/HDPMS/users01.dbf
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00006 to /oradata/HDPMS/datafiles/HDPMS02.dbf
channel ch00: reading from backup piece HDPMS_set2_piece1_20180913_02td0i8q_1_1
channel ch01: starting datafile backup set restore
channel ch01: specifying datafile(s) to restore from backup set
channel ch01: restoring datafile 00005 to /oradata/HDPMS/datafiles/HDPMS01.dbf
channel ch01: reading from backup piece HDPMS_set1_piece1_20180913_01td0i8q_1_1
channel ch00: piece handle=HDPMS_set2_piece1_20180913_02td0i8q_1_1 tag=TAG20180913T111849
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:04:25
channel ch01: piece handle=HDPMS_set1_piece1_20180913_01td0i8q_1_1 tag=TAG20180913T111849
channel ch01: restored backup piece 1
channel ch01: restore complete, elapsed time: 00:05:45
Finished restore at 2018-09-13 14:51:04
Starting restore at 2018-09-13 14:51:04
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=1 sequence=3
channel ch00: reading from backup piece arch_HDPMS_set9_piece1_20180913_09td0ic2_1_1
channel ch01: starting archived log restore to default destination
channel ch01: restoring archived log
archived log thread=1 sequence=4
channel ch01: reading from backup piece arch_HDPMS_set10_piece1_20180913_0atd0ic2_1_1
channel ch00: piece handle=arch_HDPMS_set9_piece1_20180913_09td0ic2_1_1 tag=TAG20180913T112034
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch01: piece handle=arch_HDPMS_set10_piece1_20180913_0atd0ic2_1_1 tag=TAG20180913T112034
channel ch01: restored backup piece 1
channel ch01: restore complete, elapsed time: 00:00:07
Finished restore at 2018-09-13 14:51:12
released channel: ch00
released channel: ch01
RMAN> run {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
SEND 'NB_ORA_SERV=Netbackup-master, NB_ORA_CLIENT=MC-PMS-DB';2> 3>
4> recover database;
5> RELEASE CHANNEL ch00;
6> }
allocated channel: ch00
channel ch00: SID=1994 device type=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.7.3 (2016051915)
sent command to channel: ch00
Starting recover at 2018-09-13 16:29:39
starting media recovery
archived log for thread 1 with sequence 3 is already on disk as file /oradata/HDPMS/archlog/1_3_984912390.dbf
archived log for thread 1 with sequence 4 is already on disk as file /oradata/HDPMS/archlog/1_4_984912390.dbf
archived log file name=/oradata/HDPMS/archlog/1_3_984912390.dbf thread=1 sequence=3
archived log file name=/oradata/HDPMS/archlog/1_4_984912390.dbf thread=1 sequence=4
unable to find archived log
archived log thread=1 sequence=5
released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/13/2018 16:29:40
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 5 and starting SCN of 1817651$ export ORACLE_SID=HDPMS; sqlplus / as sysdba
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 1817651 generated at 09/13/2018 11:20:33 needed for thread 1
ORA-00289: suggestion : /oradata/HDPMS/archlog/1_5_984912390.dbf
ORA-00280: change 1817651 for thread 1 is in sequence #5
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
==> CANCEL
Media recovery cancelled.* Output v2
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 1817378 generated at 09/13/2018 11:18:50 needed for thread 1
ORA-00289: suggestion : /oradata/HDPMS/archlog/1_3_984912390.dbf
ORA-00280: change 1817378 for thread 1 is in sequence #3
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oradata/HDPMS/system01.dbf'
ORA-01112: media recovery not started
Open database
SQL> alter database open resetlogs; Database altered.
- Output
SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/oradata/HDPMS/system01.dbf'
