(1)See which table is locked
select b.owner,b.object_name,a.session_id,a.locked_mode from vKaTeX parse error: Expected ‘EOF’, got ‘#’ at position 115: …,b.sid,b.serial#̲,logon_time fro…locked_object a,v$session b where a.session_id = b.sid order by b.logon_time;
(3)Kill the corresponding process
Execute the command: alter system kill session ‘1025,41’; (pay attention to the problem of spaces in the middle)
Here is the main point
---Lock table query SQL
SELECT object_name, machine, s.sid, s.serial# ,o.owner
FROM gv$locked_object l, dba_objects o, gv$session s
WHERE l.object_id = o.object_id
AND l.session_id = s.sid;
Use this query to look up the locked object, the locking table device, and the sid and serial
2
--Force process shutdown
alter system kill session '1434, 2425';
Here 1434 and 2425 are the sid and serial of the previous query, respectively
3
--When 'ORA-00030: User session ID does not exist' appears
--query process number
select distinct s.sid,s.serial#,p.spid as system process number
from v$locked_object l , dba_objects o , v$session s , v$process p
where l.object_id=o.object_id and l.session_id=s.sid and s.paddr=p.addr;
4
Log in to the database server using the Xshell tool and execute the following command.
kill -9 system process number
The system process number is the spid queried in the previous step
At this point, the table locking problem can be solved perfectly!
Read More:
- Kettle stores data report ora-00600 to Oracle: internal error parameters [KQD object $], [u], [0], [107], [CS], []
- [Solved] MySQL Lock error: Lock wait timeout exceeded; try restarting transaction ; Lock wait timeout
- How to Fix MySQL error 1005: can’t create table (errno: 150)
- [Mybatis] How to Solve the problem of Oracle query processing more than 1000 in conditions
- C# System.Data.SQLite.SQLiteException:“SQL logic error or missing database no such table: XX”
- Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222)
- [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata
- How to Solve MYSQL ERROR: relation “table_name” does not exist
- How to Solve Mysql8 load data error
- PLSQL environment variable configuration tnsnames.ora file path
- MySQL Error: [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
- Oracle-OrcleInstanctClient Install ODBC Error: Oracle ODBC Driver with same name already exists
- [Solved] Centons7 docker:mysql:5.7 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
- MySQL | ERROR : Every derived table must have its own alias [Solved]
- SQL Server Deletes a table foreign key constraint Error [Solved]
- The attributes of Oracle batch modification sequence (such as cache)_size, increment_(by et al.)
- [Solved] flicksql cdc mysql to kafka Connect Error: org.apache.flink.table.api.ValidationException…
- Oracle creates a job and executes the stored procedure with parameters regularly
- Solve MySQL table can not query, modify, delete and other operations and appear stuck
- MySQL 8.0 error 1114 (HY000): the table’sbtest1’is full (Fixed)