联系:手机/微信(+86 17813235971) QQ(107644445)
标题:数据库启动报 maximum number of processes () exceeded分析
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
比较少遇到打开一个数据库报ORA-00020: maximum number of processes () exceeded,导致open数据库失败
SQL> alter database open; alter database open * 第 1 行出现错误: ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00450: background process 'QMNC' did not start ORA-00444: background process "QMNC" failed while starting ORA-00020: maximum number of processes () exceeded 进程 ID: 6340 会话 ID: 109 序列号: 3
看这个报错应该是由于进程数达到了限制,导致在open数据库过程中启动后台进程QMNC失败,导致open过程失败,分析进程数不足的原因,查看启动时候的参数配置
Fri Dec 26 16:48:27 2025 Adjusting the default value of parameter parallel_max_servers from 2560 to 135 due to the value of parameter processes (150) Starting ORACLE instance (normal) LICENSE_MAX_SESSION = 0 LICENSE_SESSIONS_WARNING = 0 Picked latch-free SCN scheme 3 Fri Dec 26 16:48:38 2025 Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST Autotune of undo retention is turned on. IMODE=BR ILAT =28 LICENSE_MAX_USERS = 0 SYS auditing is disabled Starting up: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options. Windows NT Version V6.2 CPU : 64 - type 8664, 32 Physical Cores Process Affinity : 0x0x0000000000000000 Memory (Avail/Total): Ph:82501M/130752M, Ph+PgF:103658M/150208M Using parameter settings in client-side pfile D:\PFILE.TXT on machine HISSERVER System parameters with non-default values: processes = 150 sga_target = 39296M control_files = "D:\ORACLE64\ORADATA\ORA817\CONTROL01.CTL" control_files = "D:\ORACLE64\RECOVERY_AREA\ORA817\CONTROL02.CTL" db_block_size = 8192 compatible = "11.2.0.0.0" db_recovery_file_dest = "D:\ORACLE64\recovery_area" db_recovery_file_dest_size= 4122M undo_tablespace = "UNDOTBS1" remote_login_passwordfile= "EXCLUSIVE" db_domain = "" dispatchers = "(PROTOCOL=TCP) (SERVICE=ora817XDB)" audit_file_dest = "D:\ORACLE64\ADMIN\ORA817\ADUMP" audit_trail = "DB" db_name = "ora817" open_cursors = 300 pga_aggregate_target = 13075M diagnostic_dest = "D:\ORACLE64" Fri Dec 26 16:49:10 2025 PMON started with pid=2, OS id=1992 Fri Dec 26 16:49:10 2025 PSP0 started with pid=3, OS id=6744 Fri Dec 26 16:49:12 2025 VKTM started with pid=4, OS id=7592 at elevated priority Fri Dec 26 16:49:12 2025 GEN0 started with pid=5, OS id=7780 Fri Dec 26 16:49:12 2025 DBRM started with pid=7, OS id=5372 Fri Dec 26 16:49:12 2025 MMAN started with pid=9, OS id=6700 Fri Dec 26 16:49:12 2025 DBW0 started with pid=10, OS id=1920 Fri Dec 26 16:49:12 2025 DBW1 started with pid=11, OS id=4476 Fri Dec 26 16:49:12 2025 DBW2 started with pid=12, OS id=6788 Fri Dec 26 16:49:12 2025 DBW3 started with pid=13, OS id=4608 Fri Dec 26 16:49:12 2025 DBW4 started with pid=14, OS id=6716 Fri Dec 26 16:49:12 2025 DBW5 started with pid=15, OS id=6252 Fri Dec 26 16:49:12 2025 DBW6 started with pid=16, OS id=7948 Fri Dec 26 16:49:12 2025 DBW7 started with pid=17, OS id=5868 Fri Dec 26 16:49:12 2025 LGWR started with pid=18, OS id=1644 Fri Dec 26 16:49:12 2025 CKPT started with pid=19, OS id=5704 Fri Dec 26 16:49:12 2025 SMON started with pid=20, OS id=4532 Fri Dec 26 16:49:12 2025 RECO started with pid=21, OS id=380 Fri Dec 26 16:49:12 2025 MMON started with pid=22, OS id=1316 Fri Dec 26 16:49:12 2025 MMNL started with pid=23, OS id=6108 Fri Dec 26 16:49:12 2025 DIAG started with pid=6, OS id=7904 Fri Dec 26 16:49:12 2025 starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'... starting up 1 shared server(s) ... ORACLE_BASE from environment = D:\ORACLE64
这里可以看出来数据库版本是11.2.0.3,processes配置为默认值150.进一步查看启动报错时候的alert日志
ALTER DATABASE RECOVER database Media Recovery Start started logmerger process Fri Dec 26 17:03:44 2025 Media Recovery failed with error 264 Slave exiting with ORA-283 exception Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_pr00_344.trc: ORA-00283: recovery session canceled due to errors ORA-00264: no recovery required Recovery Slave PR00 previously exited with exception 283 ORA-283 signalled during: ALTER DATABASE RECOVER database ... alter database open Fri Dec 26 17:03:48 2025 Thread 1 opened at log sequence 37301 Current log# 2 seq# 37301 mem# 0: D:\ORACLE64\ORADATA\ORA817\REDO02.LOG Successful open of redo thread 1 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set Fri Dec 26 17:03:49 2025 SMON: enabling cache recovery [6340] Successfully onlined Undo Tablespace 2. Undo initialization finished serial:0 start:5143437 end:5143718 diff:281 (2 seconds) Verifying file header compatibility for 11g tablespace encryption.. Verifying 11g file header compatibility for tablespace encryption completed SMON: enabling tx recovery Fri Dec 26 17:03:49 2025 Database Characterset is ZHS16GBK No Resource Manager plan active replication_dependency_tracking turned off (no async multimaster replication found) ORA-00020: maximum number of processes (150) exceeded ORA-20 errors will not be written to the alert log for the next minute. Please look at trace files to see all the ORA-20 errors. Process P123 submission failed with error = 20 Starting background process QMNC Process QMNC submission failed with error = 20 Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_ora_6340.trc: ORA-00444: 后台进程 "QMNC" 启动失败 ORA-00020: 超出最大进程数 () Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_ora_6340.trc: ORA-00450: 后台进程 'QMNC' 未启动 ORA-00444: 后台进程 "QMNC" 启动失败 ORA-00020: 超出最大进程数 () Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_ora_6340.trc: ORA-00450: 后台进程 'QMNC' 未启动 ORA-00444: 后台进程 "QMNC" 启动失败 ORA-00020: 超出最大进程数 () Error 450 happened during db open, shutting down database USER (ospid: 6340): terminating the instance due to error 450 Fri Dec 26 17:03:50 2025 Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_p036_8044.trc (incident=4105): ORA-01578: ORACLE data block corrupted (file # 9, block # 504643) ORA-01110: data file 9: 'D:\ORACLE64\ORADATA\ORA817\HRPRUN_DATA05.DBF' Incident details in: D:\ORACLE64\diag\rdbms\ora817\ora817\incident\incdir_4105\ora817_p036_8044_i4105.trc Fri Dec 26 17:03:50 2025 Process m000 submission failed with error = 20 Fri Dec 26 17:04:07 2025 Instance terminated by USER, pid = 6340 ORA-1092 signalled during: alter database open... opiodr aborting process unknown ospid (6340) as a result of ORA-1092 Fri Dec 26 17:04:09 2025 ORA-1092 : opitsk aborting process
看alert日志比较明显有Process P123 submission failed with error = 20提示,这里表示启动P123进程时候也遭遇到了进程数不足的限制导致该进程无法启动,而Pxxx进程是oracle的并行进程(而且在后面还报了由于坏块导致P036进程报错的信息),也就是说这个数据库在启动过程中启动了大量的并行进程(至少122个已经启动),这也就是说明了为什么150个进程不足的原因.在数据库完成实例恢复,完全open之前启动并行进程进行恢复的,很可能就是并行回滚操作.为了进一步验证猜想,把processes调整到1500,然后尝试启动库
Fri Dec 26 17:06:44 2025 alter database open Beginning crash recovery of 1 threads parallel recovery started with 32 processes Started redo scan Completed redo scan read 20 KB redo, 5 data blocks need recovery Started redo application at Thread 1: logseq 37301, block 18209 Recovery of Online Redo Log: Thread 1 Group 2 Seq 37301 Reading mem 0 Mem# 0: D:\ORACLE64\ORADATA\ORA817\REDO02.LOG Completed redo application of 0.02MB Completed crash recovery at Thread 1: logseq 37301, block 18249, scn 327081807 5 data blocks read, 5 data blocks written, 20 redo k-bytes read Fri Dec 26 17:06:46 2025 Thread 1 advanced to log sequence 37302 (thread open) Thread 1 opened at log sequence 37302 Current log# 3 seq# 37302 mem# 0: D:\ORACLE64\ORADATA\ORA817\REDO03.LOG Successful open of redo thread 1 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set Fri Dec 26 17:06:47 2025 SMON: enabling cache recovery [7104] Successfully onlined Undo Tablespace 2. Undo initialization finished serial:0 start:5321812 end:5322031 diff:219 (2 seconds) Verifying file header compatibility for 11g tablespace encryption.. Verifying 11g file header compatibility for tablespace encryption completed SMON: enabling tx recovery Database Characterset is ZHS16GBK No Resource Manager plan active replication_dependency_tracking turned off (no async multimaster replication found) Fri Dec 26 17:06:49 2025 Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_p091_5924.trc (incident=5745): ORA-01578: ORACLE data block corrupted (file # 9, block # 504643) ORA-01110: data file 9: 'D:\ORACLE64\ORADATA\ORA817\HRPRUN_DATA05.DBF' Incident details in: D:\ORACLE64\diag\rdbms\ora817\ora817\incident\incdir_5745\ora817_p091_5924_i5745.trc Starting background process QMNC Fri Dec 26 17:06:49 2025 QMNC started with pid=156, OS id=8012 Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_p091_5924.trc (incident=5746): ORA-01578: ORACLE data block corrupted (file # , block # ) Incident details in: D:\ORACLE64\diag\rdbms\ora817\ora817\incident\incdir_5746\ora817_p091_5924_i5746.trc Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_smon_7424.trc (incident=4961): ORA-01578: ORACLE data block corrupted (file # 9, block # 504643) ORA-01110: data file 9: 'D:\ORACLE64\ORADATA\ORA817\HRPRUN_DATA05.DBF' Incident details in: D:\ORACLE64\diag\rdbms\ora817\ora817\incident\incdir_4961\ora817_smon_7424_i4961.trc Completed: alter database open SMON: Restarting fast_start parallel rollback Fri Dec 26 17:06:51 2025 Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_p000_5472.trc (incident=5009): ORA-01578: ORACLE data block corrupted (file # 9, block # 504643) ORA-01110: data file 9: 'D:\ORACLE64\ORADATA\ORA817\HRPRUN_DATA05.DBF' Incident details in: D:\ORACLE64\diag\rdbms\ora817\ora817\incident\incdir_5009\ora817_p000_5472_i5009.trc Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_p000_5472.trc (incident=5010): ORA-01578: ORACLE data block corrupted (file # , block # ) Errors in file D:\ORACLE64\diag\rdbms\ora817\ora817\trace\ora817_smon_7424.trc (incident=4962): ORA-01578: ORACLE data block corrupted (file # 9, block # 504643) ORA-01110: data file 9: 'D:\ORACLE64\ORADATA\ORA817\HRPRUN_DATA05.DBF' Incident details in: D:\ORACLE64\diag\rdbms\ora817\ora817\incident\incdir_5010\ora817_p000_5472_i5010.trc
这次就比较清晰了,数据库在open过程中由于smon启动了并行回滚并遇到了坏块,导致P091进程和smon进程错误。因为数据库已经open,这个坏块导致无法回滚,直接对这个对象进行处理即可解决掉这个回滚报错问题.
