本帖最后由 王亮 于 2019-12-18 10:32 编辑
查看主备库的基本信息: select open_mode,protection_mode,database_role,switchover_status from v$database; 查看实例状态: select instance_name,version,status,database_status from v$instance; 检查备库的归档日志同步情况: selectNAME,applied FROM v$archived_log; select thread #,sequence#,standby_dest,archived,applied,status from v$archived_log order by 1,2; 检查控制文件状态: selectstatus,name from v$controlfile; 检查日志文件状态: select GROUP#,status,type,member from v$logfile; 检查归档目的地状态: select dest_name,status,database_mode,destination from v$archive_dest_status where dest_id in ('1','2'); 检查数据库连续运行天数: select round(a.atime-b.startup_time)||'days' from(select sysdate atime from dual) a,v$instance b;
|