Description:-
In this article we are going to see Oracle Process Monitor Background Process.
- Process Monitor process is background process that periodically scans all processes to find any that have died abnormally. Pmon is then responsible for coordinating cleanup performed by the cleanup main process (CLMN) and the cleanup Slave Process slaves (CLnn).
- Monitors the other background processes and performs process recovery when a server or dispatcher process terminates abnormally
- PMON constantly checks the status of user and database processes. In some cases, failed database processes can be restarted by PMON.
- Once instance is started , PMON registers information about the instance to the network listener.
- From Oracle 12c, PMON also registered database services with the listener. This is now handled by the new LREG progress.
- PMON normally wakes up every 3 seconds to perform its housekeeping activities. PMON must always be running for an instance
- PMON process is killed then instance will shutdown.
- If user process fails,PMON cleans up the database buffer cache and release the resources that the user process was using. It also resets the status of the active transaction table, release locks, and removes the process ID from the list of active processes.
We simulate a case that we kill the most important process manually, DBWn. Once this Process ends, the instance will stop immediately.
SQL> ! ps -ef | grep ora_ | grep $ORACLE_SID
oracle 12470 1 0 10:45 ? 00:00:00 ora_pmon_dbwr
oracle 12472 1 0 10:45 ? 00:00:00 ora_clmn_dbwr
oracle 12474 1 0 10:45 ? 00:00:00 ora_psp0_dbwr
oracle 12476 1 2 10:45 ? 00:00:01 ora_vktm_dbwr
oracle 12481 1 0 10:45 ? 00:00:00 ora_gen0_dbwr
oracle 12483 1 0 10:45 ? 00:00:00 ora_mman_dbwr
oracle 12487 1 0 10:45 ? 00:00:00 ora_gen1_dbwr
oracle 12490 1 0 10:45 ? 00:00:00 ora_diag_dbwr
Kill Pmon process from OS level
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.4.1.0.0
[oracle@dev19c ~]$ kill -9 12470
Database level checks
SQL> select * from dual;
select * from dual
*
ERROR at line 1:
ORA-03135: connection lost contact
Process ID: 13069
Session ID: 59 Serial number: 29680
Alertlog view
GEN1 (ospid: ): terminating the instance due to ORA error
2020-02-11T10:48:44.391695+05:30
Cause – ‘Instance is being terminated due to fatal process PMON being dead.’
2020-02-11T10:48:44.418709+05:30
System state dump requested by (instance=1, osid=12488 (GEN1)), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/oracle/diag/rdbms/dbwr/dbwr/trace/dbwr_diag_12490.trc
2020-02-11T10:48:45.525181+05:30
Dumping diagnostic data in directory=[cdmp_20200211104844], requested by (instance=1, osid=12488 (GEN1)), summary=[abnormal instance termination].
2020-02-11T10:48:45.735495+05:30
Instance terminated by GEN1, pid = 12487_12488
2020-02-11T10:48:45.736579+05:30
Warning: 2 processes are still attacheded to shmid 753673:
(size: 12288 bytes, creator pid: 12441, last attach/detach pid: 12492)
Connect with me:-
Telegram App:https://t.me/oracledbwr
LinkedIn:https://www.linkedin.com/in/hariprasathdba
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page : https://www.facebook.com/dbahariprasath/?
Twitter : https://twitter.com/oracledbwr