dg
emcs
66次下载
1181次浏览
2019-07-24
4.5

脚本内容

set lines 132 col message for a80 col timestamp for a20 SELECT ERROR_CODE, SEVERITY, MESSAGE, TO_cHAR(TIMESTAMP, 'DD-MON-RR HH24:MI:SS') TIMESTAMP FROM V$DATAGUARD_STATUS WHERE CALLOUT='YES' AND TIMESTAMP > SYSDATE-1; select THREAD#,sequence#, first_time, next_time, applied from v$archived_log order by 3; select name,database_role,switchover_status from v$database; select sequence#, first_time, next_time, applied from v$archived_log order by sequence#; col type for a15 set lines 122 set pages 33 col item for a20 col units for a15 select to_char(start_time, 'DD-MON-RR HH24:MI:SS') start_time, type, item, units, sofar, total, timestamp from v$recovery_progress; set lines 132 col message for a80 col timestamp for a20 SELECT ERROR_CODE, SEVERITY, MESSAGE, TO_cHAR(TIMESTAMP, 'DD-MON-RR HH24:MI:SS') TIMESTAMP FROM V$DATAGUARD_STATUS WHERE CALLOUT='YES' AND TIMESTAMP > SYSDATE-1; select a.thread#, b.max_available, a.max_applied from ( select thread#, max(sequence#) max_applied from gv$archived_log where applied='YES' group by thread# ) a, ( select thread#, max(sequence#) max_available from gv$archived_log group by thread# ) b where a.thread#=b.thread#; select name,value,datum_time from v$dataguard_stats; --ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; --ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; --alter database recover managed standby database using current logfile disconnect from session;

评论

贡献排行榜