Method: 1. Use the "alter system set processes = modify the number of connections scope = spfile" statement to modify the maximum number of connections allowed by the database; 2. After modification, use the "shutdown immediate" and "startup" statements to restart .
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
Step 1: First log in to the database through sqlplus, sqlplus / as sysdba
Step 2: View Number of connections of the current database process
Step 3: Query the number of connections of the current database session
Step 4: View The maximum number of connections and the maximum number of sessions set by the database. The show parameter processes command views the summarized information. You can also directly select value from v$parameter where name ='processes'; to view the statement. The maximum number of process connections is 4000.
Step 5: When the number of database connections needs to be adjusted, you can use alter system set processes = 3000 scope = spfile; to modify the number of connections. (Modifying 3000 is just a demonstration. Most of the time, the number of connections is not enough, and the value is modified larger)
Step 6: Modifying the processes and sessions values must restart the Oracle server to take effect
shutdown immediate; close the instance
startup startup
Step 7: Check again after the step restarts, it has taken effect
Step 8: You can use the following command to check the consumption of database connections: select b.MACHINE, b.PROGRAM, b.USERNAME, count(*) from v$process a, v$session b where a.ADDR = b.PADDR and b.USERNAME is not null
group by b.MACHINE, b.PROGRAM, b.USERNAME order by count(*) desc
Recommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How to modify the number of connections in oracle. For more information, please follow other related articles on the PHP Chinese website!