[笔记]--Oracle修改SGA大小

1、通过spfile修改 

  (1)使用SYS用户以SYSDBA身份登录系统

  (2)查看修改前sga_max_size,sga_target大小

    show parameter sga_max_size;

    show parameter sga_target;

  (3)修改参数

    alter system set sga_max_size=1600m scope=spfile;

    alter system set sga_target=1600m scope=spfile;

  备注:alter system set sga_target=1600m scope=spfile;后面必须要加scope=spfile,指定修改Spfile。否则会报“无法修改初始化参数”的错。

2、通过pfile参数修改

   (1)创建pfile,创建后在c:/oracle/product/10.1.0/db_1/database目录下面多1个文件INITorcl.ORA

    SQL>create pfile from spfile

  (2)修改pfile内容,用写字板打开文件

    修改后主要内容为
    sga_target=1700000000(1.7G左右)
    lock_sga=true
    pga_aggregate_tagert=250000000(250M左右)
    workarea_size_policy=auto
    pre_page_sga=true
    sga_max_size=1720000000(1.72G左右)

  (3)根据pfile启动数据库

    SQL>startup pfile='c:/oracle/product/10.1.0/db_1/database/INITorcl.ORA'

参考文档:

原文地址:https://www.cnblogs.com/lizhishugen/p/3167608.html