Home » RDBMS Server » Performance Tuning » auto execute of job_error_ORA-12012,ORA-04031 (oracle,10.2.0.4.0,Linux)
auto execute of job_error_ORA-12012,ORA-04031 [message #465165] Tue, 13 July 2010 01:27 Go to next message
sathik
Messages: 196
Registered: August 2009
Location: INDIA
Senior Member
Everyday in the alert log file getting the below error.No application background and schedule jobs are running.Kindly help me in this regard.I have attached trace file.

Errors in file /usr/oracle/admin/database_name/bdump/database_name_j002_27356.trc:
ORA-12012: error on auto execute of job 9009
ORA-04031: unable to allocate ORA-04031: unable to allocate 63080 bytes of shared memory ("shared pool","DBMS_STATS","PL/SQL MPCODE","BAMIMA: Bam Buffer")
bytes of shared memory ("","","","")

I have attached trace file.

while run AWR report i am getting the below error.

The default report file name is awrrpt_1_18618_18620.txt. To use this name,
press <return> to continue, otherwise enter an alternative.

Enter value for report_name: /tmp/awr_database_name.txt

Using the report name /tmp/awr_database_name.txt
select output from table(dbms_workload_repository.awr_report_text( :dbid,
*
ERROR at line 1:
ORA-04031: unable to allocate 95784 bytes of shared memory ("shared
pool","DBMS_SWRF_REPORT_INTERNAL","PL/SQL MPCODE","BAMIMA: Bam Buffer")
ORA-06508: PL/SQL: could not find program unit being called:
"SYS.DBMS_SWRF_REPORT_INTERNAL"
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 283
ORA-06512: at line 1
Re: auto execute of job_error_ORA-12012,ORA-04031 [message #465171 is a reply to message #465165] Tue, 13 July 2010 01:46 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-04031: unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\",\"%s\")
 *Cause:  More shared memory is needed than was allocated in the shared
          pool.
 *Action: If the shared pool is out of memory, either use the
          dbms_shared_pool package to pin large packages,
          reduce your use of shared memory, or increase the amount of
          available shared memory by increasing the value of the
          INIT.ORA parameters "shared_pool_reserved_size" and
          "shared_pool_size".
          If the large pool is out of memory, increase the INIT.ORA
          parameter "large_pool_size".

Regards
Michel
Re: auto execute of job_error_ORA-12012,ORA-04031 [message #465173 is a reply to message #465165] Tue, 13 July 2010 01:47 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
ORA-04031: unable to allocate string bytes of shared memory
("string","string","string","string") 
Cause: More shared memory is needed than was allocated in the
shared pool.
 
Action: If the shared pool is out of memory, either use the
dbms_shared_pool package to pin large packages, reduce your use
of shared memory, or increase the amount of available shared 
memory by increasing the value of the INIT.ORA 
parameters "shared_pool_reserved_size" and "shared_pool_size". 
If the large pool is out of memory, increase the INIT.ORA 
parameter "large_pool_size".



Its time to call DBA.
Re: auto execute of job_error_ORA-12012,ORA-04031 [message #465186 is a reply to message #465173] Tue, 13 July 2010 02:49 Go to previous messageGo to next message
sathik
Messages: 196
Registered: August 2009
Location: INDIA
Senior Member
This is my sga details.could you please suggest me how much memory need to be added to shared_pool_size or shared_pool_reserved_size to run the job without error.
SQL> show parameter shared

NAME_COL_PLUS_SHOW_PARAM TYPE VALUE_COL_PLUS_SHOW_PARAM
------------------------- ----------- -------------------------
hi_shared_memory_address integer 0
max_shared_servers integer
shared_memory_address integer 0
shared_pool_reserved_size big integer 6710886
shared_pool_size big integer 128M
shared_server_sessions integer
shared_servers integer 0
SQL> show parameter sga_targ

NAME_COL_PLUS_SHOW_PARAM TYPE VALUE_COL_PLUS_SHOW_PARAM
------------------------- ----------- -------------------------
sga_target big integer 0
SQL> show parameter sga_max

NAME_COL_PLUS_SHOW_PARAM TYPE VALUE_COL_PLUS_SHOW_PARAM
------------------------- ----------- -------------------------
sga_max_size big integer 456M

SQL> show sga

Total System Global Area 478150656 bytes
Fixed Size 2084904 bytes
Variable Size 201330648 bytes
Database Buffers 268435456 bytes
Redo Buffers 6299648 bytes
Re: auto execute of job_error_ORA-12012,ORA-04031 [message #465190 is a reply to message #465186] Tue, 13 July 2010 02:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It is the SGA content at error time that is important.
Execute your jobs when there is low workload.
Ensure that your applications use bind variables.

Anyway 128M for shared pool and 456M for the whole SGA are really tiny (this is about my settings on my laptop).
Increase sga_max_size, remove other settings (including buffer cache) and let Oracle chooses the best ones.

Regards
Michel
Re: auto execute of job_error_ORA-12012,ORA-04031 [message #465390 is a reply to message #465190] Wed, 14 July 2010 01:20 Go to previous messageGo to next message
sathik
Messages: 196
Registered: August 2009
Location: INDIA
Senior Member
Hi
i am getting error even while run awrrpt.sql.At that time shared pool had 40mb of free space.even then i am getting below error.can you please clarify why we are getting this error when we have 40mb free space is shared pool.
ERROR at line 1:
ORA-04031: unable to allocate 95784 bytes of shared memory ("shared
pool","DBMS_SWRF_REPORT_INTERNAL","PL/SQL MPCODE","BAMIMA: Bam Buffer")
ORA-06508: PL/SQL: could not find program unit being called:
"SYS.DBMS_SWRF_REPORT_INTERNAL"
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 283
ORA-06512: at line 1

Re: auto execute of job_error_ORA-12012,ORA-04031 [message #465396 is a reply to message #465173] Wed, 14 July 2010 01:35 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
rahulvb wrote on Tue, 13 July 2010 01:47

Its time to call DBA.


Call DBA.
Re: auto execute of job_error_ORA-12012,ORA-04031 [message #465404 is a reply to message #465396] Wed, 14 July 2010 01:43 Go to previous message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe not sufficient CONTIGUOUS space.

Read againt my previous post and do what is said.

Regards
Michel
Previous Topic: Tools for Database Tuning v/s Instance Tuning
Next Topic: TRACE SESSION USING DBMS_APPLICATION_INFO
Goto Forum:
  


Current Time: Sat May 04 01:26:10 CDT 2024