数据库处于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"