Ai e sexta a noite no sábado você vai ter aula....
Ligam para você, e falam que ta dando pau na aplicação que é culpa do banco que suspeitam do archive log .
Beleza vamos la no rman ver o que esta acontecendo e de repente você vê o seguinte :
rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Sat Feb 9 01:04:26 2019
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-00020: maximum number of processes (1500) exceeded
Ai vamos que vamos analisar tudo direitinho.... :
-- select * from v$instance
-- select inst_id,sid,serial# from gv$session
-- select * from gv$session
-- show parameter sessions
-- show parameter processes
-- show parameter transactions
-- show parameter db_recover
-- select * from v$recovery_file_dest
-- select * from v$recovery_progress
-- select * from v$recovery_status
/*
rman> delete archivelog until time 'sysdate-n'
crosscheck archivelog all;
delete expired archivelog all;
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=4294967296 SCOPE=BOTH;
*/
SELECT s.inst_id, s.sid, s.SERIAL#, s.STATUS, s.USERNAME, s.MACHINE FROM gv$session s -- WHERE s.status = 'KILLED'
-- SCRIPT SALVADOR DA PATRIA MANTANDO AS SESSOES
select 'ALTER SYSTEM DISCONNECT SESSION '''||sid||','||serial#||''' IMMEDIATE;'
from v$session
where username is not null
and status <> 'ACTIVE'
and username not in ('SYS', 'SYSMAN', 'DBSNMP')
and last_call_et > 1500
/*
-- sessão realizando rollback. caso isso ocorra veja o link do Fernando simon ( não conheco mas gosto muito dos artigos desse senhor )
-- http://www.fernandosimon.com/blog/matando-sessoes-killed/
, s.sid
, s.program
, t.status as transaction_status
, s.status as session_status
, s.lockwait
, s.pq_status
, t.used_ublk as undo_blocks_used
, decode(bitand(t.flag, 128), 0, 'NO', 'YES') rolling_back
from
gv$session s
, gv$transaction t
where s.taddr = t.addr
and s.inst_id = t.inst_id
and s.STATUS = 'KILLED'
order by t.inst_id;
*/