#acl merlyn:read,write All:read @@ Message: Other users will be warned until 2019-07-10 02:26:00 that @ you are editing this page. @@ Comment: None @@ Trivial: (x) Yes ( ) No Describe désert/Netbackup/Restore here. <> = Restore RAC database to different client = == Envirenment == * Master Server: nbu-5240 (NBU Appliance 5240, 8.1.1) * RAC node: zsoda0 (OEL6.8, Oracle database 11.2.0.4) * Destination Client: odacim (OEL6.8, Oracle database 11.2.0.4) * DBID=2964996167 == requirements == I. Successful Netbackup backup of set. I. Same version of database. I. Record Source DBID/DATAFILE/TABLESPACE. I. Install database software only on Destination client. I. Install Netbackup client software on Destination client. === Master Server hosts file === nbu-5240:/home/maintenance # tail -5 /etc/hosts {{{ 192.168.18.168 odacim 192.168.17.187 nbu-5240 }}} === Client/Media Server === * Master&Media {{{ nbu-5240:/home/maintenance # cat /usr/openv/netbackup/bp.conf SERVER = nbu-5240 SERVER = nbu-5230 CLIENT_NAME = nbu-5240 USE_VXSS = PROHIBITED EMMSERVER = nbu-5240 VXDBMS_NB_DATA = /usr/openv/db/data ENABLE_ROBUST_LOGGING = NO VERBOSE = 1 NETBACKUP_APPLIANCE_MODE = MANUAL_MASTER_APPLIANCE IP_ADDRESS_FAMILY = AF_UNSPEC BPCD_WHITELIST_PATH = /config/MIGRATION CLIENT_CONNECT_TIMEOUT = 3600 CLIENT_READ_TIMEOUT = 3600 VM_PROXY_SERVER = nbu-5240 VM_PROXY_SERVER = nbu-5230 MAX_LOGFILE_SIZE = 50 MAX_NUM_LOGFILES = 50 WEBSVC_GROUP = nbwebgrp WEBSVC_USER = nbwebsvc VXSS_SERVICE_TYPE = INTEGRITYANDCONFIDENTIALITY TELEMETRY_UPLOAD = YES OPS_CENTER_SERVER_NAME=opscenter }}} * Source Client (zsoda0) {{{ [oracle@zsoda0 ~]$ cat /usr/openv/netbackup/bp.conf SERVER = nbu-5240 CLIENT_NAME = zsoda0 CONNECT_OPTIONS = localhost 1 0 2 }}} * Destination Client (odacim) {{{ [root@odacim ~]# cat /usr/openv/netbackup/bp.conf SERVER = nbu-5240 CLIENT_NAME = odacim CONNECT_OPTIONS = localhost 1 0 2 }}} == Excute restore == === Create initMESDB.ora & orapwd file === copy pfile from Source client zsoda0 OR create new one. {{{ MESDB.__db_cache_size=30601641984 MESDB.__java_pool_size=201326592 MESDB.__large_pool_size=67108864 MESDB.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment MESDB.__pga_aggregate_target=8589934592 MESDB.__sga_target=34359738368 MESDB.__shared_io_pool_size=0 MESDB.__shared_pool_size=3154116608 MESDB.__streams_pool_size=0 *.audit_file_dest='/u01/app/oracle/admin/MESDB/adump' *.audit_sys_operations=TRUE *.audit_trail='FALSE' *.cluster_database=FALSE *.compatible='11.2.0.4' *.control_files='/oradata/MESDB/controlfile/control01.ctl'#Restore Controlfile *.db_create_file_dest='/oradata' *.db_create_online_log_dest_1='/oradata/MESDB/onlinelog/' *.db_files=1024 *.db_name='MESDB' *.diagnostic_dest='/u01/app/oracle' *.log_archive_dest_1='LOCATION=/oradata/MESDB/archivelog' *.log_archive_format='arch_%t_%s_%r.arc' #*.nls_language='SIMPLIFIED CHINESE' #*.nls_territory='AMERICA' *.open_cursors=20000 *.pga_aggregate_target=8G *.processes=3000 *.sga_target=32G *.undo_retention=900 *.undo_tablespace='UNDOTBS1' }}} {{{ [oracle@odacim dbs]$ orapwd password=Systec36 file=orapwMESDB [oracle@odacim dbs]$ ls hc_MESDB.dat initMESDB.ora initMESDB.ora.old init.ora orapwMESDB }}} === create directories === {{{ [oracle@odacim ]# mkdir -pv /oradata/MESDB/{datafile,onlinelog,controlfile,archivelog} [oracle@odacim dbs]$ mkdir -pv /u01/app/oracle/admin/MESDB/{adump,bdump,cdump,ddump,udump,pfile} mkdir: created directory `/u01/app/oracle/admin/MESDB' mkdir: created directory `/u01/app/oracle/admin/MESDB/adump' mkdir: created directory `/u01/app/oracle/admin/MESDB/bdump' mkdir: created directory `/u01/app/oracle/admin/MESDB/cdump' mkdir: created directory `/u01/app/oracle/admin/MESDB/ddump' mkdir: created directory `/u01/app/oracle/admin/MESDB/udump' mkdir: created directory `/u01/app/oracle/admin/MESDB/pfile' }}} === restore controlfile === * find out correct controlfile in Netbackup /usr/openv/netbackup/bin/bplist -S nbu-5240 -C zsoda0 -t 4 -l -R / | tee nbu_backups20180709_zsoda0.txt {{{ export ORACLE_SID=MESDB rman target / nocatalog RMAN> startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initMESDB.ora'; RMAN> set DBID=920906249 run { ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbu-5240, NB_ORA_CLIENT=zsoda0'; RELEASE CHANNEL ch00; } RMAN> startup mount }}} * output {{{ }}} === restore database by UNTIL TIME === {{{ SQL> select max(sequence#) from v$backup_redolog; MAX(SEQUENCE#) -------------- 57413 }}} Following is the very important script that one can use to check the recoverability of the DB. {{{ spool log to rman_restore-MESDB-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=nbu-5240, NB_ORA_CLIENT=zsoda0'; ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbu-5240, NB_ORA_CLIENT=zsoda0'; #set UNTIL TIME "to_date('2017-07-01 17:00:00','YYYY-MM-DD HH24:MI:SS')"; restore database preview; restore database validate; RELEASE CHANNEL ch00; RELEASE CHANNEL ch01; } spool log off }}} {{{ RMAN> spool log to rman_restore-MESDB-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=nbu-5240, NB_ORA_CLIENT=zsoda0'; #set UNTIL TIME "to_date('2017-07-01 17:00:00','YYYY-MM-DD HH24:MI:SS')"; #restore database from TAG20190709T203003; restore database; switch datafile all; recover database; RELEASE CHANNEL ch00; } spool log off }}} * output {{{ 正在开始介质的恢复 Oracle 错误: 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/MESDB/datafile/system.256.948384113' 释放的通道: ch00 释放的通道: ch01 释放的通道: ch02 释放的通道: ch03 释放的通道: ch04 释放的通道: ch05 释放的通道: ch06 释放的通道: ch07 释放的通道: ch08 释放的通道: ch09 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: recover 命令 (在 07/10/2019 10:36:47 上) 失败 RMAN-06053: 无法执行介质恢复, 因为缺少日志 RMAN-06025: 没有找到线程 2 序列 56630 的归档日志的备份以及起始 SCN 152588545429 来还原 RMAN-06025: 没有找到线程 2 序列 56629 的归档日志的备份以及起始 SCN 152588076495 来还原 ... ... ... RMAN-06025: 没有找到线程 2 序列 56488 的归档日志的备份以及起始 SCN 152469808313 来还原 RMAN-06025: 没有找到线程 2 序列 56487 的归档日志的备份以及起始 SCN 152469386490 来还原 RMAN-06025: 没有找到线程 2 序列 56486 的归档日志的备份以及起始 SCN 152468803695 来还原 }}} === Open database === {{{ $ export ORACLE_SID=MESDB; sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on 星期三 7月 10 11:07:32 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. 连接到: 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> recover database until cancel using backup controlfile; ORA-00279: 更改 79762767313 (在 07/31/2018 09:44:22 生成) 对于线程 1 是必需的 ORA-00289: 建议: /oradata/MESDB/archivelog/arch_1_20852_970321129.arc ORA-00280: 更改 79762767313 (用于线程 1) 在序列 #20852 中 指定日志: {=suggested | filename | AUTO | CANCEL} auto ORA-00308: cannot open archived log '/oradata/MESDB/archivelog/arch_1_20852_970321129.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 '/oradata/MESDB/archivelog/arch_1_20852_970321129.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 ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/oradata/MESDB/datafile/system.256.948384113' SQL> select * from v$log where SEQUENCE#='20852'; 未选定行 SQL> alter database open resetlogs; Database altered. SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ MESDB 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 - C -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=, NB_ORA_CLIENT=’; 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 .NBU_POLICY.MAXJOBS. 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-MESDB-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=nbu-5240, NB_ORA_CLIENT=zsoda0'; 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_dMESDB_uj8s847r9_s1640_p1_t948051817 channel ch00: piece handle=bk_dMESDB_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_dMESDB_uj9s84855_s1641_p1_t948052133 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujas848e2_s1642_p1_t948052418 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujbs848mv_s1643_p1_t948052703 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujcs848vt_s1644_p1_t948052989 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujds8498g_s1645_p1_t948053264 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujes849hd_s1646_p1_t948053549 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujfs849pm_s1647_p1_t948053814 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujgs84a1v_s1648_p1_t948054079 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujhs84aa9_s1649_p1_t948054345 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujis84aj6_s1650_p1_t948054630 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujjs84ar5_s1651_p1_t948054885 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujks84b1s_s1652_p1_t948055100 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujls84b4r_s1653_p1_t948055195 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujms84b6t_s1654_p1_t948055261 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujns84b8k_s1655_p1_t948055316 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujos84ba1_s1656_p1_t948055361 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujps84bbe_s1657_p1_t948055406 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujqs84bch_s1658_p1_t948055441 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujss84ber_s1660_p1_t948055515 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujts84bfk_s1661_p1_t948055540 channel ch00: piece handle=bk_dMESDB_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_dMESDB_ujus84bh1_s1662_p1_t948055585 channel ch00: piece handle=bk_dMESDB_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: '/odacim/MESDB/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 }}} {{{ SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01152: 文件 1 没有从过旧的备份中还原 ORA-01110: 数据文件 1: '/odacim/MESDB/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 MESDB ===================================================================== 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=nbu-5240, NB_ORA_CLIENT=zsoda0'; 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=nbu-5240, NB_ORA_CLIENT=zsoda0'; 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: 建议: /odacim/MESDB/arch/arch_2_33153_943035275.arc ORA-00280: 更改 16688849813 (用于线程 2) 在序列 #33153 中 Specify log: {=suggested | filename | AUTO | CANCEL} auto ORA-00308: cannot open archived log '/odacim/MESDB/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 '/odacim/MESDB/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 ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/odacim/MESDB/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=nbu-5240, NB_ORA_CLIENT=zsoda0'; ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbu-5240, NB_ORA_CLIENT=zsoda0'; ALLOCATE CHANNEL ch02 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbu-5240, NB_ORA_CLIENT=zsoda0'; ALLOCATE CHANNEL ch03 TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64'; SEND 'NB_ORA_SERV=nbu-5240, NB_ORA_CLIENT=zsoda0'; 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_dMESDB_ukns84chd_s1687_p1_t948056621 channel ch00: piece handle=arch_dMESDB_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 }}} {{{ Specify log: {=suggested | filename | AUTO | CANCEL} +EAS_ARCH/easdb/archivelog/2019_03_08/thread_2_seq_75145.257.1002374107 ORA-00279: ��� 144459150216 (�� 02/25/2019 11:31:47 ���) �����߳� 2 �DZ���� ORA-00289: ����: +EAS_ARCH ORA-00280: ��� 144459150216 (�����߳� 2) ������ #75146 �� ORA-00278: �˻ָ�������Ҫ��־�ļ� '+EAS_ARCH/easdb/archivelog/2019_03_08/thread_2_seq_75145.257.1002374107' Specify log: {=suggested | filename | AUTO | CANCEL} CANCEL Media recovery cancelled. }}} Then Database open normal!!! {{{ SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01152: 文件 1 没有从过旧的备份中还原 ORA-01110: 数据文件 1: '/odacim/MESDB/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: 建议: /odacim/MESDB/arch/arch_1_30008_943035275.arc ORA-00280: 更改 16688961842 (用于线程 1) 在序列 #30008 中 Specify log: {=suggested | filename | AUTO | CANCEL} auto ORA-00279: 更改 16688961842 (在 06/30/2017 19:50:11 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33155_943035275.arc ORA-00280: 更改 16688961842 (用于线程 2) 在序列 #33155 中 ORA-00279: 更改 16688969496 (在 06/30/2017 19:55:09 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33156_943035275.arc ORA-00280: 更改 16688969496 (用于线程 2) 在序列 #33156 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33155_943035275.arc' ORA-00279: 更改 16689017975 (在 06/30/2017 19:58:18 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30009_943035275.arc ORA-00280: 更改 16689017975 (用于线程 1) 在序列 #30009 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30008_943035275.arc' ORA-00279: 更改 16689019180 (在 06/30/2017 19:58:24 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33157_943035275.arc ORA-00280: 更改 16689019180 (用于线程 2) 在序列 #33157 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33156_943035275.arc' ORA-00279: 更改 16689036239 (在 06/30/2017 20:00:05 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33158_943035275.arc ORA-00280: 更改 16689036239 (用于线程 2) 在序列 #33158 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33157_943035275.arc' ORA-00279: 更改 16689038966 (在 06/30/2017 20:00:12 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30010_943035275.arc ORA-00280: 更改 16689038966 (用于线程 1) 在序列 #30010 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30009_943035275.arc' ORA-00279: 更改 16689058869 (在 06/30/2017 20:01:50 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33159_943035275.arc ORA-00280: 更改 16689058869 (用于线程 2) 在序列 #33159 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33158_943035275.arc' ORA-00279: 更改 16689072470 (在 06/30/2017 20:02:23 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30011_943035275.arc ORA-00280: 更改 16689072470 (用于线程 1) 在序列 #30011 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30010_943035275.arc' ORA-00279: 更改 16689124031 (在 06/30/2017 20:05:42 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30012_943035275.arc ORA-00280: 更改 16689124031 (用于线程 1) 在序列 #30012 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30011_943035275.arc' ORA-00279: 更改 16689125267 (在 06/30/2017 20:05:45 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33160_943035275.arc ORA-00280: 更改 16689125267 (用于线程 2) 在序列 #33160 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33159_943035275.arc' ORA-00279: 更改 16689171808 (在 06/30/2017 20:09:13 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33161_943035275.arc ORA-00280: 更改 16689171808 (用于线程 2) 在序列 #33161 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33160_943035275.arc' ORA-00279: 更改 16689186881 (在 06/30/2017 20:12:01 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30013_943035275.arc ORA-00280: 更改 16689186881 (用于线程 1) 在序列 #30013 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30012_943035275.arc' ORA-00279: 更改 16689190432 (在 06/30/2017 20:12:43 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33162_943035275.arc ORA-00280: 更改 16689190432 (用于线程 2) 在序列 #33162 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33161_943035275.arc' ORA-00279: 更改 16689277590 (在 06/30/2017 20:19:26 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30014_943035275.arc ORA-00280: 更改 16689277590 (用于线程 1) 在序列 #30014 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30013_943035275.arc' ORA-00279: 更改 16689279641 (在 06/30/2017 20:19:56 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33163_943035275.arc ORA-00280: 更改 16689279641 (用于线程 2) 在序列 #33163 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33162_943035275.arc' ORA-00279: 更改 16689365643 (在 06/30/2017 20:26:31 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33164_943035275.arc ORA-00280: 更改 16689365643 (用于线程 2) 在序列 #33164 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33163_943035275.arc' ORA-00279: 更改 16689376783 (在 06/30/2017 20:29:08 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30015_943035275.arc ORA-00280: 更改 16689376783 (用于线程 1) 在序列 #30015 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30014_943035275.arc' ORA-00279: 更改 16689415457 (在 06/30/2017 20:31:03 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30016_943035275.arc ORA-00280: 更改 16689415457 (用于线程 1) 在序列 #30016 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30015_943035275.arc' ORA-00279: 更改 16689416211 (在 06/30/2017 20:31:11 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33165_943035275.arc ORA-00280: 更改 16689416211 (用于线程 2) 在序列 #33165 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33164_943035275.arc' ORA-00279: 更改 16689464374 (在 06/30/2017 20:36:32 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30017_943035275.arc ORA-00280: 更改 16689464374 (用于线程 1) 在序列 #30017 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30016_943035275.arc' BP Key: 1682 Status: AVAILABLE Compressed: NO Tag: TAG20170630T204727 Handle: arch_dMESDB_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: 建议: /odacim/MESDB/arch/arch_2_33166_943035275.arc ORA-00280: 更改 16689468168 (用于线程 2) 在序列 #33166 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33165_943035275.arc' ORA-00279: 更改 16689469255 (在 06/30/2017 20:37:15 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33167_943035275.arc ORA-00280: 更改 16689469255 (用于线程 2) 在序列 #33167 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33166_943035275.arc' ORA-00279: 更改 16689513199 (在 06/30/2017 20:42:30 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30018_943035275.arc ORA-00280: 更改 16689513199 (用于线程 1) 在序列 #30018 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30017_943035275.arc' ORA-00279: 更改 16689519577 (在 06/30/2017 20:43:24 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33168_943035275.arc ORA-00280: 更改 16689519577 (用于线程 2) 在序列 #33168 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33167_943035275.arc' ORA-00279: 更改 16689566404 (在 06/30/2017 20:47:17 生成) 对于线程 2 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_2_33169_943035275.arc ORA-00280: 更改 16689566404 (用于线程 2) 在序列 #33169 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_2_33168_943035275.arc' ORA-00279: 更改 16689566586 (在 06/30/2017 20:47:19 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30019_943035275.arc ORA-00280: 更改 16689566586 (用于线程 1) 在序列 #30019 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30018_943035275.arc' ORA-00279: 更改 16689566649 (在 06/30/2017 20:47:25 生成) 对于线程 1 是必需的 ORA-00289: 建议: /odacim/MESDB/arch/arch_1_30020_943035275.arc ORA-00280: 更改 16689566649 (用于线程 1) 在序列 #30020 中 ORA-00278: 此恢复不再需要日志文件 '/odacim/MESDB/arch/arch_1_30019_943035275.arc' ORA-00308: cannot open archived log '/odacim/MESDB/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 ---------------- ------------ MESDB OPEN SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ MESDB OPEN }}}