In this article we are going to see Oracle System Monitor Background Process.
System Monitor Process is a background process that performs many database tasks like below.
- Performs critical tasks such as crash recovery when the instance is started following a failure, dead transaction recovery, and maintenance tasks such as temporary space reclamation, data dictionary cleanup, and undo tablespace management
- Maintains the undo tablespace by onlining , offlining and shrinking the undo segments based on undo space usage statistics
- Every 5 minutes, SMON wakes up and fills sys.smon_scn_time
- Maintains the system change number to time mapping table used to support oracle flashback features.
- In an Rac database the smon process of one instance can perform instance recovery for other instances that have failed.
- SMON checks the SCN in all datafile headers when the database is started. Everything is OK if all of these SCNs matches the SCN found in the controlfile. If the SCNs don’t match, the database is in an inconsistent state.
- SMON wakes up every 5 minutes to perform housekeeping activities. SMON must always be running for an instance. If not, the instance will terminate.
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 18273 1 0 11:37 ? 00:00:00 ora_pmon_dbwr
oracle 18275 1 0 11:37 ? 00:00:00 ora_clmn_dbwr
oracle 18277 1 0 11:37 ? 00:00:00 ora_psp0_dbwr
oracle 18279 1 2 11:37 ? 00:00:00 ora_vktm_dbwr
oracle 18306 1 0 11:37 ? 00:00:00 ora_dia0_dbwr
oracle 18308 1 0 11:37 ? 00:00:00 ora_dbw0_dbwr
oracle 18310 1 0 11:37 ? 00:00:00 ora_lgwr_dbwr
oracle 18312 1 0 11:37 ? 00:00:00 ora_ckpt_dbwr
oracle 18314 1 0 11:37 ? 00:00:00 ora_smon_dbwr
Kill Smon process from OS level
Disconnected from Oracle Database 19c Enterprise Edition Release 220.127.116.11.0 – Production
[oracle@dev19c ~]$ kill -9 18314
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
Cause – ‘Instance is being terminated due to fatal process death (pid: 22, ospid: 18314, SMON)’
Dumping diagnostic data in directory=[cdmp_20200211113912], requested by (instance=1, osid=18273 (PMON)), summary=[abnormal instance termination].
Instance terminated by PMON, pid = 18273
Connect with me:-
FB Page : https://www.facebook.com/dbahariprasath/?
Twitter : https://twitter.com/oracledbwr