SQL> Select count (*) from v $ session where status = 'active ';
COUNT (*)
----------
20
SQL> Select count (*) from v $ session;
COUNT (*)
----------
187
SQL> show parameter processes;
NAME TYPE VALUE
---------------------------------------------------------
Aq_tm_processes integer 0
Db_writer_processes integer 1
Gcs_server_processes integer 0
Job_queue_processes integer 10
Log_archive_max_processes integer 2
Processes integer 450
SQL>
Concurrency refers to active, I SEE
SQL> select count (*) from v $ session # Number of connections
SQL> Select count (*) from v $ session where status = 'active' # number of concurrent connections
SQL> show parameter processes # maximum connection
SQL> alter system set processes = value scope = spfile; restart the database # modify the connection
One session of a unix user corresponds to an operating system process.
Windows is embodied in the thread
DBAs should regularly check the database connection to check whether the number of sessions established with the database is normal. If too many connections are established, database resources will be consumed. in addition, DBAs may need to manually clean up some "dead" connections.
The following SQL statements List the sessions created by the current database:
Select sid, serial #, username, program, machine, status
From v $ session;
Output result:
Sid serial # USERNAME PROGRAM MACHINE STATUS
-------------------------------------------------------
1 1 ORACLE. EXE WORK3 ACTIVE
2 1 ORACLE. EXE WORK3 ACTIVE
3 1 ORACLE. EXE WORK3 ACTIVE
4 1 ORACLE. EXE WORK3 ACTIVE
5 3 ORACLE. EXE WORK3 ACTIVE
6 1 ORACLE. EXE WORK3 ACTIVE
7 1 ORACLE. EXE WORK3 ACTIVE
8 27 sys sqlplus. exe workgroup \ WORK3 ACTIVE
11 5 DBSNMP dbsnmp.exe WORKGROUP \ WORK3 INACTIVE
Where,
ID of the SID session (session;
SERIAL # session SERIAL number, which is used together with SID to uniquely identify a session;
USERNAME: the user name used to establish the session;
What tool is used to connect to the database using the PROGRAM session;
STATUS: the STATUS of the current session. ACTIVE indicates that the session is executing some tasks. INACTIVE indicates that the current session has not executed any operations;
If the DBA wants to manually disconnect a session, execute:
Alter system kill session \ 'sid, SERIAL #\';
Note: In the preceding example, sessions with SID ranging from 1 to 7 (the USERNAME column is empty) are the background processes of Oracle. do not perform any operations on these sessions.