Original link: http://www.eygle.com/faq/use.nt.tools.manage.Oracle.htm 1.top
The TOP tool can monitor the process ID of the most consumable system resource, Windows is a multi-thread server, each process contains a series of threads, this is different from UNIX, and the Unix is independently exists, all threads on NT are in the Oralce process derivative. So only use the TOP tool we can't find the user process for each connection.
71% 00000000? 1? 16384? 0? 8: 52: 53.936 No name Found
0% 00000008? 4116? 282624? 24576? 0: 00: 45.164 SYSTEM
1% 000000B8? 27023? 991232 2207744? 0: 03: 10.313 CSRSS.EXE
0% 00000524? 1844 2035712 3137536? 0: 00: 11.726 Rundll32.exe
0% 0000032C? 1002 1765376 1380352? 0: 00: 08.432 Aom.exe
0% 000004E8? 773695 7610368 8146944? 0: 04: 26.533 xdict.exe
0% 00000720? 583880 5079040 33280000? 0: 08: 29.122 Netcaptor.exe
23% 000006F4? 11882 37056512 79757312? 0: 00: 07.661 Oracle.exe
0% 00000420? 1622 1478656 2420736? 0: 00: 00.170 SQLPlus.exe
If the SQL or other issues of a process caused for a certain process of SQL or other issues, such as the following statement, how do we find this problem SQL?
2.qslice
Find the most resource-consumable thread number, this example is (6ec), for 16, need to convert, the process ID in the V $ Process view is decimal
Use the getSql.sql script to get the currently executable SQL statement:
Rem getsql.sql
Rem Author Eygle
REM on Windows, known process ID, get the statement currently executing
REM on Windows, the process ID is 16, need to be converted, in Direct 10 in the UNIX
SELECT / * Ordered * /
SQL_Text
From v $ sqltext a
WHERE (A.hash_Value, A.Address) in (
Select decode (SQL_HASH_VALUE,
0, prev_hash_value,
SQL_HASH_VALUE
),
Decode (SQL_HASH_VALUE, 0, prev_sql_addr, sql_address)
From v $ session b
Where b.paddr = (SELECT ADDR
From v $ process c
WHERE C.SPID = TO_NUMBER ('& pid', 'xxxx'))))))))
ORDER by Piece ASC
/
Run the above script:
OK, find this most resource-consumable problem SQL next to adjust the targeted adjustment.
Related tools download address:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/qslice-o.asp