Thursday 23 May 2013

ORA-04031: unable to allocate 42680 bytes of shared memory+("large pool",unknown object","session heap","ktspsrchche:L2s")

Error generating process :
------------------------------
ORA-04031: unable to allocate 42680 bytes of shared memory 
("large pool",unknown object","session heap","ktspsrchche:L2s")



Solution:
--------

Issue is related to memory parameters
1)Shared_pool_size
2)large_pool_size
3)log_buffer


we had check the sizes with these queries
SQL>select component,current_size from v$sga_dynamic_components;

SQL> select * from v$sga;
================================
Previously the sizes of are :

large_pool_size big integer 250M
log_buffer integer 30411104
shared_pool_reserved_size big integer 135832K
shared_pool_size big integer 2464M

======================================


Here the when the user is trying to generate the plsql repot from frontend,he is getting the error ORA04031 .application is not able to generate the reports it is hitting the large_pool_size which is not sufficient to generate plsql report.

For this we had asked 30 min outage/downtime from the client.After getting the approval we had down the database.
1)Bring down  middle tier servies

2) Bring down database and database listener
3) make sure that all processes regarding to database are completely down are not.

4)move the spfile so that you can change the parameter in pfile and when you give startup it will seach for
spfile .if it is not found it will start the database with the pfile.
5)We have increase the below parmeters
===============================
large_pool_size big integer 750M
log_buffer integer 30411104
shared_pool_reserved_size big integer 135832K
shared_pool_size big integer 3464M
=========================================

here we had increased large_pool_size and shared_pool_size and we tried to up the database.it starts up smoothy

1)sqlplus '/as sysdba'
2)startup

then check the parameters values 
large_pool_size and shared_pool_size.

verification:
-------------
ping to the user to try to generate plsql reports from front end Application.
here in our case the plsql runs smoothly after changing the memory related parametrs.


Note:you can also change the parameters by using the below commands when database is up and running 
1)alter system set shared_pool_size=3464M scope=spfile
2)alter system set large_pool_size=750M scope=spfile;
but the new values will affected after bouncing the database only.


ex: suppose shared_pool_size=2464M
database up and running.

alter system set shared_pool_size=3464M scope=spfile;
show parameter shared_ppol_size

 it shows 2464M

after bouncing of database the new value will be affected
Bounce the database.

select status from v$instance==>opened
show parameter shared_ppol_size it shows 3464M.

No comments:

Post a Comment