When you are assigned to a task where you have to monitor a particular bulk DML Transaction to see how many rows were updated/deleted/inserted on a particular table, Follow the steps below for successfully completing this task.
( The database version used is 10.2.0.1)
1. Select the count of present DML operations values from DBA_TAB_MODIFICATIONS
SQL> select * from dba_tab_modifications where table_owner='XXX' and table_name='YYYY';
For Example, you are asked to monitor a bulk insert program to find out at a particular time how many rows were inserted.
In this example we used XXDATA table
Take the count of the present values
SQL> select * from dba_tab_modifications where table_name='XXDATA';
TABLE_OWNER TABLE_NAME
------------------------------ ------------------------------
PARTITION_NAME SUBPARTITION_NAME INSERTS
------------------------------ ------------------------------ ----------
UPDATES DELETES TIMESTAMP TRU DROP_SEGMENTS
---------- ---------- --------- --- -------------
DEMO XXDATA
272645
0 0 10-JUL-08 NO 0
So now the initial inserts value is 272645
2. Now start your bulk insert
3. Now monitor the Inserts using the following process
Use the dbms.stats_flush_database_monitoring_info to flush the statistics from memory into DBA_TAB_MODIFICATIONS table as shown below
SQL> exec dbms_stats.flush_database_monitoring_info;
PL/SQL procedure successfully completed.
Now take the count of the number of inserts by querying the dbs_tab_modifications
SQL> select * from dba_tab_modifications where table_name='XXDATA';
TABLE_OWNER TABLE_NAME
------------------------------ ------------------------------
PARTITION_NAME SUBPARTITION_NAME INSERTS
------------------------------ ------------------------------ ----------
UPDATES DELETES TIMESTAMP TRU DROP_SEGMENTS
---------- ---------- --------- --- -------------
DEMO XXDATA
1059999
0 0 10-JUL-08 NO 0
So the Total inserts 787354 (1059999-272645)
Blog Archive
-
▼
2008
(9)
-
▼
July
(8)
- Monitoring DML ( Insert/Update/Delete) Operations ...
- Table Rename - What Happens to the Indexes,constra...
- Monitoring the Space Usage in TEMPORARY tablespace
- Resizing a temporary tablespace TEMP
- Monitoring the Oracle Database - "Processes" Initi...
- How to Enable / Disable Archive log Mode in 10g
- How to Increase the OC4J JVM heap size in Oracle A...
- How to Increase the JVMs for an OC4J Instance in R12
-
▼
July
(8)
Thursday, July 10, 2008
Wednesday, July 9, 2008
Table Rename - What Happens to the Indexes,constraints and select queries running against the Table
I was just doing some R&D to find out whatz happenning when we are renaming a table name from X to Y.
The following are my observations
1. I got a table called numbers_1 which got 1900002 rows as shown below
SQL> show user;
USER is "DEMO"
SQL>select count(*) from numbers_1;
COUNT(*)
----------
1900002
2. Started a select query from numbers_1 as shown below
SQL>select * from numbers_1;
THis query is running...
I logged-in in another window as demo user Renamed the numbers_1 to numbers.
The select query is still running.
This is captured in the following video.
3. The Constraints, Indexes built on the original table are also reflected with the new table name.
This is as shown below Before and after Rename of EMP table:
SQL> select constraint_name,table_name from user_constraints;
CONSTRAINT_NAME TABLE_NAME
------------------------------ ------------------------------
FK_DEPTNO EMP
PK_DEPT DEPT
PK_EMP EMP
SQL> select index_name,table_name from user_indexes;
INDEX_NAME TABLE_NAME
------------------------------ ------------------------------
PK_DEPT DEPT
IDX_NUM1 NUMBERS_1
PK_EMP EMP
SQL> alter table emp rename to NEW_EMP;
Table altered.
SQL>select constraint_name,table_name from user_constraints;
CONSTRAINT_NAME TABLE_NAME
------------------------------ ------------------------------
FK_DEPTNO NEW_EMP
PK_DEPT DEPT
PK_EMP NEW_EMP
SQL> select index_name,table_name from user_indexes;
INDEX_NAME TABLE_NAME
------------------------------ ------------------------
PK_DEPT DEPT
IDX_NUM1 NUMBERS_1
PK_EMP NEW_EMP
Note: But the PL/SQL packages which has the references to the old table name becomes invalid after the Table rename.
The following are my observations
1. I got a table called numbers_1 which got 1900002 rows as shown below
SQL> show user;
USER is "DEMO"
SQL>select count(*) from numbers_1;
COUNT(*)
----------
1900002
2. Started a select query from numbers_1 as shown below
SQL>select * from numbers_1;
THis query is running...
I logged-in in another window as demo user Renamed the numbers_1 to numbers.
The select query is still running.
This is captured in the following video.
3. The Constraints, Indexes built on the original table are also reflected with the new table name.
This is as shown below Before and after Rename of EMP table:
SQL> select constraint_name,table_name from user_constraints;
CONSTRAINT_NAME TABLE_NAME
------------------------------ ------------------------------
FK_DEPTNO EMP
PK_DEPT DEPT
PK_EMP EMP
SQL> select index_name,table_name from user_indexes;
INDEX_NAME TABLE_NAME
------------------------------ ------------------------------
PK_DEPT DEPT
IDX_NUM1 NUMBERS_1
PK_EMP EMP
SQL> alter table emp rename to NEW_EMP;
Table altered.
SQL>select constraint_name,table_name from user_constraints;
CONSTRAINT_NAME TABLE_NAME
------------------------------ ------------------------------
FK_DEPTNO NEW_EMP
PK_DEPT DEPT
PK_EMP NEW_EMP
SQL> select index_name,table_name from user_indexes;
INDEX_NAME TABLE_NAME
------------------------------ ------------------------
PK_DEPT DEPT
IDX_NUM1 NUMBERS_1
PK_EMP NEW_EMP
Note: But the PL/SQL packages which has the references to the old table name becomes invalid after the Table rename.
Monitoring the Space Usage in TEMPORARY tablespace
Temporary tablespace is used for all the sorting operations. If the temporary tablespace is not sufficient enough, then you will get the ' unable to extend temp segment by %s bytes' error.
If you want to Monitor the Space Utilization in TEMPORARY tablespace proactively to avoid the space issues then follow the process mentioned below to effectively monitor the TEMPORARY space utilization
1. Find the Temporary tablespace names and the block size using the following SQL
SQL> select tablespace_name,block_size from dba_tablespaces where tablespace_nam
e like '%TEMP%';
TABLESPACE_NAME BLOCK_SIZE
------------------------------ ----------
TEMP 8192
From the above command it is clear that we have only one TEMPORARY tablespace 'TEMP' withe the block size as 8192
2. Find out what is the total size of the TEMPORARY segment and how much space being utilized and how much free space is left for the future sort operations using the following SQL ( calculated with the 8192 block size)
SQL> select tablespace_name,total_blocks*8192/1024/1024 as total_MB,
2 used_blocks*8192/1024/1024 used_MB,
3 free_blocks*8192/1024/1024 free_MB from v$sort_segment;
TABLESPACE_NAME TOTAL_MB USED_MB FREE_MB
------------------------------- ---------- ---------- ----------
TEMP 44 0 44
From the above output
Total size is 44 MB
Used is 0 MB
Free space 44 MB
Make sure that there is always a free space available to accommodate the future sort operations.
3. If you want to know who is using the temporary tablespace at the moment , then run the following SQL to know who is using the temporary tablespace.
SELECT b.tablespace, b.segfile#, b.segblk#, b.blocks, a.sid, a.serial#,
a.username, a.osuser, a.status
FROM v$session a,v$sort_usage b
WHERE a.saddr = b.session_addr
ORDER BY b.tablespace, b.segfile#, b.segblk#, b.blocks;
SQL>
TABLESPACE SEGFILE# SEGBLK# BLOCKS SID
------------------------------- ---------- ---------- ---------- ----------
SERIAL# USERNAME OSUSER
---------- ------------------------------ ------------------------------
STATUS
--------
TEMP 201 5513 5632 144
170 DEMO US\smarampelly
ACTIVE
If you want to Monitor the Space Utilization in TEMPORARY tablespace proactively to avoid the space issues then follow the process mentioned below to effectively monitor the TEMPORARY space utilization
1. Find the Temporary tablespace names and the block size using the following SQL
SQL> select tablespace_name,block_size from dba_tablespaces where tablespace_nam
e like '%TEMP%';
TABLESPACE_NAME BLOCK_SIZE
------------------------------ ----------
TEMP 8192
From the above command it is clear that we have only one TEMPORARY tablespace 'TEMP' withe the block size as 8192
2. Find out what is the total size of the TEMPORARY segment and how much space being utilized and how much free space is left for the future sort operations using the following SQL ( calculated with the 8192 block size)
SQL> select tablespace_name,total_blocks*8192/1024/1024 as total_MB,
2 used_blocks*8192/1024/1024 used_MB,
3 free_blocks*8192/1024/1024 free_MB from v$sort_segment;
TABLESPACE_NAME TOTAL_MB USED_MB FREE_MB
------------------------------- ---------- ---------- ----------
TEMP 44 0 44
From the above output
Total size is 44 MB
Used is 0 MB
Free space 44 MB
Make sure that there is always a free space available to accommodate the future sort operations.
3. If you want to know who is using the temporary tablespace at the moment , then run the following SQL to know who is using the temporary tablespace.
SELECT b.tablespace, b.segfile#, b.segblk#, b.blocks, a.sid, a.serial#,
a.username, a.osuser, a.status
FROM v$session a,v$sort_usage b
WHERE a.saddr = b.session_addr
ORDER BY b.tablespace, b.segfile#, b.segblk#, b.blocks;
SQL>
TABLESPACE SEGFILE# SEGBLK# BLOCKS SID
------------------------------- ---------- ---------- ---------- ----------
SERIAL# USERNAME OSUSER
---------- ------------------------------ ------------------------------
STATUS
--------
TEMP 201 5513 5632 144
170 DEMO US\smarampelly
ACTIVE
Resizing a temporary tablespace TEMP
If you want to increase/resize the temporary tablespace TEMP which is having a temporary datafile temp01.dbf, then follow the steps below
1. Find out the tempfile name and size
SQL> select * from v$tempfile;
FILE# CREATION_CHANGE# CREATION_ TS# RFILE# STATUS ENABLED
---------- ---------------- --------- ---------- ---------- ------- ----------
BYTES BLOCKS CREATE_BYTES BLOCK_SIZE
---------- ---------- ------------ ----------
NAME
-------------------------------------------------------------------------------
1 550491 27-JUN-08 3 1 ONLINE READ WRITE
20971520 2560 20971520 8192
C:\ORACLE\PRODUCT\10.2.0\ORADATA\DELDB\TEMP01.DBF
The following info is available from the above command
Tempfile name is C:\ORACLE\PRODUCT\10.2.0\ORADATA\DELDB\TEMP01.DBF
size --> 2560 * 8192 = 20MB
2. So if you want to increase the tempfile size to 50MB use the following SQL
SQL> alter database tempfile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DELDB\TEMP01.DBF'
resize 50m;
Database altered.
SQL> select * from v$tempfile;
FILE# CREATION_CHANGE# CREATION_ TS# RFILE# STATUS ENABLED
---------- ---------------- --------- ---------- ---------- ------- ----------
BYTES BLOCKS CREATE_BYTES BLOCK_SIZE
---------- ---------- ------------ ----------
NAME
--------------------------------------------------------------------------------
1 550491 27-JUN-08 3 1 ONLINE READ WRITE
52428800 6400 20971520 8192
C:\ORACLE\PRODUCT\10.2.0\ORADATA\DELDB\TEMP01.DBF
1. Find out the tempfile name and size
SQL> select * from v$tempfile;
FILE# CREATION_CHANGE# CREATION_ TS# RFILE# STATUS ENABLED
---------- ---------------- --------- ---------- ---------- ------- ----------
BYTES BLOCKS CREATE_BYTES BLOCK_SIZE
---------- ---------- ------------ ----------
NAME
-------------------------------------------------------------------------------
1 550491 27-JUN-08 3 1 ONLINE READ WRITE
20971520 2560 20971520 8192
C:\ORACLE\PRODUCT\10.2.0\ORADATA\DELDB\TEMP01.DBF
The following info is available from the above command
Tempfile name is C:\ORACLE\PRODUCT\10.2.0\ORADATA\DELDB\TEMP01.DBF
size --> 2560 * 8192 = 20MB
2. So if you want to increase the tempfile size to 50MB use the following SQL
SQL> alter database tempfile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DELDB\TEMP01.DBF'
resize 50m;
Database altered.
SQL> select * from v$tempfile;
FILE# CREATION_CHANGE# CREATION_ TS# RFILE# STATUS ENABLED
---------- ---------------- --------- ---------- ---------- ------- ----------
BYTES BLOCKS CREATE_BYTES BLOCK_SIZE
---------- ---------- ------------ ----------
NAME
--------------------------------------------------------------------------------
1 550491 27-JUN-08 3 1 ONLINE READ WRITE
52428800 6400 20971520 8192
C:\ORACLE\PRODUCT\10.2.0\ORADATA\DELDB\TEMP01.DBF
Monday, July 7, 2008
Monitoring the Oracle Database - "Processes" Initialization Parameter
If you want to find out whether your Processes initialization parameter value is sufficient enough so that there won't be any issues for the users to connect to the database
Follow the Process below to monitor the processes initialization parameter
1. Connect to the database as sys user
SQL> conn / as sysdba
SQL> select * from v$resource_limit where resource_name in ('processes','sessions');
RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
------------------------------ ------------------- ---------------
INITIAL_ALLOCATION LIMIT_VALUE
------------------------------ ------------------------------
processes 207 210
350 350
sessions 213 218
700 700
In The above output the Max_utilization is 210 and limit_value is 350. So the Maximum utilization is 210 < 350. So the Parameter is good Enough.
Consider increasing the Processes parameter if max_utilization reaches 350 value.
Note: Sessions parameter is automatically adjected as per the Processes setting.
You can also check whether there were any connection refusesals when the processes parameter has reached its limit using the following
lsnrctl services
The output of the above command is
Instance "R12VIS", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "R12VIS", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2187 refused:0 state:ready
The state should be ready aad refused should be 0. If there is any value against refused, and state is blocked then the listener is not accepting any connections because database has reached its processes max_limit.
Follow the Process below to monitor the processes initialization parameter
1. Connect to the database as sys user
SQL> conn / as sysdba
SQL> select * from v$resource_limit where resource_name in ('processes','sessions');
RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
------------------------------ ------------------- ---------------
INITIAL_ALLOCATION LIMIT_VALUE
------------------------------ ------------------------------
processes 207 210
350 350
sessions 213 218
700 700
In The above output the Max_utilization is 210 and limit_value is 350. So the Maximum utilization is 210 < 350. So the Parameter is good Enough.
Consider increasing the Processes parameter if max_utilization reaches 350 value.
Note: Sessions parameter is automatically adjected as per the Processes setting.
You can also check whether there were any connection refusesals when the processes parameter has reached its limit using the following
lsnrctl services
The output of the above command is
Instance "R12VIS", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "R12VIS", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2187 refused:0 state:ready
The state should be ready aad refused should be 0. If there is any value against refused, and state is blocked then the listener is not accepting any connections because database has reached its processes max_limit.
Wednesday, July 2, 2008
How to Enable / Disable Archive log Mode in 10g
Enabling and Disabling the Archive Log mode in 10g is slightly different compared to 9i database. LOG_ARCHIVE_START parameter has been deprecated in 10g database.
Enabling the Archive Log Mode:
SQL> startup mount
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 188746628 bytes
Database Buffers 415236096 bytes
Redo Buffers 7135232 bytes
Database mounted.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Current log sequence 4
SQL> alter database archivelog;
Database altered.
The above command will enable the Archive Mode as well as enable the Automatic archiving ( In Oracle 9i, you need to enable the automatic archiving by setting the init parameter LOG_ARCHIVE_START=true )
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
Disabling Archive Log Mode:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 289406976 bytes
Fixed Size 1248576 bytes
Variable Size 100664000 bytes
Database Buffers 180355072 bytes
Redo Buffers 7139328 bytes
Database mounted.
SQL> alter database noarchivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 26
Current log sequence 28
Enabling the Archive Log Mode:
SQL> startup mount
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 188746628 bytes
Database Buffers 415236096 bytes
Redo Buffers 7135232 bytes
Database mounted.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Current log sequence 4
SQL> alter database archivelog;
Database altered.
The above command will enable the Archive Mode as well as enable the Automatic archiving ( In Oracle 9i, you need to enable the automatic archiving by setting the init parameter LOG_ARCHIVE_START=true )
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
Disabling Archive Log Mode:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 289406976 bytes
Fixed Size 1248576 bytes
Variable Size 100664000 bytes
Database Buffers 180355072 bytes
Redo Buffers 7139328 bytes
Database mounted.
SQL> alter database noarchivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 26
Current log sequence 28
How to Increase the OC4J JVM heap size in Oracle Applications R12
If you are getting OutofMemory Errors, Please follow the steps below to increase the JVM heap size.
1. Login as applmgr user to the Server hosting the applications
2. cd $ORA_CONFIG_HOME/10.1.3/opmn/conf
3. Edit the opmn.xml file
There are 3 OC4J instances in Oracle Applications R12 Version. They are oacore, oafm and forms. You need to change the respective OC4J instance JVM parameters.
For Example, you are getting outofmemory issue with the oacore OC4J instance and want to increase the JVM heap size, follow the steps below.
in opmn.xml, you have to update the "java-options" values under
category id="start-parameters" and
category id="stop-parameters" tags as shown below
1. category id="start-parameters"
data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M
2. category id="stop-parameters"
data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M
If you want to increase the MaxPermSize from 160M to 256M, then the updated line should look like
data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=256M
You have change this parameter at 2 places as mentioned above
4. Save the changes.
5. Reload the opmn config changes to get reflected using
$ADMIN_SCRIPTS_HOME/adopmnctl.sh reload
6. Verify whether the changes done above are reflected or not using the following command
ps -eaf|grep applmgr|grep oacore
[applmgr@lxs3er06 conf]$ ps -eaf|grep applmgr|grep oacore
applmgr 2020 1440 0 02:23 pts/2 00:00:00 grep oacore
applmgr 12252 12231 0 Jul01 ? 00:05:19 /data/R12VIS/apps/tech_st/10.1.3 /appsutil/jdk/bin/java -DCLIENT_PROCESSID=12252 -server -verbose:gc -Xmx512M -Xm s128M -XX:MaxPermSize=256M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -X X:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.s ecurity.policy=/data/R12VIS/apps/tech_st/10.1.3/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.confi g=/data/R12VIS/inst/apps/R12VIS_lxs3er06/ora/10.1.3/j2ee/oacore/config/jazn.xml -Doracle.ons.oraclehome=/data/R12VIS/apps/tech_st/10.1.3 -Doracle.home=/data/R12 VIS/apps/tech_st/10.1.3 -Doracle.ons.oracleconfighome=/data/R12VIS/inst/apps/R12 VIS_lxs3er06/ora/10.1.3 -Doracle.ons.clustername=default -Doracle.ons.instancena me=R12VIS_lxs3er06.lxs3er06.solutions.glbsnet.com -Dopmn.compatible=904 -Doracle .ons.indexid=oacore.default_group.1 -Doracle.ons.uid=765541316 -Doracle.oc4j.ins tancename=oacore -Doracle.oc4j.islandname=default_group -Doracle.opmn.routingid= g_rt_id -DOPMN=true -jar oc4j.jar -config /data/R12VIS/inst/apps/R12VIS_lxs3er06 /ora/10.1.3/j2ee/oacore/config/server.xml -properties -out /data/R12VIS/inst/app s/R12VIS_lxs3er06/logs/ora/10.1.3/opmn/oacorestd.out -err /data/R12VIS/inst/apps /R12VIS_lxs3er06/logs/ora/10.1.3/opmn/oacorestd.err -ports default-web-site:ajp: 21500,rmi:20000,jms:23000
1. Login as applmgr user to the Server hosting the applications
2. cd $ORA_CONFIG_HOME/10.1.3/opmn/conf
3. Edit the opmn.xml file
There are 3 OC4J instances in Oracle Applications R12 Version. They are oacore, oafm and forms. You need to change the respective OC4J instance JVM parameters.
For Example, you are getting outofmemory issue with the oacore OC4J instance and want to increase the JVM heap size, follow the steps below.
in opmn.xml, you have to update the "java-options" values under
category id="start-parameters" and
category id="stop-parameters" tags as shown below
1. category id="start-parameters"
data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M
2. category id="stop-parameters"
data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M
If you want to increase the MaxPermSize from 160M to 256M, then the updated line should look like
data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=256M
You have change this parameter at 2 places as mentioned above
4. Save the changes.
5. Reload the opmn config changes to get reflected using
$ADMIN_SCRIPTS_HOME/adopmnctl.sh reload
6. Verify whether the changes done above are reflected or not using the following command
ps -eaf|grep applmgr|grep oacore
[applmgr@lxs3er06 conf]$ ps -eaf|grep applmgr|grep oacore
applmgr 2020 1440 0 02:23 pts/2 00:00:00 grep oacore
applmgr 12252 12231 0 Jul01 ? 00:05:19 /data/R12VIS/apps/tech_st/10.1.3 /appsutil/jdk/bin/java -DCLIENT_PROCESSID=12252 -server -verbose:gc -Xmx512M -Xm s128M -XX:MaxPermSize=256M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -X X:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.s ecurity.policy=/data/R12VIS/apps/tech_st/10.1.3/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.confi g=/data/R12VIS/inst/apps/R12VIS_lxs3er06/ora/10.1.3/j2ee/oacore/config/jazn.xml -Doracle.ons.oraclehome=/data/R12VIS/apps/tech_st/10.1.3 -Doracle.home=/data/R12 VIS/apps/tech_st/10.1.3 -Doracle.ons.oracleconfighome=/data/R12VIS/inst/apps/R12 VIS_lxs3er06/ora/10.1.3 -Doracle.ons.clustername=default -Doracle.ons.instancena me=R12VIS_lxs3er06.lxs3er06.solutions.glbsnet.com -Dopmn.compatible=904 -Doracle .ons.indexid=oacore.default_group.1 -Doracle.ons.uid=765541316 -Doracle.oc4j.ins tancename=oacore -Doracle.oc4j.islandname=default_group -Doracle.opmn.routingid= g_rt_id -DOPMN=true -jar oc4j.jar -config /data/R12VIS/inst/apps/R12VIS_lxs3er06 /ora/10.1.3/j2ee/oacore/config/server.xml -properties -out /data/R12VIS/inst/app s/R12VIS_lxs3er06/logs/ora/10.1.3/opmn/oacorestd.out -err /data/R12VIS/inst/apps /R12VIS_lxs3er06/logs/ora/10.1.3/opmn/oacorestd.err -ports default-web-site:ajp: 21500,rmi:20000,jms:23000
Tuesday, July 1, 2008
How to Increase the JVMs for an OC4J Instance in R12
If You want to increase the number of JVMs to handle the user load (Typically 1 JVM per CPU) in Oracle Applications R12 which is configured in OC4J technology follow the process listed below. Just keep in mind that if you want to increase the number of JVMs there should be sufficient resources available on the Operating system.
Use top, vmstat or sar to find out the resource availability on the O/S.
The procedure to increase the JVMs in Oracle Applications R12 is as below
1. Login as the applmgr user
2. cd to the $ORA_CONFIG_HOME/10.1.3/opmn/conf
3. Edit the file opmn.xml
For Example , if you want to increase the JVMs for oacore process under the OC4J ,
You will see a line which looks as below
<process-set id="default_group" numprocs="1"/>
The Last line high lighted in bold numproc=1 is the parameter. In this Example oacore is running with 1 JVM. If you want to increase the JVMs to 2 then increase the numproc parameter to 2 with the following line
4. Once the changes has been done.. reload the opmn using the following command
cd $ADMIN_SCRIPTS_HOME
./adopmnctl.sh stopall ( Caution: This action will disrupt the application users. Please intimate the users about the disruption)
./adopmnctl.sh startall
5. TO validate whether there are 2 jvms started for oacore or not, use the opmnctl status command to see whether there are 2 jvms started
For Example, the following opmnctl status command
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
OC4J | oacore | 4848 | Alive
OC4J | oacore | 4132 | Alive
You will see there are 2 processes started for oacore.
Use top, vmstat or sar to find out the resource availability on the O/S.
The procedure to increase the JVMs in Oracle Applications R12 is as below
1. Login as the applmgr user
2. cd to the $ORA_CONFIG_HOME/10.1.3/opmn/conf
3. Edit the file opmn.xml
For Example , if you want to increase the JVMs for oacore process under the OC4J ,
You will see a line which looks as below
The Last line high lighted in bold numproc=1 is the parameter. In this Example oacore is running with 1 JVM. If you want to increase the JVMs to 2 then increase the numproc parameter to 2 with the following line
4. Once the changes has been done.. reload the opmn using the following command
cd $ADMIN_SCRIPTS_HOME
./adopmnctl.sh stopall ( Caution: This action will disrupt the application users. Please intimate the users about the disruption)
./adopmnctl.sh startall
5. TO validate whether there are 2 jvms started for oacore or not, use the opmnctl status command to see whether there are 2 jvms started
For Example, the following opmnctl status command
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
OC4J | oacore | 4848 | Alive
OC4J | oacore | 4132 | Alive
You will see there are 2 processes started for oacore.
Subscribe to:
Posts (Atom)