DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Saturday, April 30, 2016

How to change oc4jadmin password for Application Server


How to change oc4jadmin password for Application Server 

You have to change the oc4jadmin password for a remote account without using  Application Server Control:
Locate the following configuration file in the Oracle home of the OC4J instance: vi ORACLE_HOME/oc4j_instance_name/j2ee/home/config/system-jazn-data.xml

Edit the system-jazn-data.xml file and locate the following entry for the oc4jadminuser:      

<user>
     <name>oc4jadmin</name>
     <display-name>OC4J Administrator</display-name>
     <guid>41A2E560C96711DABFD08D3BF8B780C4</guid>description>OC4J Administrator</description><credentials>{903}4nlfYYDwaqMJipVbGXuS2ce8egfwBPqp</credentials> 
</user>
Replace the value of the <credentials> element with the new password. Be sure to include an exclamation point character (!) before the password.For example:

<credentials>!welcome123</credentials>

 The exclamation point ensures that the password will be encrypted in the configuration file. 
 Save your changes and exit the system-jazn-data.xmlfile.

Restart the OC4J instance.

nohup $ORACLE_HOME/bin/oc4j -start &

After the restart, the Application Server Control will use your new Administrator (oc4jadmin)password, which will be stored in encrypted format within the system-jazn-data.xml file.

 Now we can login through a application console with a new password of oc4jadmin.








Tuesday, April 26, 2016

NUMBER OF CONCURRENT REQUESTS IN A DAY

SET LINES 120
SET PAGES 0
COL cnt FORMAT 999999 HEADING "Total No of Requests"
SELECT ' Number of Concurrent Requests for ', SYSDATE - 1 FROM dual ;
SET PAGES 900
SELECT COUNT(*) cnt
FROM apps.fnd_concurrent_requests
WHERE TRUNC(actual_start_date) = TRUNC(SYSDATE) - 1
/

CONCURRENT REQUESTS COMPLETED WITH ERRORS

COL name FORMAT a50
COL st_time FORMAT a7
COL requestor FORMAT a18
SET TRIMSPOOL ON
SET FEEDBACK OFF
SET TERM OFF
SET VERIFY OFF
SET PAGES 9000
SET LINES 120
SELECT a.request_id request_id
, SUBSTR(a.user_concurrent_program_name,1,50) name
, TO_CHAR(a.actual_start_date,'Hh34:MI') st_time
, TO_CHAR(a.actual_completion_date,'Hh34:MI') end_time
, requestor
, DECODE(a.phase_code, 'R'
,'Running', 'P'
,'Inactive', 'C'
,'Completed', a.phase_code) phase_code
, DECODE(a.status_code, 'E'
,'Error', 'C'
,'Normal', 'X'
,'Terminated', 'Q'
,'On Hold', 'D'
,'Cancelled', 'G'
,'Warning', 'R'
,'Normal', 'W'
,'Paused', a.status_code) status_code
FROM apps.fnd_conc_req_summary_v a
WHERE TRUNC(actual_completion_date) >= TRUNC(SYSDATE -1)
AND a.status_code IN ('E','X','D')
ORDER BY actual_start_date
/

Checking last run of a Concurrent Program along with Processed time

SELECT DISTINCT c.USER_CONCURRENT_PROGRAM_NAME,
            round(((a.actual_completion_date-a.actual_start_date)*24*60*60/60),2) AS Process_time,
            a.request_id,a.parent_request_id,To_Char(a.request_date,'DD-MON-YY HH24:MI:SS'),To_Char(a.actual_start_date,'DD-MON-YY HH24:MI:SS'),
  To_Char(a.actual_completion_date,'DD-MON-YY HH24:MI:SS'), (a.actual_completion_date-a.request_date)*24*60*60 AS end_to_end,
            (a.actual_start_date-a.request_date)*24*60*60 AS lag_time,
            d.user_name, a.phase_code,a.status_code,a.argument_text,a.priority
FROM   apps.fnd_concurrent_requests a,
            apps.fnd_concurrent_programs b ,
            apps.FND_CONCURRENT_PROGRAMS_TL c,
            apps.fnd_user d
WHERE       a.concurrent_program_id= b.concurrent_program_id AND
            b.concurrent_program_id=c.concurrent_program_id AND
            a.requested_by =d.user_id AND
--          trunc(a.actual_completion_date) = '20-MAY-2016'
c.USER_CONCURRENT_PROGRAM_NAME='Incentive Compensation Analytics - ODI' --  and argument_text like  '%, , , , ,%';
--          and status_code!='C'

Cancelling Concurrent Request

--By request id
update fnd_concurrent_requests
set status_code='D', phase_code='C'
where request_id=&req_id;

--By program_id
update fnd_concurrent_requests
set status_code='D', phase_code='C'
where CONCURRENT_PROGRAM_ID=&prg_id;

Start notification mailer in R12

To start notification mailer, we need to execute the following.

 sqlplus apps/<apps password>
 declare
 p_retcode number;
 p_errbuf varchar2(100);
 m_mailerid fnd_svc_components.component_id%TYPE;
 begin
 -- Find mailer Id
 -----------------
 select component_id
 into m_mailerid
 from fnd_svc_components
 where component_name = 'Workflow Notification Mailer';
 --------------
 -- Start Mailer
 -----------------
 fnd_svc_component.start_component(m_mailerid, p_retcode, p_errbuf);
 commit;
 end;
 /

Displays information about credentials in 12C

COLUMN credential_name FORMAT A25
COLUMN username FORMAT A20
COLUMN windows_domain FORMAT A20

SELECT credential_name,
       username,
       windows_domain
FROM   dba_credentials
ORDER BY credential_name;

Thursday, April 21, 2016

AWR snapshot cannot be generated MMON slave hangs

Scenario:
AWR snapshot was not generated. With manual snap creation the execution used to get hanged.
exec DBMS_WORKLOAD_REPOSITORY.create_snapshot();
They asked for 10046 trace. To take trace for manual snap creation “execute dbms_workload_repository.create_snaphot();”
SQL> oradebug setospid 25807 -- ospid
SQL> oradebug unlimit
SQL> oradebug Event 10046 trace name context forever, level 12
-- waiting for few minutes
SQL> oradebug Event 10046 trace name context off
SQL> oradebug dump errorstack 3
-- waiting for few minutes
SQL> oradebug dump errorstack 3
SQL> exit
oradebug level 3 errorstack provides the following information:
Current statement
Call Stack Trace
Files Currently Opened
Process State for the pid
Pinned Buffer History
Cursor Dump
Fixed PGA, SGA and UGA
In memory trace dump
Trace file shows:
application name: sqlplus.exe, hash value=254292535
waiting for 'enq: WF - contention' wait_time=0, seconds since wait started=1432
name|mode=57460006, 0=0, 0=0
blocking sess=0x000000057A706358 seq=37
Dumping Session Wait History
for 'enq: WF - contention' count=1 wait_time=2.999985 sec
name|mode=57460006, 0=0, 0=0
The session collecting snapshot is continually waiting for “enq: WF – contention”. So, the waiting was for this wait to flush the statistics to AWR. mmon trace shows, it error out while flushing the stats.
MMON trace are generated in bdump location.
MMON trace shows:
*** KEWRAFM1: Error=13518 encountered by Auto Flush Main.

13518, 00000, "Invalid database id (%s)"
// *Cause: The operation failed because the specified database ID
// does not exist in the Workload Repository.
// *Action: check the database id and retry the operation.
The mmon trace provided some more hint. The error state that database ID is invalid as the database ID doesn’t exists.
The MMON process takes snapshots at regular intervals (default 60 minutes) and inserts that data into the AWR tables. These tables containing AWR information are under SYS schema. The AWR related tables all begin with “WR”:
SQL> select distinct dbid from WRM$_DATABASE_INSTANCE ;

no row selected.
It has to show DB ID similar to the output for next statement. If it doesn’t, then in that case the DB ID needs to be populated in AWR tables i.e the missing DB ID.
SQL> select dbid from v$database;
WRM$_DATABASE_INSTANCE will be populated when instance is bounced. This is the case when we try to recreate AWR with the help of catnoawr.sql andcatawrtb.sql. The DBID is not populated in the AWR tables. The Database needs to be bounced.
When a function / procedure is invoked from DBMS_WORKLOAD_REPOSITORY package, it refers to WRM$_DATABASE_INSTANCE table to get dbid information. If the AWR repositories are recreated, the table doesn’t have any data in it.
After a reboot of the database, the dbid was recorded in WRM$_DATABASE_INSTANCE table of sys. But this didn’t resolved our problem. We were still not able to generate AWR snaps.
Then we went for systemstate 266 trace. Collected system state dump level 266 for the session for creating manual snapshot.
sqlplus /nolog
SQL> oradebug setmypid
Statement processed.
SQL> oradebug unlimit
Statement processed.
SQL> oradebug dump systemstate 266
Statement processed.
-- waiting for few minutes
SQL> oradebug dump systemstate 266
Statement processed.
SQL> oradebug tracefile_name
c:\oracle112\diag\rdbms\orcl\orcl\trace\orcl_ora_1136.trc
SQL> exit
mmon trace:
*** 2011-10-04 11:23:47.339
*** KEWRAFC: Flush slave failed, AWR Enqueue Timeout
*** 2011-10-04 11:24:47.339
*** KEWRAFC: Flush slave failed, AWR Enqueue Timeout
*** 2011-10-04 11:25:50.339
The trace shows the waiting is for flushing snapshots. Remedy for the problem is to disable the flushing of AWR data.
alter system set "_awr_disabled_flush_tables" = 'wrh$_tempstatxs';
Its a dynamic parameter, doesn’t require bounce of database.

Starting Http Server by "Opmnctl Startall" result with "[error] (79) Value too large for define data type: could not open transfer log file /apps/oracle/logs/access_log" error in error_log file

OMS_HOME/Apache/Apache/log/error_log
shows:
[timestamp] [error] (79) Value too large for define data type: could not open transfer log file
/apps/oracle/logs/access_log
or
[Tue Oct 11 11:26:36 2011] [notice] child pid 16173 exit signal File size limit exceeded (25)
[Tue Oct 11 11:26:36 2011] [notice] child pid 16177 exit signal File size limit exceeded (25)
There is another symptom:
Log files under
OMS_HOME/Apache/Apache/log/*
are very BIG, about 2GB


To implement the solution, please execute the following steps:

1.Stop Application Server
2.Please take a backup of files under :
     $OH/opmn/logs/*
     $OH/Apache/Apache/log/*
3.Please remove all files under :
     $OH/opmn/logs/*
     $OH/Apache/Apache/log/*
4.run the command : "opmnctl startall"
5.run the command : "opmnctl status"
Now the HTTP Server is running fine.


Users Receive Error "Exception: oracle.apps.fnd.common.AppsException: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object" During Login To E-Business Suite

On : 12.1.1 version, Jserv, JDK, JVM, JRE

When attempting to login EBS, the following error occurs.

ERROR
-----------------------
Unable to generate forwarding URL. Exception: oracle.apps.fnd.common.AppsException: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Login EBS
2. Error occurs

Also, Following error message can be found in OACORE application log:
......
Caused by: oracle.net.ns.NetException: Socket read timed out
at oracle.net.ns.Packet.receive(Packet.java:320)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:286)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)
... 80 more

Workaround:
--------------------------------------------------------
Comments out the definition in /etc/resolve.conf
e.g.
Before:
#search kkcl.com
nameserver 202.96.209.133
nameserver 202.96.209.133
After:
#search kkcl.com
#nameserver 202.96.209.133
#nameserver 202.96.209.133
--------------------------------------------------------
This is a temporarily solution for this issue.
If customer wants to fix the issue permanently.
The solution is to get help from OS/Network DBA to setup DNS server correctly.

RC-50014: Fatal: Execution of AutoConfig was failed Raised by oracle.apps.ad.clone.ApplyApplTop

Error While Running the adcfgclone in Apps tier.

AutoConfig is exiting with status 27

RC-50014: Fatal: Execution of AutoConfig was failed
Raised by oracle.apps.ad.clone.ApplyApplTop
ERROR: AutoConfig completed with errors. Check logfile at /prddb02/inst/apps/HUAT_hlifedev/admin/log/ApplyAppsTier_04211435.log for details.
ApplyApplTop Completed Successfully.

# Checking the status of AutoConfig run of ApplyApplTop
Warning : AutoConfig has completed with  errors .
Please review the AutoConfig section in the logfile. If required, you can re-run AutoConfig from command line  after fixing the problem


Cause: 

Check the write permission on the respective mount point.

Solution:

Chmod -R 777 /prddb02

Kindly re-check the isse.

Tuesday, April 19, 2016

ORA-08004: sequence FND_CONCURRENT_PROCESSES_S.NEXTVAL exceeds MAXVALUE and cannot be instantiated

Cause:

SQL> select FND_CONCURRENT_PROCESSES_S.nextval from dual;
select FND_CONCURRENT_PROCESSES_S.nextval from dual
*
ERROR at line 1:
ORA-08004: sequence FND_CONCURRENT_PROCESSES_S.NEXTVAL exceeds MAXVALUE and
cannot be instantiated

The FND_CONCURRENT_PROCESSES_S Max value is reached. we need to increase this value

SQL> select * from dba_sequences
where sequence_name = ‘FND_CONCURRENT_PROCESSES_S’ 2 ;

SEQUENCE_OWNER SEQUENCE_NAME MIN_VALUE MAX_VALUE INCREMENT_BY C O CACHE_SIZE LAST_NUMBER
—————————— —————————— ———- ———- ———— – – ———- ———–
APPLSYS FND_CONCURRENT_PROCESSES_S 1 9999999 67778 N N 1000 10048596

Solution:

Increase max value;(shoud be greater Than previoue Max value)

SQL> ALTER SEQUENCE APPLSYS.FND_CONCURRENT_PROCESSES_S MAXVALUE 99999999;

Sequence altered.

SQL*Loader-128: unable to begin a session ORA-01017: invalid username/password; logon denied

Error:
Programs were erroring out with below error in concurrent program log

Arguments
------------
/u01/prod/attach/1418160319478.txt
------------
ORA-01017: invalid username/password; logon denied
SQL*Loader-704: Internal error: ulconnect: OCISessionBegin [-1]

SQL*Loader: Release 8.0.6.3.0 - Production on Tue Dec 9 22:59:13 2014

(c) Copyright 1999 Oracle Corporation.  All rights reserved.

ORA-01017: invalid username/password; logon denied
SQL*Loader-704: Internal error: ulconnect: OCISessionBegin [-1]

Program exited with status 1
Concurrent Manager encountered an error while running SQL*Loader for your concurrent request 140568679.

Review your concurrent request log file for more detailed information.


+---------------------------------------------------------------------------+
Executing request completion options...

Solution:

When we started trouble shooting we found below points.

- Parameter processes it has been changed from 1528 to 2000 in the init.ora file
- FNDSM log file is below the 2GB.
- The program hasn't been scheduled by an ended user ( Bug 12896168 )
- Instance is using it's own service name (Doc ID 1160553.1)
- Program executable permissions have been check
- Issue occurs in RAC and non RAC environments  

For our issue it was caused by the size of the FNDSM log which was over 2GB.
-rw-r--r--    1 appp14   oaa      2147483647 Dec  9 21:15 FNDSM257792.mgr

To fix the issue, we have truncated the file.
>   FNDSM257792.mgr

After that user ran the program and it got completed successfully.

How To Kill runaway processes After TerminatingConcurrent Request:

How To Kill runaway processes After TerminatingConcurrent Request:


Terminate the concurrent request from the front end. Then

SQL>select request_id,oracle_process_id,os_process_id from
fnd_concurrent_requests where request_id=’&Req_Id’;

SQL>select p.spid , s.sid , s.serial# from v$session s , v$process p where s.paddr
= p.addr and s.process = &os_process_id ;

SQL> alter system kill session ‘session-id,session-serial’

$ kill -9 <server pid>

R12 Error 'Function not available to this responsibility'When Trying to Access Custom Form

R12 Error 'Function not available to this responsibility'When Trying to Access Custom Form

After upgrade from 11i to R12 users cannot access the custom form in R12, which
was working fine in 11.5.10.2.Following errors encountered when accessed custom form.

"Function not available to this responsibility. Change Responsibilities or contact
your System Administrator".

The reason for this issue is that, missing entry for CUSTOM_TOP under
default.env file. In R12, CUSTOM_TOP should be defined under default.env in
$INST_TOP/ora/10.1.2/forms/server directory.

Now here is the Solution

1. Login to Linux server with APPLMGR manager user access.

2. Go to $INST_TOP/ora/10.1.2/forms/server directory.

3. Ensure that your CUSTOM_TOP's are registered in the default.env file.

This means , we should create an entry for environment variable CUSTOM_TOP
(which contains physical path to your custom directory) like below in default.env
file present under location .
$INST_TOP/ora/10.1.2/forms/server directory.

For Example:

APPL_TOP=/home/applmgr/PROD/apps/apps_st/appl
CUSTOM_TOP=/home/applmgr/PROD/apps/apps_st/custom

4. Restart the middle tier services.

5. Retest the issue.

Restrict single session per user and R12



In Release 12:

In Oracle E-Business Suite release 12, there is no need to apply any patch as the files
required are already present in the filesytem. The instructions are as follows:

 Load the event with the command:

java oracle.apps.fnd.wf.WFXLoad -u < apps_un> < apps_pw> < apps_dbserver.+fqdn>
:< db_port>:< SID> thin US \ $FND_TOP/patch/115/xml/US/icxevte.wfx

 Load the event subscription:

java oracle.apps.fnd.wf.WFXLoad -u < apps_un> < apps_pw> < apps_dbserver.+fqdn>
:< db_port>:< SID> thin US \ $FND_TOP/patch/115/xml/US/icxevts.wfx

We can enable/disable the business event through the System Administrator > Business Events
screen (SYSADMIN user only) by searching for the word ’security’. It will pull up the
oracle.apps.icx.security.session.created event. Click on the Update icon and enable/disable.
You then need to close all browsers for the change to take affect.

Monday, April 18, 2016

Important tables for ADPATCH


Here are some of the important tables used by ADPATCH utility.

 AD_APPL_TOPS

This table holds the various APPL-TOP’s in the Oracle Applications installation
that have ever been patched.

 AD_APPLIED_PATCHES

AD_APPLIED_PATCHES holds information about the “distinct” Oracle
Applications patches that have been applied. If 2 patches happen to have the
same name but are different in content (eg. “merged” patches), then they are
considered distinct and this table will therefore hold 2 records.

 AD_BUGS

AD_BUGS holds information about the various Oracle Applications bugs whose
fixes have been applied (ie. patched) in the Oracle Applications installation.

 AD_PATCH_DRIVERS

This table holds information about the patch drivers that comprise a patch.

 AD_FILE_VERSIONS

This table holds the various versions of Oracle Applications files (real files, not
“pseudo-files”) that have ever been patched or executed in the Oracle
Applications installation.

 AD_FILES

AD_FILES is the “files repository”. It contains information about the various files
that have been patched in the Oracle Applications installation. Some entries are
“pseudo-files” and not real files, (eg. directories) in which case some of the
columns are not applicable and would then hold the value “DUMMY”

Steps to recover Applications context file if it is corrupted ordeleted accidentally


If the Oracle Applications Context file is corrupted or deleted accidentally, then we need to
follow the below steps to recover the Context file.

To retrieve the Applications tier context file.

Run the adclonectx.pl as shown below.

perl /clone/bin/adclonectx.pl retrieve

On being prompted for the context file to be retrieved, select the option of retrieving
the Applications tier context file that has been lost and retrieve it to the default
location specified by the script.

The above command (adclonectx.pl can be used only when INST_TOP the is still intact. In
case that has also been lost accidentally, the Applications tier context file may be retrieved
as follows:

Execute the following command on the Database tier:

perl /appsutil/clone/bin/adclonectx.pl retrieve

On being prompted for the context file to be retrieved, select the option of retrieving
the Applications tier context file that has been lost.

While confirming the location for the context file, set it to any existing directory with
write permission.

Once the context file has been generated in the specified location, move it to the
location specified for the context file in the context variable 's_contextfile'.

To retrieve the Database tier context file:

Execute the following command on the Database tier:

perl /appsutil/clone/bin/adclonectx.pl retrieve

On being prompted for the context file to be retrieved, select the Database tier
context file and retrieve it to the default location specified by the scrip

Oracle EBS Login Page Error : The page cannot be found


Normally, after cloning a new test environment on a new server, when we try to get the login
page by url “http://ServerName.domain:port/OA_HTML/AppsLocalLogin.jsp” , we get the error
message “The page cannot be found”.
Also if we try http://ServerName.domain:port and we will get the same error message.


Solution :

Step 1 : First , we need to check all Apache configuration files - httpd.conf, httpds.conf,
apps.conf, oprocmgr.conf, httpd_pls.conf .

Step 2 : We need to check required Linux RPM’s that may be missing as it is a new server.

Step 3 : We need to check the /etc/hosts file :

Most of the time, we make wrong entry in /etc/hosts file as shown below.
127.0.0.1 localhost.localdomain localhost ServerName
192.168.214.134 ServerName

We need to edit the /etc/hosts file as follows:

127.0.0.1 localhost.localdomain localhost
192.168.214.134 ServerName.domain ServerName

Step 4 : Clear cache from $COMMON_TOP/_pages/_oa__html/

Step 5 : Restart Apache
Now we will get the login page………

Golden gate script(info extract)

export ORACLE_SID=orcl
export ORACLE_HOME=/opt/oracle/product/11.2.0.3.0/db_1
export ORACLE_BASE=/opt/oracle/product
export GGS_HOME=/opt/oracle/product/ggate
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

echo
echo "######################################################################"
echo `date +%d/%m/%Y\ %k:%M:%S`
echo
$GGS_HOME/ggsci <<EOF
info extract $1 detail
exit
EOF

Golden gate script (info manager)

export ORACLE_SID=orcl
export ORACLE_HOME=/opt/oracle/product/11.2.0.3.0/db_1
export ORACLE_BASE=/opt/oracle/product
export GGS_HOME=/opt/oracle/product/ggate
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

echo
echo "######################################################################"
echo `date +%d/%m/%Y\ %k:%M:%S`
echo
$GGS_HOME/ggsci <<EOF
info manager  $1 detail
exit

Golden gate script(info Replicat)

export ORACLE_SID=orcl
export ORACLE_HOME=/opt/oracle/product/11.2.0.3.0/db_1
export ORACLE_BASE=/opt/oracle/product
export GGS_HOME=/opt/oracle/product/ggate
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

echo
echo "######################################################################"
echo `date +%d/%m/%Y\ %k:%M:%S`
echo
$GGS_HOME/ggsci <<EOF
info replicat $1 detail
exit
EOF

Golden gate script (lag replicat)

export ORACLE_SID=orcl
export ORACLE_HOME=/opt/oracle/product/11.2.0.3.0/db_1
export ORACLE_BASE=/opt/oracle/product
export GGS_HOME=/opt/oracle/product/ggate
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

echo
echo "######################################################################"
echo `date +%d/%m/%Y\ %k:%M:%S`
echo
$GGS_HOME/ggsci <<EOF
lag replicat $1
exit
EOF

Golden gate script(Stats Extract)

export ORACLE_HOME=/opt/oracle/product/11.2.0.3.0/db_1
export ORACLE_BASE=/opt/oracle/product
export GGS_HOME=/opt/oracle/product/ggate
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

echo
echo "######################################################################"
echo `date +%d/%m/%Y\ %k:%M:%S`
echo
$GGS_HOME/ggsci <<EOF
#stats extract ereg
stats extract $1
exit
EOF

Golden Gate script( stats Replicat)

export ORACLE_SID=orcl
export ORACLE_HOME=/opt/oracle/product/11.2.0.3.0/db_1
export ORACLE_BASE=/opt/oracle/product
export GGS_HOME=/opt/oracle/product/ggate
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

echo
echo "######################################################################"
echo `date +%d/%m/%Y\ %k:%M:%S`
echo
$GGS_HOME/ggsci <<EOF
stats replicat $1
exit
EOF

Golden Gate script (info all)

export ORACLE_SID=oracl
export ORACLE_HOME=/opt/oracle/product/11.2.0.3.0/db_1
export ORACLE_BASE=/opt/oracle/product
export GGS_HOME=/opt/oracle/product/ggate
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

echo
echo "######################################################################"
echo `date +%d/%m/%Y\ %k:%M:%S`
echo
$GGS_HOME/ggsci <<EOF
info all
exit
EOF

11g RAC :Convert NON RAC database to RAC database using RCONFIG

 
       
        11g RAC :Convert NON RAC database to RAC database using RCONFIG

When you navigate through the $ORACLE_HOME/assistants/rconfig/sampleXMLS, you will find two sample XML input files.

- ConvertToRAC_AdminManaged.xml
- ConvertToRAC_PolicyManaged.xml


– Edit AdminManaged.xml and make following changes :

   . Specify current OracleHome of non-rac database for SourceDBHome
   . Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome
   . Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion
   . Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should be the first node in this nodelist.
   . Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name
   . Specify the type of storage to be used by rac database. Allowable values are CFS|ASM
   . Specify Database Area Location to be configured for rac database.
   . Specify Flash Recovery Area to be configured for rac database.




SAMPLE SCRIPT that changes were made in XML file to convert.


<?xml version="1.0" encoding="UTF-8"?>
<n:RConfig xmlns:n="http://www.oracle.com/rconfig"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.oracle.com/rconfig rconfig.xsd">
    <n:ConvertToRAC>
<!-- Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY -->
        <n:Convert verify="ONLY">
<!--Specify current OracleHome of non-rac database for SourceDBHome -->
              <n:SourceDBHome>/backup/PROD/db/tech_st/11.2.0</n:SourceDBHome>
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
              <n:TargetDBHome>/u01/app/oracle/product/11.2.0/dbhome_1</n:TargetDBHome>
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
              <n:SourceDBInfo SID="PROD">
                <n:Credentials>
                  <n:User>sys</n:User>
                  <n:Password>oracle</n:Password>
                  <n:Role>sysdba</n:Role>
                </n:Credentials>
              </n:SourceDBInfo>
<!--Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should be the first node in this nodelist. -->
              <n:NodeList>
                <n:Node name="hostname1"/>
                <n:Node name="hostname2"/>
              </n:NodeList>
<!--Specify RacOneNode along with servicename to convert database to RACOne Node -->
              <!--n:RacOneNode  servicename="salesrac1service"/-->
<!--Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.-->
              <n:InstancePrefix></n:InstancePrefix>
<!-- Listener details are no longer needed starting 11.2. Database is registered with default listener and SCAN listener running from Oracle Grid Infrastructure home. -
->
<!--Specify the type of storage to be used by rac database. Allowable values are CFS|ASM. The non-rac database should have same storage type. ASM credentials are no nee
ded for conversion. -->
              <n:SharedStorage type="ASM">
<!--Specify Database Area Location to be configured for rac database.If this field is left empty, current storage will be used for rac database. For CFS, this field wil
l have directory path. -->
                <n:TargetDatabaseArea>+DISKNAME</n:TargetDatabaseArea>
<!--Specify Fast Recovery Area to be configured for rac database. If this field is left empty, current recovery area of non-rac database will be configured for rac data
base. If current database is not using recovery Area, the resulting rac database will not have a recovery area. -->
                <n:TargetFlashRecoveryArea>+DISKNAME</n:TargetFlashRecoveryArea>
              </n:SharedStorage>
        </n:Convert>
    </n:ConvertToRAC>



Note: In the xml file ,

<!-- Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY -->
        <n:Convert verify="ONLY"> ------> this value does only check the pre-requisites.

In order to convert we should specify YES value


<!-- Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY -->
        <n:Convert verify="YES"> ------> this value does the convention from non-rac to rac.






Kkjcre1p: Unable To Spawn Jobq Slave Process, Error 1089

                     
                               Kkjcre1p: Unable To Spawn Jobq Slave Process, Error 1089



SYMPTOMS:

During RMAN cold backup when the database goes down we may see the error in alert log
kkjcre1p: unable to spawn jobq slave process, error 1089

Alert log shows
Thu
Dec 1 02:16:17 2005
Shutting down instance: further logons disabled
Thu Dec 1 02:16:18 2005
kkjcre1p: unable to spawn jobq slave process, error 1089
Thu Dec 1 02:16:21 2005
Stopping background process CJQ0
Thu Dec 1 02:16:24 2005
Job queue slave processes stopped

CAUSE:

ORA01089 is just a warning that the DB is being shut down.
If a job is about to be spawned when shutdown of database is in progress, you will see these errors in the alert log file and this is perfectly valid.

SOLUTION:

There is no harm at all because of this warning being logged to the alert.log The Error can be safely ignored as
the job coordinator process tried to spawn a job slave when the Shutdown was in progress.
One workaround that we can suggest is to set an underscore parameter
_JOB_QUEUE_INTERVAL=120 or greater value
The default value is 60 but when we change to 120 there are less chances of getting the above warnings in the

alert log file.

Ref:Doc ID 344275.1

Saturday, April 9, 2016

ORA-00600: internal error code, arguments: [2619], [4476], [], [], [], [], [], [], [], [], [], []

Problem:

Physical standby recovery reports error in alert log:

Wed Jun 23 01:10:22 2010
Media Recovery Log /mnt/import/recovery_standby/4_77799_650412287.dbf
Errors in file /oracle/diag/rdbms/db1/DB1/trace/DB1_pr00_16417.trc (incident=360443):
ORA-00600: internal error code, arguments: [2619], [77799], [], [], [], [], [], [], [], [], [], []
Incident details in:
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
...
ORA-10877: error signaled in parallel recovery slave
ORA-10877: error signaled in parallel recovery slave
...
MRP0: Background Media Recovery process shutdown


Cause:

ORA-600[2619] is raised due to an invalid next_change# detected in archive log.

In this case, it is caused by the archive log disk space ran out on standby site, causing that archive log not fully written on disk. This lead to ORA-600[2619] when the archive log was applied.

Solution:

1. Clear the disk space where archive log stored on standby site

2. Copy the problem archive log  from the primary site and replace the one on the standby, then restart Managed Recovery.
Archive log should be applied properly now.

Thursday, April 7, 2016

OPM:Can not find one alive process , Could not reserve enough space for object heap

Issue :

 After running adcfgclone in apps Tier in 11i , It got completed without any error and When we tried to login the First page comes but when we try to click on homepage, it redirects to blank page which says "Page cannot be displayed" instead of login page.

In Apache Error log:
--------------------------

iAS Home/Apache/Apache/logs :

[Tue Apr  5 20:41:43 2016] [error] [client 10.1.163.122] File does not exist:
[Tue Apr  5 20:45:05 2016] [error] [client 10.1.163.122] File does not exist: /u01/app/doyen/doyencomn/html/US/ICXINDEX_doyen_usws1rdvcm04.htm
[Tue Apr  5 20:45:22 2016] [error] OPM:Can not find one alive process
[Tue Apr  5 20:45:22 2016] [error] [client 10.1.163.122] File does not exist: /servlets/weboam/oam/oamLogin/oam/oamLogin
[Tue Apr  5 20:51:13 2016] [error] OPM: EW: Fail to start process with mod=JServ and grp=DiscoGroup, it's possible that your configuration file is not correct.
[Tue Apr  5 20:51:13 2016] [error] OPM: EW: Fail to start process with mod=JServ and grp=OACoreGroup, it's possible that your configuration file is not correct.
[Tue Apr  5 20:51:13 2016] [error] OPM: EW: Fail to start process with mod=JServ and grp=OACoreGroup, it's possible that your configuration file is
[Tue Apr  5 21:12:18 2016] [notice] Oracle HTTP Server Powered by Apache/1.3.19 configured -- resuming normal operations
[Tue Apr  5 21:25:42 2016] [error] [client 10.1.163.122] File does not exist: /u01/app/doyen/doyencomn/portal/doyen_doyendb02/favicon.ico
[Tue Apr  5 21:25:45 2016] [error] [client 10.1.163.122] File does not exist: /u01/app/doyen/doyencomn/portal/doyen_doyendb02/favicon.ico
[Tue Apr  5 21:25:45 2016] [error] OPM:Can not find one alive process

In Jserv Logs:
----------------

[apdoyen@doyendb02 jvm]$ pwd
/u01/app/doyen/doyenora/iAS/Apache/Jserv/logs/jvm

vi OACoreGroup.4.stderr

Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future
Could not create the Java virtual machine.

vi XmlSvcsGrp.0.stdout

/usr/bin/jdk1.6.0_30/jre/bin/java -DCLIENT_PROCESSID=8314 -verbose:gc -Xmx1600M -Xms1600M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:
+PrintClassHistogram -XX:+UseTLAB -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -Djava.awt.headless=false -DFND_TOP=/u01/app/doyen/doyenappl/fnd/11.5.0 -OA_HTML=/u01/app/doyen/doyencomn/html/ -DOA_MEDIA=/u01/app/doyen/doyencomn/java/oracle/apps/media/ -DOASMTPServer=doyendb02.hrbl.net -DWebProxyHost=doyendb02.hrbl.net -
DWebProxyPort=80 -DWebProxyByPassDomain=hrbl.net -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -
DOASSLCACertFile=/u01/app/doyen/doyenora/iAS/Apache/Apache/conf/ssl.crt/ca-bundle.crt -DOXTAInPoolSize=1 -DOXTAOutThreads=1 -DOXTAOutUseProxy=false -
DOXTAOutProxyHost=doyendb02.hrbl.net -DOXTAOutProxyPort=80 -DCOMMON_TOP=/u01/app/doyen/doyencomn -DOXTALogDebugMsg=false -DEXTERNAL_URL=http://doyendb02.hrbl.net:8016 -
Djbo.323.compatible=true -DAPPLRGF=/u01/app/doyen/doyencomn/rgf/doyen_doyendb02 -DJTFDBCFILE=/u01/app/doyen/doyenappl/fnd/11.5.0/secure/doyenapps01_doyen.dbc -
Dservice.Logging.common.filename=/u01/app/doyen/doyencomn/temp/ibe.log -Dframework.Logging.system.filename=/u01/app/doyen/doyencomn/temp/fwsys.log -
DIMT_COM_PROPERTY_FILE=/u01/app/doyen/doyenappl/imt/11.5.0/admin/scripts/imtjserv.properties -Dpoolsize=100 -Dminpoolsize=10 -Dpoolincrement=10 -Dpooldelayincrement=3 -
DBNEDBCFILE=/u01/app/doyen/doyenappl/fnd/11.5.0/secure/doyenapps01_doyen.dbc -Djserv.session.getValue.instrument=false org.apache.jserv.JServ -opmpropfile
/u01/app/doyen/doyenora/iAS/Apache/Jserv/etc/xmlsvcs.properties -opmhost doyendb02.hrbl.net -opmport 8116 -opmgrp XmlSvcsGrp -opmindex 0 -opmprocid 7
-------------------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
---------------------------------------------------

Solution  :
-----------
Cause :
---------

System was unable to reserve 1600M java heap memory for the jvm …

Solution : 

Reduced the java heap memory to be used by the jvm to 512M (updated the s_jvm_options  in the CONTEXT_FILE and ran autoconfig)


Before:
<jvm_options oa_var="s_jvm_options" osd="Linux">-verbose:gc –Xmx1600M –Xms1600M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:
+PrintClassHistogram -XX:+UseTLAB -XX:+CMSClassUnloadingEnabled</jvm_options>

After:

<jvm_options oa_var="s_jvm_options" osd="Linux">-verbose:gc -Xmx512M -Xms512M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -
XX:+PrintClassHistogram -XX:+UseTLAB -XX:+CMSClassUnloadingEnabled</jvm_options>

After this Run Autoconfig and retest the issue.

Reference : Error 'Could not reserve enough space for object heap' During Initialization of JVM (Doc ID 1028915.1)