Wednesday 16 May 2012

ORA-00827: could not shrink sga_target to specified value



SQL> show parameter sga

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 24000M
sga_target big integer 24000M

SQL> alter system set sga_max_size=20000M scope=spfile;

System altered.

SQL> shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup

ORACLE instance started.

Total System Global Area 2.3773E+10 bytes
Fixed Size 2126736 bytes
Variable Size 687869040 bytes
Database Buffers 2.3069E+10 bytes
Redo Buffers 14647296 bytes
Database mounted.
Database opened.

SQL> show parameter sga

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 22672M
sga_target big integer 22672M


sga_max_size greter then  20000M even it  have been already  modified   after that i try to modify  sga_target oppps got an error

 SQL> alter system set sga_target=18000M scope=both;
alter system set sga_target=18000M scope=both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00827: could not shrink sga_target to specified value

Then i try to find the  sga sub component size i.e  db_cache_size

SQL> show parameter db_cache_size

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------

db_cache_size big integer 22000M

ohhkkk there is an issue .I shrink first  db_cache_size and after taht i am able to shrink   sga_targe successfully.


SQL> alter system flush buffer_cache;

System altered.


SQL> alter system set db_cache_size=17008M scope=both;

System altered.

SQL> alter system set sga_target=18000M scope=both;

System altered.

SQL> alter system set sga_max_size=20000M scope=spfile;

System altered.

SQL> shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2.0972E+10 bytes
Fixed Size 2121400 bytes
Variable Size 2768240968 bytes
Database Buffers 1.8187E+10 bytes
Redo Buffers 14655488 bytes
Database mounted.
Database opened.
SQL> show parameter sga

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 20000M
sga_target big integer 18000M
SQL>

Now max size also showing  20000M




No comments: