Some Oracle processes have been killed, the state is set to "killed", but the locked resources are not released for a long time, sometimes there is no way to restart the database. Now provides a way to solve this problem, which is not killed in Oracle, in the OS
Level and kill again.
1. The following statement is used to query which objects are locked:
Select object_name,machine,s.sid,s.serial#
From V$locked_object l,dba_objects O, v$session s
where l.object_id = o.object_id and l.session_id=s.sid;
2. The following statement is used to kill a process:
Alter system kill session ' 24,111 '; (24,111 of which are the sid,serial# of the above query)
Note: The above two steps can be performed through the management console of Oracle.
3. If the process state is set to "killed" after killing a process with the above command, but the locked resource is not released for a long time, then the corresponding process (thread) can be killed at the OS level, first executing the following statement to get the process (thread)
No.
Select spid, Osuser, S.program
From V$session s,v$process p
where S.paddr=p.addr and s.sid=24 (24 is the SID above)
4. Kill the process (thread) on the OS:
1) on Unix, execute the command as root:
#kill-9 12345 (that is, the SPID queried in step 3rd)
2) in Windows (also applicable to Unix) to kill threads with Orakill, Orakill is an executable command provided by Oracle with the following syntax:
Orakill SID Thread
which
Sid: Represents the instance name of the process to kill
Thread: Is the number of threads to be killed, that is, the SPID that is queried in step 3rd.
Example: C:>orakill ORCL 12345
[Oracle] Oracle Ultimate Unlock