日期:2014-05-16  浏览次数:20581 次

查找Oracle的后台进程和SGA的大小
格式化
SQL> set line 120
SQL> col PROGRAM for a20
SQL> SET PAGESIZE 25


1.查找ORACLE的后台进程

SQL> select spid,username,program,background
  2  from v$process
  3  where background='1';

SPID         USERNAME        PROGRAM              B
------------ --------------- -------------------- -
652          SYSTEM          ORACLE.EXE (PMON)    1
2188         SYSTEM          ORACLE.EXE (PSP0)    1
2196         SYSTEM          ORACLE.EXE (MMAN)    1
2200         SYSTEM          ORACLE.EXE (DBW0)    1
2204         SYSTEM          ORACLE.EXE (LGWR)    1
2208         SYSTEM          ORACLE.EXE (CKPT)    1
876          SYSTEM          ORACLE.EXE (SMON)    1
2184         SYSTEM          ORACLE.EXE (RECO)    1
1708         SYSTEM          ORACLE.EXE (CJQ0)    1
2180         SYSTEM          ORACLE.EXE (MMON)    1
2164         SYSTEM          ORACLE.EXE (MMNL)    1
2332         SYSTEM          ORACLE.EXE (QMNC)    1
2280         SYSTEM          ORACLE.EXE (q000)    1
904          SYSTEM          ORACLE.EXE (q001)    1

已选择14行。


2.显示SGA
SQL> show sga

Total System Global Area  167772160 bytes
Fixed Size                  1247900 bytes
Variable Size              67110244 bytes
Database Buffers           96468992 bytes
Redo Buffers                2945024 bytes


3.显示SGA的总和
SQL> select sum(value)/1024/1024 "Total SGA MB" from v$sga;

Total SGA MB
------------
        160