Welcome 微信登录

首页 / 数据库 / MySQL / Oracle通过视图和告警日志检查主库,物理和快照备库

Oracle通过视图和告警日志检查主库,物理和快照备库
主库动作主库信息备库信息
是否启用redo线程alert logv$threadalert log
展示数据库角色,保护模式,保护级别,切换状态,快速启用,失效转换信息v$databasev$database
增删redo日志文件组alert logv$logv$logfile的status字段alert log
控制文件的创建alert logalert log
表空间状态的改变v$recover_filedba_tablespacealert logv$recover_filedba_tablespace
增删数据文件或表空间dba_data_filesalert logv$datafilealert log
重命名数据文件v$datafilealert logv$datafilealert log
未记录日志或未恢复的操作v$datafilev$databasealert log
监控redo传输v$archive_dest_statusv$archived_logv$archived_destalert logv$archived_logalert log 
发布open resetlogs 或 clear unarchived logfiles 语句alert logalert log 
修改初始化参数alert logalert log
通过以下语句获取主备库的当前角色,保护模式,保护级别,切换状态,快速启用,失效转换信息
 select protection_mode,
 
      protection_level,
 
      database_role role,
 
      switchover_status
 
  from v$database;获取fast-start 失效切换状态
 select fs_failover_status          "fsfo status",
 
      fs_failover_current_target  target,
 
      fs_failover_threshold        threshold,
 
      fs_failover_observer_present "observer present"
 
  from v$database;获取物理备库上的redo应用和传输状态
 select process, status, thread#, sequence#, block#, blocks
 
  from v$managed_standby;查询归档日志文件的信息和历史归档信息
select thread#, sequence#, first_change#, next_change#
 
  from v$archived_log;
 
select thread#, sequence#, first_change#, next_change# from v$log_history;查看被写入alert log中关于DG的事件信息
select message from v$dataguard_status查看主库redo日志传输到目标端的状态,SCN表示最后一个在standby库上应用的redo日志的系统改变号。
select dest_id, applied_scn from v$archive_dest where target="standby";更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12本文永久更新链接地址