在备库上进行冷备份的三个步骤

数据库处于mount状态不一定是一致的,要看mrp进程是否存在!

SQL> set linesize 200
select d.DB_UNIQUE_NAME,d.open_mode,d.log_mode,d.DATABASE_ROLE,d.PROTECTION_MODE from v$database d;SQL>

DB_UNIQUE_NAME OPEN_MODE LOG_MODE DATABASE_ROLE PROTECTION_MODE

orclby MOUNTED ARCHIVELOG PHYSICAL STANDBY MAXIMUM PERFORMANCE

SQL> select process,status,sequence# from v$managed_standby;

PROCESS STATUS SEQUENCE#

ARCH CLOSING 60
ARCH CONNECTED 0
ARCH CLOSING 59
ARCH CONNECTED 0
RFS IDLE 0
RFS IDLE 0
RFS IDLE 0
RFS IDLE 61
MRP0 APPLYING_LOG 61

9 rows selected.

SQL> host ps -ef|grep mrp
oracle 3941 1 0 19:24 ? 00:00:00 ora_mrp0_orclsb
oracle 4614 4467 0 19:33 pts/0 00:00:00 /bin/bash -c ps -ef|grep mrp
oracle 4616 4614 0 19:33 pts/0 00:00:00 grep mrp

停止managed recover

su - oracle -c " ORACLE_SID=cdr1; ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1; /u01/app/oracle/product/12.1.0/db_1/bin/sqlplus / as sysdba<<eof
alter database recover managed standby database cancel;
eof"

开始备份


run{
allocate channel c1 type 'sbt_tape' parms='
SBT_LIBRARY=/opt/scutech/dbackup3/lib/libobk.so,
ENV=(URL=http://192.168.87.155:50306/d2/data/0d36020eecec11ea8000b49691622ac4/c7873e9aed0811ea8000b49691622ac4,
EXTRA=X-Access-Key:ea5350ac00fa61d08533a729da808de0)' trace=0;
backup database ;
}

启动managed recover

su - oracle -c " ORACLE_SID=cdr1; ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1; /u01/app/oracle/product/12.1.0/db_1/bin/sqlplus / as sysdba<<eof
alter database recover managed standby database disconnect from session;
eof"
姚远ACE CSDN认证博客专家 ACE 华为云 MVP
Oracle ACE,华为云 MVP,Oracle10g,12c OCM; MySQL 5.6,5.7,8.0 OCP;CCNA; EMC Certified; IBM P Certified; RHCE; SQLServer 764; DB2 Certified; TOEIC 890;获得过两次国家部级科技进步奖;发明过两项计算机专利。微信:yaoyuanace 邮箱:yaoyuanace(at)qq.com
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页