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
Disconnected from Oracle Database 19c Enterprise Edition Release 126.96.36.199.0 – Production
[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
GEN1 (ospid: ): terminating the instance due to ORA error
Cause – ‘Instance is being terminated due to fatal process PMON being dead.’
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
Dumping diagnostic data in directory=[cdmp_20200211104844], requested by (instance=1, osid=12488 (GEN1)), summary=[abnormal instance termination].
Instance terminated by GEN1, pid = 12487_12488
Warning: 2 processes are still attacheded to shmid 753673:
(size: 12288 bytes, creator pid: 12441, last attach/detach pid: 12492)
Connect with me:-
FB Page : https://www.facebook.com/dbahariprasath/?
Twitter : https://twitter.com/oracledbwr