1. View processes and Sessions parameters
sql> Show parameter Processes
NAME TYPE VALUE
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer
log_archive_max_processes integer 2
processes integer
sql> Show Parameter Sessions
NAME TYPE VALUE
license_max_sessions integer 0
license_sessions_warning integer 0
logmnr_max_persistent_sessions integer 1
Sessions Integer
shared_server_sessions integer
2. Modifying processes and Sessions values
sql> alter system set PROCESSES=300 Scope=spfile;
The system has changed.
sql> alter system set sessions=335 Scope=spfile;
The system has changed.
3. Modifying the processes and sessions values must restart the Oracle server to take effect
The number of connections to Oracle (sessions) is related to the number of processes in its parameter file (process), and their relationships are as follows:
sessions= (1.1*process+5)
pick (ii)
Query the number of connections to the current process of the database:
Select COUNT (*) from v$process;
to view the number of connections for the current session of the database:
Select COUNT (*) from v$session;
to view the number of concurrent connections for a database:
Select COUNT (*) from v$session where status= ' ACTIVE ';
to view the session established by the current database:
select Sid,serial#,username,program,machine,status from V$session;
Maximum number of connections allowed for query database:
Select value from v$parameter where name = ' processes ';
or: Show parameter processes;
to modify the maximum number of connections allowed for a database:
alter system SET processes = $ scope = SPFile;
(you need to restart the database to make changes to the number of connections)
To Restart the database:
shutdown immediate;
startup;
See which users are currently working with the data:
Select osuser,a.username,cpu_time/executions/1000000 ' s ', sql_fulltext,machine from v$session A,v$sqlarea b where a . sql_address = b.address ORDER BY cpu_time/executions Desc;
Note: UNIX 1 users session corresponds to an operating system process, while Windows embodies the thread.
Start Oracle
su-oracle
sqlplus system/pwd as SYSDBA//Enter SQL
Startup //Start Database
lsnrctl start//boot monitoring
sqlplus "/as sysdba"
shutdown immediate;
startup Mount;
ALTER DATABASE open;
Oracle Maximum number of connections