Process PID

Hi Friends :stuck_out_tongue:
I have a little problem please help me out. I have a Unix based OS Sun Server having oracle 8i as database on it. The server has one client with windows OS. The client uses developer 2000 (GUI) to run query and run processes. I want to know how can I know the PID of a process run from client on unix server and how to kill that process if I give some wrong parameters. Does the query run from client do have some PID also. How to see them if any?
Please Help me. From where I can get more Info on server-client configuration.

Hi,

First step - from the OS, issue the following command:

ps -ef | grep oracle

The second column is the PID.
You can also run "top" and check the column "PID"

second step - run the following query in the database as user SYSTEM:

set pagesize 100
set linesize 1000
COL USERNAME FOR A8
COL MACHINE FOR A22
COL PROGRAM FOR A30
COL OS_USER FOR A8
COL PROCESS FOR A10
COL SPID FOR A6
COL SID FOR A5
SELECT UPPER(s.USERNAME) USERNAME,
UPPER(s.osuser) OS_USER,
UPPER(s.PROGRAM) PROGRAM,UPPER(s.MACHINE) MACHINE,
UPPER(PROCESS) PROCESS,
UPPER(p.spid) SPID,
UPPER(s.sid) SID,
UPPER(s.serial#) ser
FROM V$SESSION s ,
sys.v_$sess_io si,  sys.v_$process p
WHERE
s.username is not null and
si.sid(+)=s.sid
and p.addr(+)=s.paddr
ORDER BY SPID;

The column SPID in this query is equal to PID in the OS.
From this query you'll detect which program/user belong to the OS PID.

Nir

[quote=nir_s]
Hi,

First step - from the OS, issue the following command:

ps -ef | grep oracle

The second column is the PID.

Hi friend & Unix Gurus
Thanks for your kind efforts. But this could not help me as I gives ps -ef | grep oracle, it gives a long listing of processes but none of the process status matches my process run from client (as far as time of start of process is concerned using ps -ef | sort +4 -5). ps -ef is only giving PID's of process run from server rather than client.
Please help.

If your able to get the client IP then

who -u | grep ip

You will see all process attached to that ip.