Get the App
SLTechnology News&Howtos  ›  Database  › 

Oralce is always in the process of performing a query operation.

Shulou Source: shulou.com Published: 2022-06-01 16:24:40 10月04日 Update

Background

Suddenly querying a table in the morning could not be queried.

The troubleshooting process to see if the table is locked or the transaction being committed

Select from v$locked_object

Select from v$lock k, v$session s,all_objects

Where k.sid=s.sid and k.id1=all_objects.object_id and k.type in ('TX','TM')

View table status

Select status from dba_objects

Check the connection

Select * from v$session where username =''

Check to see if there is an updated sql

Select sql_text,s.*

From v$session s, v$sqlarea sqlarea

Where s.SQL_ID = sqlarea.sql_id and username =''

Solution process result

No lock table and transaction being committed, table status is normal, connection is normal, no updated sql

Solution

Clear all connections

Kill disconnect at database level

Select terminal,'alter system kill session''| | sid | |','| | serial# | |''; 'from v$session where username =''

Kill drop remote connection at the system level

Ps-ef | grep LOCAL=NO

Then kill drops the process found out.

Matters needing attention

System-level kill drop is to stop all external access, try not to do operations at the system level

It is possible to perform kill operations on all nodes when oracle is rac

Reference:

Https://blog.csdn.net/vic_qxz/article/details/52747919

Http://blog.itpub.net/23718752/viewspace-1880204/

Tags: Levels systems inquiries transactions status processes updates events references situations data databases schemes methods precautions results background nodes solutions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Redmi OPPO Reno Shulou Technology Xiaomi