In sweet memories of my ever loving brother "kutty thambi " ARUN KUMAR

Saturday, August 8, 2009

FINDING PID PROCESS ID USING VIEWS

through SQL*Plus via the following query :

SYS@prod SQL>select b.name bkpr , s.Username spid, p.pid
2 from V$BGPROCESS b, V$SESSION s, V$PROCESS p
3 where p.Addr = b.Paddr(+)
4 and p.Addr = s.Paddr
5 /

BKPR  SPID                                  PID
----- ------------------------------ ----------
PMON 2
PSP0 3
MMAN 4
DBW0 5
ARC0 17
ARC1 18
ARC2 19
LGWR 6
CKPT 7
RVWR 16
SMON 8

BKPR SPID PID
----- ------------------------------ ----------
RECO 9
CJQ0 10
QMNC 20
MMON 11
MMNL 12
28
26
21
27
23
25

BKPR SPID PID
----- ------------------------------ ----------
22
SYS 15
24
29

26 rows selected.

using os linux command in SQL*Plus
(if it is linux os)
ps -ef | grep oracle
or
ps -ef | grep database_name

SYS@prod SQL>!ps -ef | grep prod
oracle 7636 1 0 12:26 ? 00:00:00 ora_pmon_prod
oracle 7638 1 0 12:26 ? 00:00:00 ora_psp0_prod
oracle 7640 1 0 12:26 ? 00:00:00 ora_mman_prod
oracle 7642 1 0 12:26 ? 00:00:00 ora_dbw0_prod
oracle 7644 1 0 12:26 ? 00:00:00 ora_lgwr_prod
oracle 7646 1 0 12:26 ? 00:00:00 ora_ckpt_prod
oracle 7648 1 0 12:26 ? 00:00:00 ora_smon_prod
oracle 7650 1 0 12:26 ? 00:00:00 ora_reco_prod
oracle 7652 1 0 12:26 ? 00:00:00 ora_cjq0_prod
oracle 7654 1 0 12:26 ? 00:00:00 ora_mmon_prod
oracle 7656 1 0 12:26 ? 00:00:00 ora_mmnl_prod
oracle 7658 1 0 12:26 ? 00:00:00 ora_d000_prod
oracle 7660 1 0 12:26 ? 00:00:00 ora_s000_prod
oracle 7663 1 0 12:26 ? 00:00:00 ora_rvwr_prod
oracle 7664 7633 0 12:26 ? 00:00:00 oracleprod (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 7666 1 0 12:26 ? 00:00:00 ora_arc0_prod
oracle 7668 1 0 12:26 ? 00:00:00 ora_arc1_prod
oracle 7672 1 0 12:26 ? 00:00:00 ora_qmnc_prod
oracle 7688 1 0 12:26 ? 00:00:00 ora_q000_prod
oracle 7690 1 0 12:26 ? 00:00:00 ora_q001_prod
oracle 8049 1 3 13:42 ? 00:00:00 ora_j000_prod
oracle 8050 7633 1 13:42 pts/1 00:00:00 -bin/tcsh -c ps -ef | grep prod
oracle 8063 8050 0 13:42 pts/1 00:00:00 grep prod


Thank you,

No comments:

free counters
 
Share/Bookmark