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, the database resources will be consumed. At the same time, DBA 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
The ID of the Sid session (Session); serial # session serial number, which is used together with Sid to uniquely identify a session; username is the user name used to establish the session; the tool used by the program session to connect to the database; Status indicates the current session status. Active indicates that the session is executing some tasks, and inactive indicates that the current session has not performed any operations; if the DBA wants to manually disconnect a session, execute: Alter system kill session 'sid, serial # '; note: In the preceding example, the session whose Sid is 1 to 7 (the username column is empty, is the background process of Oracle. do not perform any operations on these sessions.