How to drop a single Oracle thread in the Windows 2000 environment

zhaozj2021-02-16  44

How to drop a single Oracle thread in the Windows 2000 environment

Source: http://metalink.oracle.com

Keywords: Oracle Thread Kill

Description: This article describes the use of Orakill tools in a Windows environment.

text:

Have you encountered a similar situation below? A user process takes up a long-term resource without releasing, causing an Oracle process to occupy a large resource of the system, the efficiency of the Oralce system becomes low. If you simply turn off the Oracle instance, it is bound to affect all users. Is there a way only Kill's problematic user process without closing the entire Oralce instance? The answer is ok, using an ORAKILL that is provided by Oralce.

Everyone knows that Windows 2000 is a thread-based operating system instead of a process-based operating system as unix, Linux. The entire Oracle's background process, user process, etc., in Windows 2000 environments, is included in an independent system process of Oracle.exe, and can be seen by viewing the 'Task Manager' - 'Process'. If you are not using the MTS multi-thread server mode, if you kill out the Oracle.exe process, the entire Oracle instance will cause the entire Oracle instance to shut down, just like using the shutdown abort command.

Since Windows did not mention a tool specifically to kill a single thread, Oracle started from Oracle7.3.3.6, provided a buffer-based interface-based tool to force Kill to enforce KILL in a Windows environment - ORAKILL.

The method of use ORAKILL is as follows:

DOS prompt:> Orakill Sid Thread

Description: SID Oracle SID

Thread Oracle Thread ID Number

Inside the SQL * PLUS tool, you can check the Oracle thread number.

SQL:> SELECT P.SPID Threadid, S.OSuser, S.Program

SQL:> From V $ Process P, V $ Session S

SQL:> where p.addr = s.addr

The results are as follows:

Threadid Osuser Program

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -----------

169 System Oracle.exe

215 System Oracle.exe

280 System Oracle.exe

267 System Oracle.exe

287 System Oracle.exe

288 system oracle.exe

271 System Oracle.exe

282 System Oracle.exe

266

269

239 prod_nt / djones svrmgrl.exe

281 ssmith-pc / ssmith sqlplusw.exe

12 rows selected.

It should be noted that if you kill off is Oracle's core background thread (DBWR, LGWR, SMON OR PMON), will cause the Oracle instance to shut down. Checking Oracle's core background threads as follows: SQL:> Select vb.name Nome, vp.program processname, vp.spid threadid, vs, sid sid

SQL:> From v $ session vs, V $ Process VP, V $ BGPROCESS VB

SQL:> Where vb.addr <> 00 'and

SQL:> vb.paddr = vp.addr and

SQL:> vp.addr = vs.paddr

The results of the query are as follows:

Nome ProcessName Threadid SID

----------------------------------------------- -----

PMON Oracle.exe 169 1

DBW0 Oracle.exe 215 2

LGWR Oracle.exe 280 3

Ckpt Oracle.exe 267 4

SMON Oracle.exe 287 5

Reco oracle.exe 288 6

SNP0 Oracle.exe 271 7

Snp1 oracle.exe 282 8

Rows SELECTED.

Welcome everyone to exchange mailto: stevenqiu@sohu.com

转载请注明原文地址:https://www.9cbs.com/read-25056.html

New Post(0)