Query disconnect session Oracle

With the Oracle Query disconnect session article, we can disconnect the user session connected to the database, then the end of the session. LOCK session situations in frequently accessed databases occur frequently. With the Oracle Query disconnect session article we provide the solution.

In these cases, it is necessary to identify them with the query available on the article Query to identify which session is determining the LOCK, or with the query on the article Query to see the sessions holding LOCK or with the query available on the article Query to identify the session which is blocking other sessions.

Once the SID that determines the LOCK and the blocked SIDs has been identified, we must deepen the analysis by recovering useful information to be provided to the application group and allowing us to authorize the kill of the session that is causing the block.

The analysis takes place through the query available on the Query article to see the details of a session from SID Once authorized we can proceed with the disconnect of the session.
If that doesn’t work, we can try the kill command instead of the disconnect statement Pay maximum attention to the origin of the session that we have to disconnect, in a RAC the SID can be the same on all instances. SERIAL with SID accurately identify the session we are interested in.

Query to disconnect a session for SID:

select ‘alter system disconnect session ”’||SID||’,’||SERIAL#||”’ immediate;’ from gv$session where SID=&sid; Copy

Query to run the disconnect sessions for SID on RAC environment: select ‘alter system disconnect session’ ” || SID || ‘,’ || SERIAL # || ‘@’ || INST_ID || ‘ immediate; ‘ from gv $ session where SID = & sid; Keep in touch! To view my guides on CRS commands click here! At this LINK, however, you will find SQL queries Stay updated on our activities by joining our community: Facebook Youtube Linkedin   KILL Oracle USER sessions Oracle disconnect session query Query to disconnect a session for SID KILL Oracle USER sessions on RAC LOCK query and number of Oracle sessions Query to identify the sessions blocked by another session Query to see the details of a user’s Oracle session Query sessions processes Oracle cursor transactions Query holders of LOCK Oracle session query retrieved from DATA

Lascia un commento

Wordpress Social Share Plugin powered by Ultimatelysocial