Oracle的SGA與PGA


一、SGA(system global area )

SGA可以認為是instance中的全局共享區,Instance是由SGA和processes(進程)組成。

 

官方文檔中的解釋:
     A system global area (SGA)(系統全局區) is a group of shared memory structures that contain
data and control information for one Oracle database instance(實例). If multiple users areconcurrently connected to the same instance, then the data in the instance's SGA is sharedamong the users. Consequently(因此), the SGA is sometimes called the shared global area(共享全局區).

     An SGA and Oracle processes constitute(構成) an Oracle instance. Oracle automaticallyallocates(分配) memory for an SGA when you start an instance, and the operating systemreclaims(收回) the memory when you shut down the instance. Each instance has its own SGA.

     The SGA is read/write. All users connected to a multiple-process database instance can readinformation contained within the instance's SGA, and several processes write to the SGA during execution of Oracle.

查看SGA:

    SQL>show parameter sga
    SQL>show sga
    SQL>select * From v$sga;

二、PGA(Process Global Area 或Private Global Area )

      PGA可以認為是為連接上數據庫的用戶開的一個私有內存區。PGA包含一個服務進程的數據和控制信息,在一個服務進程啟動時創建

     1 查看PGA
        show parameter pga;

        

2 修改PGA
         alter system set pga_aggregate_target=90M scope=both;



 

其中:
    pga_aggregate_target是一個動態參數,可以在運行時修改,因此這里的scope設置為both,新的內存大小馬上生效,並且還將修改保存在Oracle的啟動文件里。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM