Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Article 8

$
0
0

Script to check the Database status in HTML format


set lines 200
col FIRST_CHANGE# format 999999999999999
col NEXT_CHANGE# format 999999999999999
col name format a60
col member format a70
spool db-current-status.html
set markup html on
alter session set nls_date_format = 'dd/mm/yyyy hh24:mi:ss';
select HXFIL File_num,substr(HXFNM,1,75) name,FHTYP Type,HXERR Validity,FHSCN SCN, FHTNM TABLESPACE_NAME,FHSTA status ,FHRBA_SEQ Sequence from X$KCVFH;
select count(*) ,fhrba_seq,FHTHR from x$kcvfh group by fhrba_seq,FHTHR;
select count(*) ,fhsta from x$kcvfh group by fhsta;
select count(*) ,FHSCN,FHTHR from x$kcvfh group by FHSCN,FHTHR;
select file#,error from v$datafile_header where length(error)>=1;
select * from gv$log;
select group#,member from v$logfile;
select distinct(status)from v$datafile;
select FILE#,TS# , status, NAME from v$datafile where status not in ('SYSTEM','ONLINE') order by 1;
select count(*) from v$backup where status = 'ACTIVE';
select name,dbid,CONTROLFILE_TYPE,OPEN_RESETLOGS,open_mode,log_mode from v$database;
select DISTINCT (TO_CHAR (CHECKPOINT_TIME)) ,count(*) from V$DATAFILE_HEADER group by CHECKPOINT_TIME;
select * from v$database_incarnation;
set markup html off
spool off


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>