正德厚生,臻于至善

dgstatus.sql

show parameter name
set lines 200 pages 50000
col flashback_on for a3
col force_logging for a3
col supplemental_log_data_min for a3
col db_unique_name for a12
select dbid,name,db_unique_name,flashback_on,force_logging,supplemental_log_data_min,PROTECTION_MODE,PROTECTION_LEVEL,DATABASE_ROLE,SWITCHOVER_STATUS,GUARD_STATUS,OPEN_MODE from gv$database;

set lines 160 pages 50000
select thread#,group#,bytes/1024/1024,blocksize,members,status from v$log order by 1,2;
select thread#,group#,bytes/1024/1024,blocksize,status from v$standby_log order by 1,2;
col member for a80
col group# for 999999
col status for a10
col type for a7
select * from v$logfile order by 1;

set linesize 200
set pagesize 999
col value for a30
col name for a30
col unit for a30
col time_computed for a30
col datum_time for a30
col status for a15
col last_change# for 99999999999999999999999
select group#,thread#,sequence#,status,used,archived,last_change# from v$standby_log;
select inst_id,process,status,client_process,thread#,sequence#,delay_mins from gv$managed_standby;
select * from v$dataguard_stats;

set linesize 200
set pagesize 999
col value for a30
col name for a30
col unit for a30
col time_computed for a30
col datum_time for a30
col status for a15
col last_change# for 99999999999999999999999
select group#,thread#,sequence#,status,used,archived,last_change# from v$standby_log where status='ACTIVE';
select inst_id,process,status,client_process,thread#,sequence#,delay_mins from gv$managed_standby where process like '%MRP%';
select name,value,unit,time_computed,datum_time from v$dataguard_stats;

column name format a20
column free_mb format 999,999,999
select name,to_char(sysdate,'YYYY-MM-DD HH24:MI') SYSTEM_DATETIME from v$database;
select (select name from v$database) db_name,name diskgroup_name,total_mb,free_mb,round(free_mb/total_mb*100,1) FREE_Uti_PCT from v$asm_diskgroup order by 4;
赞(0) 打赏
未经允许不得转载:徐万新之路 » dgstatus.sql
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏