Oracle Controlli Automatici: differenze tra le versioni

Da Emigar.
Jump to navigation Jump to search
(Creata pagina con "=log non archiviati= Controllo se ci sono log non archiviati, accade se la destinazione degli archive è pena o se ci sono altr problemi nell'archiviazione. select count(*) from v$log l inner join v$database d on (d.LOG_MODE='ARCHIVELOG') where l.ARCHIVED='NO' and l.status !='CURRENT'; Categoria:Database Categoria:Oracle")
 
 
(4 versioni intermedie di uno stesso utente non sono mostrate)
Riga 1: Riga 1:
=backup rman=

select sysdate - max(end_time) from v$rman_status where operation='BACKUP' and object_type in ('DB FULL','DB INCR') and status='COMPLETED';

=log non archiviati=
=log non archiviati=
Controllo se ci sono log non archiviati, accade se la destinazione degli archive è pena o se ci sono altr problemi nell'archiviazione.
Controllo se ci sono log non archiviati, accade se la destinazione degli archive è piena o se ci sono altri problemi nell'archiviazione.
Ritorna 0 se non ci sono log non archviati (OK), un numero maggiore di 0 se ci sono log da archiviare.
Restituisce sempre 0 se il database non è in archivelog.


select count(*) from v$log l inner join v$database d on (d.LOG_MODE='ARCHIVELOG') where l.ARCHIVED='NO' and l.status !='CURRENT';
select count(*) from v$log l inner join v$database d on (d.LOG_MODE='ARCHIVELOG') where l.ARCHIVED='NO' and l.status !='CURRENT';


with aa as (select count(*) as c from v$log l inner join v$database d on (d.LOG_MODE='ARCHIVELOG') where l.ARCHIVED='NO' and l.status !='CURRENT')
select aa.c/(select count(*) from v$log) as pct from aa;

=riempimento fra=

select sum(PERCENT_SPACE_USED) from v$flash_recovery_area_usage;
select (SPACE_USED/SPACE_LIMIT)*100 from v$recovery_file_dest;


[[Categoria:Database]]
[[Categoria:Database]]

Versione attuale delle 11:35, 20 apr 2023

backup rman

select sysdate - max(end_time) from v$rman_status where operation='BACKUP' and object_type in ('DB FULL','DB INCR') and status='COMPLETED';

log non archiviati

Controllo se ci sono log non archiviati, accade se la destinazione degli archive è piena o se ci sono altri problemi nell'archiviazione. Ritorna 0 se non ci sono log non archviati (OK), un numero maggiore di 0 se ci sono log da archiviare. Restituisce sempre 0 se il database non è in archivelog.

select count(*) from v$log l inner join v$database d on (d.LOG_MODE='ARCHIVELOG') where l.ARCHIVED='NO' and l.status !='CURRENT';
with aa as (select count(*) as c from v$log l inner join v$database d on (d.LOG_MODE='ARCHIVELOG') where l.ARCHIVED='NO' and l.status !='CURRENT')
select aa.c/(select count(*) from v$log) as pct from aa;

riempimento fra

select sum(PERCENT_SPACE_USED) from v$flash_recovery_area_usage;
select (SPACE_USED/SPACE_LIMIT)*100 from v$recovery_file_dest;