View Connections to Oracle Databases

Source: Internet
Author: User
Tags dba sessions

The DBA will periodically check the connection to the database to see if the number of sessions established with the database is normal, and if too many connections are established, the resources of the database are consumed. At the same time, some "hang dead" connections may require manual cleanup by the DBA. The following SQL statement lists the sessions established by the current database: Select Sid,serial#,username,program,machine,status
From V$session; The output is: 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 SYS Sqlplus. EXE Workgroup/work3 ACTIVE
One 5 dbsnmp dbsnmp.exe Workgroup/work3 INACTIVE
Where the ID number of the SID session (sessions); The serial number of the serial# session, together with the SID, to uniquely identify a session; USERNAME the user name to establish the session; Program This session is using what tools to connect to the database; Status of the current session, active indicates that the session is performing certain tasks, inactive that the current session is not performing any action; If the DBA is to manually disconnect a session, execute: Alter system kill sessions ' sid,serial# '; Note that in the example above, a session with Sid 1 to 7 (username column null) is a background process for Oracle, and do not take any action on those sessions.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.