tcorigli
asked on
ORA-04031: unable to allocate 4096 bytes of shared memory ("java pool","unknown object","joxs heap","Intern")
When I try to install java on oracle (10g Release 10.2.0.2.0) I receive the following error message:
SQL> spool initjvm.log
SQL> @initjvm.sql
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Package created.
Package body created.
No errors.
Call completed.
Call completed.
Call completed.
Table created.
Table created.
Table created.
Index created.
Index created.
Index created.
Package created.
Package body created.
Package created.
Package body created.
Call completed.
PL/SQL procedure successfully completed.
alter system flush shared_pool
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
create or replace java system
begin if initjvmaux.startstep('CREA TE_JAVA_SY STEM') then
*
ERROR at line 1:
ORA-04031: unable to allocate 4096 bytes of shared memory ("java pool","unknown
object","joxs heap","Intern")
ORA-06512: at "SYS.INITJVMAUX", line 23
ORA-06512: at line 5
Disconnected from Oracle Database 10g Release 10.2.0.2.0 - Production
C:\Oracle\ora10g\javavm\in stall>
Thanks in advance
SQL> spool initjvm.log
SQL> @initjvm.sql
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Package created.
Package body created.
No errors.
Call completed.
Call completed.
Call completed.
Table created.
Table created.
Table created.
Index created.
Index created.
Index created.
Package created.
Package body created.
Package created.
Package body created.
Call completed.
PL/SQL procedure successfully completed.
alter system flush shared_pool
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
create or replace java system
begin if initjvmaux.startstep('CREA
*
ERROR at line 1:
ORA-04031: unable to allocate 4096 bytes of shared memory ("java pool","unknown
object","joxs heap","Intern")
ORA-06512: at "SYS.INITJVMAUX", line 23
ORA-06512: at line 5
Disconnected from Oracle Database 10g Release 10.2.0.2.0 - Production
C:\Oracle\ora10g\javavm\in
Thanks in advance
ASKER
SQL> show parameter java_pool_size
NAME TYPE VALUE
-------------------------- ---------- ----------- -------------------------- ----
java_pool_size big integer 0
SQL>
NAME TYPE VALUE
--------------------------
java_pool_size big integer 0
SQL>
Cool. Looks like you might be using Automatic Memory Management.
What are the results of:
show parameter shared_pool_size
show parameter sga_max_size
show parameter sga_target
show parameter pga_aggregate_target
What are the results of:
show parameter shared_pool_size
show parameter sga_max_size
show parameter sga_target
show parameter pga_aggregate_target
ASKER
SQL> show parameter java_pool_size
NAME TYPE VALUE
-------------------------- ---------- ----------- -------------------------- ----
java_pool_size big integer 0
SQL> show parameter shared_pool_size
NAME TYPE VALUE
-------------------------- ---------- ----------- -------------------------- ----
shared_pool_size big integer 200M
SQL> show parameter sga_max_size
NAME TYPE VALUE
-------------------------- ---------- ----------- -------------------------- ----
sga_max_size big integer 332M
SQL> show parameter sga_target
NAME TYPE VALUE
-------------------------- ---------- ----------- -------------------------- ----
sga_target big integer 0
SQL> show parameter pga_aggregate_target
NAME TYPE VALUE
-------------------------- ---------- ----------- -------------------------- ----
pga_aggregate_target big integer 145M
SQL>
NAME TYPE VALUE
--------------------------
java_pool_size big integer 0
SQL> show parameter shared_pool_size
NAME TYPE VALUE
--------------------------
shared_pool_size big integer 200M
SQL> show parameter sga_max_size
NAME TYPE VALUE
--------------------------
sga_max_size big integer 332M
SQL> show parameter sga_target
NAME TYPE VALUE
--------------------------
sga_target big integer 0
SQL> show parameter pga_aggregate_target
NAME TYPE VALUE
--------------------------
pga_aggregate_target big integer 145M
SQL>
The installation docs for installing Java in Oracle should have minimum requirements. Even if you meet the minimum, it might not be enough depending on what else is running.
I would increase the sga_max_size and shared_pool_size parameters.
I would increase the sga_max_size and shared_pool_size parameters.
The Parameter called sga_target affecting here.
Choice you have:-
1)
Decrease Shared_pool_size parameter, you can set it to 0, try this if not success then go for 2nd choice.
Or
2)
Increase sga_max_size, sga_target to some large value
Choice you have:-
1)
Decrease Shared_pool_size parameter, you can set it to 0, try this if not success then go for 2nd choice.
Or
2)
Increase sga_max_size, sga_target to some large value
To overcome this problem create a PFILE from the SPFILE:
SQL>create pfile='/u03/init.ora' from spfile;
Open and edit this file:
increase max_sga_size, java_pool_size, shared_pool_size
Open the DB for migration so:
SQL>shutdown immediate
...
SQL>startup migrate pfile=/u03/init.ora
SQL>create pfile='/u03/init.ora' from spfile;
Open and edit this file:
increase max_sga_size, java_pool_size, shared_pool_size
Open the DB for migration so:
SQL>shutdown immediate
...
SQL>startup migrate pfile=/u03/init.ora
or
ALTER SYSTEM SET SGA_MAX_SIZE=nM SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=nM SCOPE=SPFILE
ALTER SYSTEM SET SHARED_POOL_SIZE='nM' scope=spfile;
shutdown immediate;
startup;
ALTER SYSTEM SET SGA_MAX_SIZE=nM SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=nM SCOPE=SPFILE
ALTER SYSTEM SET SHARED_POOL_SIZE='nM' scope=spfile;
shutdown immediate;
startup;
ashilo,
I believe those parameters have already been covered.
Also, no need to increase java_pool_size. If not set it is taken from shared_pool_size.
>>To overcome this problem create a PFILE from the SPFILE:
Unnecessary. Just alter the spfile directly with the commands in your second post.
I believe those parameters have already been covered.
Also, no need to increase java_pool_size. If not set it is taken from shared_pool_size.
>>To overcome this problem create a PFILE from the SPFILE:
Unnecessary. Just alter the spfile directly with the commands in your second post.
slightwv : i found that sometimes it is necesery to set memory parameters to minimum value in order not to run out of memory when needed.
but hi all CREDIT to you.
but hi all CREDIT to you.
ASKER
SQL> ALTER SYSTEM SET SGA_MAX_SIZE=996 SCOPE=SPFILE;
System altered.
SQL> ALTER SYSTEM SET SGA_TARGET=10 SCOPE=SPFILE;
System altered.
SQL> ALTER SYSTEM SET SHARED_POOL_SIZE=600 scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORA-00821: Specified value of sga_target 4M is too small, needs to be at least 160M
SQL> ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE
*
ERROR at line 1:
ORA-01034: ORACLE not available
SQL> ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE
*
ERROR at line 1:
ORA-01034: ORACLE not available
SQL> startup;
ORA-00093: _shared_pool_reserved_min_ alloc must be between 4000 and 0
SQL> startup;
ORA-00093: _shared_pool_reserved_min_ alloc must be between 4000 and 0
SQL> startup;
ORA-00093: _shared_pool_reserved_min_ alloc must be between 4000 and 0
SQL> startup mount
ORA-00093: _shared_pool_reserved_min_ alloc must be between 4000 and 0
SQL> startup mount;
ORA-00093: _shared_pool_reserved_min_ alloc must be between 4000 and 0
SQL> startup mount;
ORA-00093: _shared_pool_reserved_min_ alloc must be between 4000 and 0
SQL> startup;
ORA-00093: _shared_pool_reserved_min_ alloc must be between 4000 and 0
SQL> startup;
ORA-00093: _shared_pool_reserved_min_ alloc must be between 4000 and 0
SQL> startup mount;
ORA-00093: _shared_pool_reserved_min_ alloc must be between 4000 and 0
SQL>
What should I do now?
System altered.
SQL> ALTER SYSTEM SET SGA_TARGET=10 SCOPE=SPFILE;
System altered.
SQL> ALTER SYSTEM SET SHARED_POOL_SIZE=600 scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORA-00821: Specified value of sga_target 4M is too small, needs to be at least 160M
SQL> ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE
*
ERROR at line 1:
ORA-01034: ORACLE not available
SQL> ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE
*
ERROR at line 1:
ORA-01034: ORACLE not available
SQL> startup;
ORA-00093: _shared_pool_reserved_min_
SQL> startup;
ORA-00093: _shared_pool_reserved_min_
SQL> startup;
ORA-00093: _shared_pool_reserved_min_
SQL> startup mount
ORA-00093: _shared_pool_reserved_min_
SQL> startup mount;
ORA-00093: _shared_pool_reserved_min_
SQL> startup mount;
ORA-00093: _shared_pool_reserved_min_
SQL> startup;
ORA-00093: _shared_pool_reserved_min_
SQL> startup;
ORA-00093: _shared_pool_reserved_min_
SQL> startup mount;
ORA-00093: _shared_pool_reserved_min_
SQL>
What should I do now?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've requested that this question be deleted for the following reason:
not needed anymore
not needed anymore
Just because you don't need this anymore doesn't mean we did not answer your question.
Please post your final solution and if it wasn't covered here, I'll retract my objection.
Please post your final solution and if it wasn't covered here, I'll retract my objection.
you want to close your 2 question!!
(Another is https://www.experts-exchange.com/questions/27031282/How-to-execute-a-command-on-the-command-line-of-a-Windows-OS-through-a-Oracle-DB-Trigger.html?cid=238)
Really you didn't get any hint or solution from EE for both of these two?
(Another is https://www.experts-exchange.com/questions/27031282/How-to-execute-a-command-on-the-command-line-of-a-Windows-OS-through-a-Oracle-DB-Trigger.html?cid=238)
Really you didn't get any hint or solution from EE for both of these two?
post the results of the following from sqlplus: show parameter java_pool_size