Showing posts with label MS Windows. Show all posts
Showing posts with label MS Windows. Show all posts

Tuesday, January 25, 2011

Finding The Thread ID of a Process on MS Windows

The following outlines how to find the Thread ID of an Oracle process
taking up large amounts of processor time.

1) Go into Performance Monitor (perfmon) in Administrative tools.

2) Click on the '+' icon
In the window that pops up:
In Object - select Thread
In Counter - select %ProcessorTime
In Instance - select all the Oracle sessions

Click ADD

3) Use 'Ctrl H'. This will highlight the first thread
In the bottom window select each thread one at a time until the thread
using all the processor time is highlighted.
Note down the instance number of the thread.

4) Click on the '+' button again
In the window that pops up:
In Object - select Thread
In Counter - select ID Thread
In Instance - select the oracle instance number above

Click ADD

5) In the bottom window, highlight the thread ID added in step 4 and note
the number that appears in the Last/Average/Min and Max boxes. This number will be the same in all 4 boxes and is the process ID.

Then run the following script in SQLPLUS and enter the process ID when
prompted.

SELECT A.USERNAME,
A.OSUSER,
A.PROGRAM,
SPID,
SID,
A.SERIAL#
FROM V$SESSION A, V$PROCESS B
WHERE A.PADDR = B.ADDR AND SPID = '&pid';

Monday, December 27, 2010

Difference Between Processes and Threads

On UNIX
Oracle Database uses a process to implement each of such background tasks as database writer (DBW0), log writer (LGWR), shared server process dispatchers, and shared servers. Each dedicated connection made to the database causes another operating system process to be spawned on behalf of that session.

On Windows
Each background process is implemented as a thread inside a single, large process. For each Oracle Database instance or system identifier, there is one corresponding process for Oracle Database. For example, 100 Oracle Database processes for a database instance on UNIX are handled by 100 threads inside one process on Windows.
All Oracle Database background, dedicated server, and client processes are threads of the master Oracle Database Windows process, and all threads of the Oracle Database process share resources. This multithreaded architecture is highly efficient, allowing fast context switches with low overhead.

To view processes or end individual threads, use Oracle Administration Assistant for Windows. Choose Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Administration Assistant for Windows. Right-click on the SID and connect and then choose Process Information.

Thursday, November 15, 2007

Windows Tips and Tricks

1- Disabling Hibernation

If you don't want to use up the disk space taken by Hibernation, or don't need to use it at all,you can easily disable it.Open up the Control Panel / Power Options icon Click on the Hibernation icon Uncheck Enable Hibernation

2- Increasing System Performance

If you have 512 megs or more of memory, you can increase system performanceby having the core system kept in memory.Start Regedit Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\DisablePagingExecutive Set the value to be 1 Reboot the computer

3- Common Command Console Utilities

WindowsXP comes with quite a few console utilities you can easily run from the command line:Computer Management - compmgmt.mscDisk Managment - diskmgmt.mscDevice Manager - devmgmt.mscDisk Defrag - dfrg.mscEvent Viewer - eventvwr.mscShared Folders - fsmgmt.mscGroup Policies - gpedit.mscLocal Users and Groups - lusrmgr.mscPerformance Monitor - perfmon.mscResultant Set of Policies - rsop.mscLocal Security Settings - secpol.mscServices - services.mscComponent Services - comexp.msc

4- Automatically Ending Non-Responsive Tasks

Start Regedit Go to HKEY_CURRENT_USER\Control Panel\Desktop\AutoEndTasks Set the value to be 1 In the same section, change the WaitToKillAppTimeout to the number of milliseconds you want.

5- Changing the Internet Explorer Title

Start Regedit Go to HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Window Title Enter what you want appear in the title bar