Tuesday, July 23, 2013

What happens if we remove the _pages under $COMMON_TOP in R12

In 11i after removing the class files under $COMMON_TOP/_pages new class files are created automatically when the JSP page is called from a browser session and JSP
In R12 if we done the same thing the login screen will hang or it shows blank page
Temporary Solution: compile the jsp pages using below command
Bash$ perl $FND_TOP/patch/115/bin/ojspCompile.pl --compile --flush -p 2
Once completion of above command the new class files are created under $COMMON_TOP/_pages
Permanent solution:
When we check the Application context file it shows like below
<jsp_debug_parameters oa_var="s_jsp_main_mode">justrun</jsp_debug_parameters>
1. We have to change the s_jsp_main_mode from justrun to recompile in the context file.
2. Run the autoconfig to change the values related configuration files
3. How check whether autoconfig completed successfully or not
·         check in application context file
      <jsp_debug_parameters oa_var="s_jsp_main_mode">recompile</jsp_debug_parameters>
·         check the configuration file $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml .
                    <param-name>main_mode</param-name>
                    <param-value>recompile</param-value>
Once completion of above activity the new class files are created under $COMMON_TOP/_pages

 Note:  on production recommended method is manual 'ojspcompile.pl'

Wednesday, July 10, 2013

Patching Issues

 The below opatch issues we can get source or Cloned instance

-bash-3.00$ pwd
/u01/oradb/db/tech_st/11.2.0/OPatch
-bash-3.00$ opatch lsinventory
OPatch failed with error code 104
Solution:
Step 1:-check the oraInst.loc file has created or not at OS Level under /var/opt/oracle/
If not, copy the oraInst.loc from $ORACLE_HOME to /var/opt/oracle/ directory.
Note: /var/opt is Solaris platform .Remaining platforms may be different at OS level
-bash-3.00$cp $ORACLE_HOME /orainst.loc /var/opt/oracle
vi /var/opt/oracle/oraInst.loc
inventory_loc=$ORACLE_HOME/admin/oui/<SID>_<hostname>/oraInventory
Suppose if oraInst.loc file exist but we are getting the error. Then
Step 2:-
-bash-3.00$opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc
OPatch succeeded.
If above command also not working then
Step3:-we check the files ContentsXML, install. Platform,
logs and oraInstaller.properties are exist or not below location /u01/oradb/db/tech_st/11.2.0/admin/oui/<SID>_<hostname>/oraInventory
If not, copy from source instance to above location.
Step 4: if files are exist then
-bash-3.00$ cd ContentsXML
-bash-3.00$ ls
comps.xml inventory.xml libs.xml
-bash-3.00$ view inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2008, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>11.2.0.3.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="TEST1_DB__u01_oradb_db_tech_st_11_2_0" LOC="/u01/oradb/db/tech_st/11.2.0" TYPE="O" IDX="1"/>
</HOME_LIST>
</INVENTORY>
Note: here <HOME NAME> we have to provide the our instance name and Oracle home details


After applying  ATG_PF.C.DELTA.7 patch while accessing the login page on webauth or sso level getting the error as Requested resource or page is not allowed in this site
24690680:Patch R12.ATG_PF.C.delta.7: R12.ATG_PF.C.DELTA.7

Sol: Login to sysadmin user local login level
change the profile option from Security: Allowed Resources from CONFIG to ALL
then try to login webuth or SSO level
 




Monday, July 8, 2013

Oracle Apps DBA Issues-2

Q: - while installing R12 we get the error “Rapidwiz fails with error: RC-20200: Fatal: Could not find Unzip” on Solaris.
Solution: unzip the p8639046_R12_GENERIC.zip in stage area. Rapidwiz wants high version to unzip.

Q: - While installing R12 we get the error “RW-50016:ERROR :-{0} was not create” on post install steps at login page level .
Solution: we have to recreate the dbc file by using adgendbc.sh then we click the retry button on screen
Note: first we have to run the Autoconfig on db tier. If it successful no need to create dbc file.
If it fails we have to create the dbc file using adgendbc.sh.

Q: while upgrading from 12.1.1 to 12.1.2 we get the error “ORA-04030: out of process memory “
Solution: - We have to run the adpatch again very less number of workers.
Note: While we applying 7303030 patch default it shows 64 workers. I have given the 30 workers but i got the above error then again we run the adpatch freshly using 12 workers and resolved the issue. So during upgradation we have to enter the vey less number of worker


Q: adcfgclone.pl error:RC-50014: Fatal: Execution of AutoConfig was failed in R12.


When we check the log file we can see the error like below
AutoConfig could not successfully instantiate the following files:

Directory: /u01/oradb/db/tech_st/11.1.0/appsutil/install/TEST1_<hostname>

adcrdb.sh INSTE8

AutoConfig is exiting with status 1

RC-50014: Fatal: Execution of AutoConfig was failed

Raised by oracle.apps.ad.clone.ApplyDatabase
Solution: we have to copy the adcrdb.sh file ($ORACLE_HOME/appsutil/template) from Source to target ($ORACLE_HOME/appsutil/template) then we run the adcfgclone.pl dbTier again.
Note: Normally adcrdb.sh file is missed if we provide the wrong apps password on target


Friday, July 5, 2013

Change forms Mode Socket to Servlet in R12

Run the following command to enable Forms Socket Mode on Forms/web nodes (Place correct context file name and Forms port value)
-bash-3.2$ $FND_TOP/bin/txkrun.pl -script=ChangeFormsMode -contextfile=$CONTEXT_FILE -mode=servlet -runautoconfig=yes
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/txkChangeFormsMode_Wed_May_29_13_38_03_2013.log
Program : /u02/oraapps/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChangeFormsMode.pl started @ Wed May 29 13:38:03 2013
*** Log File = /u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/txkChangeFormsMode_Wed_May_29_13_38_03_2013.log
Arguments passed: -contextfile=/u02/oraapps/inst/apps/TEST1_<hostname>/appl/admin/TEST1_<hostname>.xml -mode=servlet -runautoconfig=yes -port=NA
Enter the apps schema password:?
-----------
Values used
-----------
Context File : /u02/oraapps/inst/apps/TEST1_<hostname>/appl/admin/TEST1_<hostname>.xml
Mode : servlet
Port : NA
Run AutoConfig : yes
********************************
Backing up context file....
********************************
Context file backed up at: /u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/Wed_May_29_13_38_03_2013/TEST1_<hostname>.xml
********************************
Changing to Servlet Mode.......
********************************
Updating context Variable s_forms_servlet_serverurl....
Updated context Variable s_forms_servlet_serverurl to /forms/lservlet
Updating context Variable s_frmConnectMode....
Updated context Variable s_frmConnectMode to servlet
Updating context Variable s_formsstatus....
Updated context Variable s_formsstatus to enabled
Updating context Variable s_formsserver_status....
Updated context Variable s_formsserver_status to disabled
Updating context Variable s_formslauncher_path....
Updated context Variable s_formslauncher_path to forms/frmservlet
******************************************************
Running AutoConfig to finish the change of Forms Mode.
******************************************************
################# BEGIN AUTOCONFIG RUN #################
Execute SYSTEM command : /u02/oraapps/apps/tech_st/10.1.3/perl/bin/perl /u02/oraapps/apps/apps_st/appl/ad/12.0.0/bin/adconfig.pl -contextfile=/u02/oraapps/inst/apps/TEST1_<hostname>/appl/admin/TEST1_<hostname>.xml ****************** -log=/u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/acfg_log_Wed_May_29_13_38_03_2013.log
The log file for this session is located at: /u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/acfg_log_Wed_May_29_13_38_03_2013.log
AutoConfig is configuring the Applications environment...
AutoConfig will consider the custom templates if present.
Using CONFIG_HOME location : /u02/oraapps/inst/apps/TEST1_<hostname>
Classpath : /u02/oraapps/apps/apps_st/comn/java/lib/appsborg2.zip:/u02/oraapps/apps/apps_st/comn/java/classes
Using Context file : /u02/oraapps/inst/apps/TEST1_<hostname>/appl/admin/TEST1_<hostname>.xml
Context Value Management will now update the Context file
Updating Context file...COMPLETED
Attempting upload of Context file and templates to database...COMPLETED
Configuring templates from the entire product tops...
Configuring AD_TOP........COMPLETED
Configuring FND_TOP.......COMPLETED
Configuring ICX_TOP.......COMPLETED
Configuring MSC_TOP.......COMPLETED
Configuring IEO_TOP.......COMPLETED
Configuring BIS_TOP.......COMPLETED
Configuring AMS_TOP.......COMPLETED
Configuring CCT_TOP.......COMPLETED
Configuring WSH_TOP.......COMPLETED
Configuring CLN_TOP.......COMPLETED
Configuring OKE_TOP.......COMPLETED
Configuring OKL_TOP.......COMPLETED
Configuring OKS_TOP.......COMPLETED
Configuring CSF_TOP.......COMPLETED
Configuring IGS_TOP.......COMPLETED
Configuring IBY_TOP.......COMPLETED
Configuring JTF_TOP.......COMPLETED
Configuring MWA_TOP.......COMPLETED
Configuring CN_TOP........COMPLETED
Configuring CSI_TOP....... COMPLETED
Configuring WIP_TOP.......COMPLETED
Configuring CSE_TOP.......COMPLETED
Configuring EAM_TOP.......COMPLETED
Configuring FTE_TOP....... COMPLETED
Configuring ONT_TOP.......COMPLETED
Configuring AR_TOP........COMPLETED
Configuring AHL_TOP.......COMPLETED
Configuring OZF_TOP.......COMPLETED
Configuring IES_TOP.......COMPLETED
Configuring CSD_TOP.......COMPLETED
Configuring IGC_TOP.......COMPLETED
AutoConfig completed successfully.
################## END AUTOCONFIG RUN ##################
Log file to change the Forms Mode:
/u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/txkChangeFormsMode_Wed_May_29_13_38_03_2013.log
Program: /u02/oraapps/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChangeFormsMode.pl completed @ Wed May 29 13:42:52 2013
End of /u02/oraapps/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChangeFormsMode.pl : No Errors encountered
After Change socket to servlet mode we can see the status like below
-bash-3.2$ sh adformsrvctl.sh status
couldn't set locale correctly
You are running adformsrvctl.sh version 120.15.12010000.2
Forms Connect Mode is set to Servlet. Please Change Forms Mode to socket and then run this script.
adformsrvctl.sh: exiting with status 1
-bash-3.2$ sh adformsctl.sh status
couldn't set locale correctly
You are running adformsctl.sh version 120.16
Checking status of OPMN managed FORMS OC4J instance...
Processes in Instance: TEST1_<hostname>.<hostname>.<domain>
---------------------------------+--------------------+---------+-----------------------------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+-------------------------------
OC4JGroup:default_group | OC4J:oafm | 2713 | Alive
OC4JGroup:default_group | OC4J:forms | 2682 | Alive
OC4JGroup:default_group | OC4J:oacore | 2650 | Alive
HTTP_Server | HTTP_Server | 2597 | Alive


Oracle Apps DBA Issues

After logging into the Oracle Applications R12, some users are complaining about the error "You have insufficient privileges” Error but they click the home button it is working fine.

Solution:-
1. Manually run the Compile Security' concurrent program, set the parameter to YES
2. Restart the Middle Tier (Apache).
3. Retest the issue.

After logging into the Oracle Applications R12.1.2,They get the pop up message:"Number of open notifications Please use the workflow worklist to view and respond to your notification"

Solution:-
Each Application user that has notifications will be notified of them upon login if the Sign-On: Notification System
Profile option was set to yes. If you wish to stop getting these messages, request you to do the following:
1. Log into Oracle Applications.
2. using the System Administrator responsibility perform the following navigation:
/Profile /System /
3. Within the Profile window, enter: Sign-On: Notification and click on Find.
4. Using the list of values, this feature can be enabled setting it to Yes or Disabled setting it to No.
5. After changing the setting to No, log out of Applications and back in where the change will be in place.

Active users Request shows completed error in R12.
When we check the log file it shows below error
There was an error trying to initialize the HPI library.
Please check your installation, HotSpot does not work correctly
when installed in the JDK 1.2 Solaris Production Release, or
with any JDK 1.1.x release.
signal chaining not allowed for VM interrupt signal, try -XX:+UseAltSigs.
Program exited with status 1

Solution:-
At application user level go to $ORACLE_HOME/bin and take the backup of reports.sh file .then
vi reports.sh (under #Solaris Sparc we have to modify)
## Default settings
else
## Solaris Sparc
LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/sparc:$ORACLE_HOME/jdk/jre/lib/sparc/native_threads:$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/dt/lib:/usr/openwin/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
We have to add the $ORACLE_HOME/jdk/jre/lib/sparc/server: to starting of above path then we can see like below
LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/sparc/server:$ORACLE_HOME/jdk/jre/lib/sparc:$ORACLE_HOME/jdk/jre/lib/sparc/native_threads:$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/dt/lib:/usr/openwin/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
Note: The above solution is applicable on Solaris platform only

How to purge the bne.log file under $BNE_TOP/log in Oracle EBS R12
Solution:-
>bne.log

The core files shows big size under dbs directory in db oracle home
Solution:-
1. First we have to remove the core files under dbs directory by using >core command
2. Set sqlnet.expire_time=0 in $ORACLE_HOME/network/admin/sqlnet.ora on the server.
Restart the listener to ensure that these changes take effect.


Tuesday, July 2, 2013

Change Forms Mode from Servlet to Socket in R12

Run the following command to enable Forms Socket Mode on Forms/web nodes (Place correct context file name and Forms port value)
 -bash-3.2$ $FND_TOP/bin/txkrun.pl -script=ChangeFormsMode -contextfile=$CONTEXT_FILE -mode=socket -port=9000 -runautoconfig=No
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/txkChangeFormsMode_Wed_May_29_11_30_41_2013.log
Program : /u02/oraapps/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChangeFormsMode.pl started @ Wed May 29 11:30:41 2013
*** Log File = /u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/txkChangeFormsMode_Wed_May_29_11_30_41_2013.log
Arguments passed: -contextfile=/u02/oraapps/inst/apps/TEST1_<hostname>/appl/admin/TEST1_<hostname>.xml -mode=socket -port=9000 -runautoconfig=No-----------
Values used
-----------
Context File   : /u02/oraapps/inst/apps/TEST1_<hostname>/appl/admin/TEST1_<hostname>.xml
Mode           : socket
Port           : 9000
Run AutoConfig : No
Execute SYSTEM command : netstat -a
********************************
Backing up context file....
********************************
Context file backed up at: /u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/Wed_May_29_11_30_41_2013/TEST1_<hostname>.xml
********************************
Changing to Socket Mode.......
********************************
Updating context Variable s_forms_servlet_serverurl....
Updated context Variable s_forms_servlet_serverurl to
Updating context Variable s_frmConnectMode....
Updated context Variable s_frmConnectMode to socket
Updating context Variable s_formsstatus....
Updated context Variable s_formsstatus to disabled
Updating context Variable s_formsserver_status....
Updated context Variable s_formsserver_status to enabled
Updating context Variable s_other_service_group_status....
Updated context Variable s_other_service_group_status to enabled
Updating context Variable s_formsport....
Updated context Variable s_formsport to 9000
Updating context Variable s_formslauncher_path....
Updated context Variable s_formslauncher_path to OA_HTML/frmservlet
*********************************************************************************
You should run Autoconfig to update the runtime configurations to new Forms Mode.
*********************************************************************************
Log file to change the Forms Mode:
 /u02/oraapps/inst/apps/TEST1_<hostname>/logs/appl/rgf/TXK/txkChangeFormsMode_Wed_May_29_11_30_41_2013.log
Program: /u02/oraapps/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChangeFormsMode.pl completed @ Wed May 29 11:31:14 2013
End of /u02/oraapps/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChangeFormsMode.pl : No Errors encountered

   Once we changed to socket mode we have to run the autoconfig
Otherwise we get the below error
-bash-3.2$ sh adformsrvctl.sh status
You are running adformsrvctl.sh  version 120.15.12010000.2
Forms Connect Mode is set to Servlet. Please Change Forms Mode to socket and then run this script.
adformsrvctl.sh: exiting with status 1
.end std out.
couldn't set locale correctly
.end err out.
****************************************************
adstrtal.sh: Exiting with status 1
Once autoconfig Completed we see the status like below
-bash-3.2$ sh adformsrvctl.sh status
couldn't set locale correctly
You are running adformsrvctl.sh  version 120.15.12010000.2
Checking status of FORMS Server (Socket Mode)...
Forms Server (Socket) is running as PID 27321
adformsrvctl.sh: exiting with status 0
-bash-3.2$ sh adformsctl.sh status
couldn't set locale correctly
You are running adformsctl.sh  version 120.16
Not starting the Forms OC4J instance as Forms connect mode is set to socket.
adformsctl.sh: exiting with status 1
  1. How to check application is running servlet or socket mode
For Socket mode          :< URL> //<Port>/OA_HTML/frmservlet
For Servlet mode         : <URL>//<Port>/forms/frmservlet
  For Socket mode we can observe the URL like below in context file
<formslauncher_path oa_var="s_formslauncher_path">OA_HTML/frmservlet</formslauncher_path>
    For Servlet mode we can observe the URL like below in context file 
<formslauncher_path oa_var="s_formslauncher_path">forms/frmservlet</formslauncher_path>
 -bash-3.2$ grep Mode $CONTEXT_FILE
<forms_connect oa_var="s_frmConnectMode">socket</forms_connect> (In socket mode)
 <forms_connect oa_var="s_frmConnectMode">servlet</forms_connect> (in servlet mode)
        

Monday, July 1, 2013

OEM Configuration for Single db in Oracle

 We can execute below command in db level any location.
-bash-3.00$ emca -repos create
STARTED EMCA at Mar 18, 2013 5:16:44 AM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
Enter the following information:
Database SID: TEST1
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 18, 2013 5:17:00 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oradb/db/tech_st/11.1.0/cfgtool
Mar 18, 2013 5:17:01 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Mar 18, 2013 5:56:58 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Mar 18, 2013 5:56:58 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 18, 2013 6:27:38 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager Configuration completed successfully
FINISHED EMCA at Mar 18, 2013 6:27:38 AM
-Bash-3.00$ emca -config dbcontrol db
STARTED EMCA at Mar 18, 2013 6:28:55 AM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
Enter the following information:
Database SID: TEST1
Database Control is already configured for the database TEST1
You have chosen to configure Database Control for managing the database TEST1
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [Yes(Y)/no (N)]: Y
Listener port number: 1521
Password for SYSMAN user: Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u01/oradb/db/tech_st/11.1.0
Local hostname................ AAA.bbb.com
Listener port number ................ 1521
Database SID................ TEST1
Email address for notifications...............
Outgoing Mail (SMTP) server for notifications...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 18, 2013 6:29:37 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oradb/db/tech_st/11.1.0/cfgtoollogs/emca/TEST1/emca_2013_03_18_06_28_55.log.
Mar 18, 2013 6:29:40 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Mar 18, 2013 6:32:33 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Mar 18, 2013 6:49:46 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Mar 18, 2013 6:49:58 AM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Mar 18, 2013 6:49:58 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Mar 18, 2013 6:50:18 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Mar 18, 2013 6:50:18 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while)...
Mar 18, 2013 6:50:40 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Mar 18, 2013 6:50:40 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while)...
Mar 18, 2013 6:51:56 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Mar 18, 2013 6:51:56 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://AAA.bbb.com:5500/em <<<<<<<<<<<
Mar 18, 2013 6:52:06 AM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING ************************
Management Repository has been placed in secure mode wherein Enterprise Manager Data will be encrypted.  The encryption key has been placed in the file: /u01/oradb/db/tech_st/11.1.0/AAA.bbb.com_TEST1/sysman/config/emkey.ora.   Please ensure this file is backed up as the encrypted data will become unusable if this file is lost.
Enterprise Manager Configuration completed successfully
FINISHED EMCA at Mar 18, 2013 6:52:06 AM
_________________________________________________________________________________
Then we have to enable the port 5500 from server side.
Once the port 5500 enabled we will check the URL https://AAA.bbb.com:5500/em in internet explorer (or) chrome it will ask username and password. Then
We will give the SYSMAN username and password
                                                  (Or)
  We will give the SYS username and password as SYSDBA
Once password authentication done we will get the Oracle enterprise manager page.
                                 So Finally OEM Configuration has successfully completed
------------------------------------------------**********************---------------------------------------------------
 Errors:
                           We will get the below errors while implementing OEM.
-bash-3.00$ emca -repos create
First time whenever we implement OEM we have to give above command only to create repository
But sometimes  we will get the error like SYSMAN user already exist .in that situation we have to give the  emca -repos recreate command .
-bash-3.00$ emca -repos recreate
Error2:-
If you get any below error after passing the user name and password
1.       It will take long time to authenticate  (or)
2.        internet explorer cannot display the page error
Check the space for SYSAUX, SYSTEM and TEMP Table space.
Note: -   OEM is consuming very high TEMP tablespace



Sunday, June 30, 2013

What to Do If You Forgot Your APPS password in R12


We can find the apps password 3 methods

OS Level:-

1.  history|grep FNDCPASS
2.  vi .bash_history or .sh_history

DB Level:-

Step to Find APPS PASSWORD:
SQL> show user
USER is "SYS"
SQL> create or replace FUNCTION apps.decrypt_pin_func(in_chr_key IN VARCHAR2,in_chr_encrypted_pin IN VARCHAR2)
RETURN VARCHAR2
AS
LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
/

Function created.

SQL> select ENCRYPTED_FOUNDATION_PASSWORD from apps.fnd_user where USER_NAME='GUEST';

ENCRYPTED_FOUNDATION_PASSWORD
--------------------------------------------------------------------------------
PGA48F6CA123195C053FA4A247AE658615ECC4920653CBF5590CA458321526D79FD37F5AF6A5A9B5EEFE49F20547F673AB16


SQL> SELECT apps.decrypt_pin_func('GUEST/ORACLE','PGA48F6CA123195C053FA4A247AE658615ECC4920653CBF5590CA458321526D79FD37F5AF6A5A9B5EEFE49F20547F673AB16') from dual;

APPS.DECRYPT_PIN_FUNC('GUEST/ORACLE','PGA48F6CA123195C053FA4A247AE658615ECC49206
--------------------------------------------------------------------------------
apps

SQL>conn apps/apps;

connected

Saturday, June 29, 2013

Hot Cloning in Oracle Apps

   Source db name: TEST1
   Target db name: TEST2                     
On source:-
Step 1: Ensure adpreclone.pl has been run on dbTier and appsTier
Step 2:  we put the tablespace in begin backup mode and copy the datafiles

related that tablespace to target and give the end backup that tablespace. We have to repeat

these steps  for all tablespaces.

SQL> ALTER TABLESPACE <Tablespace Name> BEGIN BACKUP;

-bash-3.2$ copy datafiles related that tablespace from source to target using cp command


SQL> ALTER TABLESPACE <Tablespace Name> END BACKUP;

Step 3:-alter system switch logfile; (we have to give 2 to 3 times on source)

Step 4:- we have to copy the all archives from source to target

Note: (No need to copy the tempfiles,redolog files and controlfiles from source to target.
 Only db Files are enough including undo data files.)

On Target:-
We have to copy the Oracle Home from source to target then
Log on to the target system as the ORACLE user
Configure the <RDBMS ORACLE_HOME>
-bash-3.2$ cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
bash-3.2$ Perl adcfgclone.pl dbTechStack
Once the above command execution has completed. The listener has started automatically
-bash-3.2$ cd /u01/oradb/db/tech_st/11.1.0/dbs
  Step2:  we will export ORACLE_HOME and ORACLE_SID
-bash-3.2$ ORACLE_HOME=/u01/oradb/db/tech_st/11.1.0
-bash-3.2$ export ORACLE_HOME
-bash-3.2$ ORACLE_SID=TEST2
-bash-3.2$ export ORACLE_SID
-bash-3.2$ PATH=/u01/oradb/db/tech_st/11.1.0/bin:$PATH;
-bash-3.2$ export PATH
-bash-3.2$ pwd
/u01/oradb/db/tech_st/11.1.0/dbs
-bash-3.2$ pwd
/u01/oradb/db/tech_st/11.1.0/dbs
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Apr 1 22:32:45 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to an idle instance.
  Step3: - On the target system issue STARTUP NOMOUNT command
SQL> startup nomount pfile='/u01/oradb/db/tech_st/11.1.0/dbs/initTEST2.ora';
ORACLE instance started.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Apr 1 22:33:16 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Step4: - Run the prepared script for control file
SQL> @control.sql
Control file created.
SQL> shut immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> create spfile from pfile='/u01/oradb/db/tech_st/11.1.0/dbs/initTEST2.ora';
File created.
SQL> startup mount
Database mounted
Note: after mounted the database we have to set the log_archive_format and log_archive_dest parameters before recovering the database
SQL> alter system set log_archive_format='TEST1_%t_%s_%r.arc' scope=spfile;
System altered.
(Here we have to create the log_archive_format same in target and source)
alter system set log_archive_format='TEST1_%t_%s_%r.arc' ;(Source)
alter system set log_archive_format='TEST1_%t_%s_%r.arc'; (target)
Note:  we have to give the log_archive_format same as Source db name on target db name.
Because while recovering database we do not get any issue on target. Once db opened then we can give Log_archive_format as target db name on target server
SQL> alter system set log_archive_dest_1='location=/u02/oradb/archive' scope=spfile;
System altered.
SQL> shut immediate
ORACLE instance shut down.
SQL> startup mount
Database mounted.
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u02/oradb/archive
Oldest online log sequence     0
Next log sequence to archive   0
Current log sequence           0
Step5: -Start the db in recover mode
SQL> RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;                                               
(Here we have to give the AUTO Command. once we have given the AUTO Command it will take archives automatically from log_archive_dest parameter of target)
ORA-00279: change 1934005125 generated at 04/01/2013 17:26:47 needed for thread
1
ORA-00289: suggestion : /u02/oradb/archive/TEST1_1_5926_777925422.arc
ORA-00280: change 1934005125 for thread 1 is in sequence #5926
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00279: change 1934124711 generated at 04/01/2013 17:33:48 needed for thread
1
ORA-00289: suggestion : /u02/oradb/archive/TEST1_1_5927_777925422.arc
ORA-00280: change 1934124711 for thread 1 is in sequence #5927
ORA-00278: log file '/u02/oradb/archive/TEST1_1_5930_777925422.arc' no
longer needed for this recovery
ORA-00308: cannot open archived log
'/u02/oradb/archive/TEST1_1_5931_777925422.arc'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Step6: - Open the database with resetlogs:
SQL>
ALTER DATABASE OPEN RESETLOGS;
Database altered.
SQL> CREATE TEMPORARY TABLESPACE TEMP01 TEMPFILE '/u01/oradb/db/apps_st/data/temp01_01.dbf' SIZE 4g TABLESPACE GROUP tmpgrp;
Tablespace created.
SQL> CREATE TEMPORARY TABLESPACE TEMP02 TEMPFILE '/u01/oradb/db/apps_st/data/temp02_01.dbf' SIZE 4g TABLESPACE GROUP tmpgrp;
Tablespace created.
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE tmpgrp;
Database altered.
SQL> EXIT
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-bash-3.2$ pwd
/u01/oradb/db/tech_st/11.1.0/appsutil/install/TEST2_<hostname>
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Apr 1 22:46:39 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Step7: - Run the library update script against the database
SQL> @adupdlib.sql so
PL/SQL procedure successfully completed.
Where <libext> is "sl" for HP-UX, "so" for any other UNIX platform and not required
for Windows. 
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
--bash-3.00$ cd /u02/oradb/db/tech_st/11.1.0/appsutil/clone/bin/
-bash-3.00$ pwd
/u02/oradb/db/tech_st/11.1.0/appsutil/clone/bin
-bash-3.00$ ls
CloneContext_0526102023.log  adcfgclone.pl                adchkutl.sh                  adclone.pl                   adclonectx.pl
Step8: - Configure the target database (the database must be open)
-bash-3.00perl adcfgclone.pl dbconfig /u01/oradb/db/tech_st/11.1.0/appsutil/TEST2_<hostname>.xml
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Apr 1 22:51:56 2013
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> conn apps/apps
Connected.
SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-bash-3.2$ cd /u01/oradb/db/tech_st/11.1.0/appsutil/scripts/TEST2_<hostname>/
-bash-3.2$ pwd
/u01/oradb/db/tech_st/11.1.0/appsutil/scripts/TEST2_<hostname>
-bash-3.2$ ls
adautocfg.sh   addbctl.sh     adexecsql.pl   adpreclone.pl adstrtdb.sql
adchknls.pl    addlnctl.sh    adlsnodes.sh   adstopdb.sql
-Bash-3.2$ sh adautocfg.sh
Enter the APPS user password:
AutoConfig completed successfully.
Step9:-
-bash-3.2$ perl adcfgclone.pl appsTier
 Once The above script has completed successfully. Then it asks the
Do you want to startup the Application Services for TEST2? (y/n) [y] : Y
The application services are started automatically.


******************Hot Cloning activity has completed successfully******************

Friday, June 28, 2013

RMAN 'Duplicate from Active Database' Feature in 11G

Source: DB name: TEST1
Target: DB name: TEST2
On Target:-
 We have to copy the only Oracle home from source to target
On Target we create the listener by using below command or Netca
-Bash-3.00$cd <ORACLE_HOME>/appsutil/clone/bin
-Bash-3.00$perl adcfgclone.pl dbTechStack
Here listener.ora and tnsnames.ora files are created under                                                                                   $ORACLE_HOME/network/admin/SID_<hostname>.
But sqlnet.ora is not created under the above location. So that we have to copy the sqlnet.ora file from source to target
In Target database we have to set the only below parameters in initTEST2.ora
 Vi initTEST2.ora
*.db_name=TEST2
*.db_file_name_convert='/u01/oradb/db/apps_st/data','/u02/oradb/db/apps_st/data'
*.log_file_name_convert='/u01/oradb/db/apps_st/data','/u02/oradb/db/apps_st/data'
*.diagnostic_dest='/u02/oradb/db/tech_st/11.1.0/admin/TEST2_<hostname>'
*.control _files='/u02/oradb/db/apps_st/data/control01.dbf'
*.COMPATIBLE= 11.1.0.0.0
Here db_file_name_convert =<’source db file loc’>, < ‘target db file loc’>, < ’source db file loc’>, < ‘target db file loc’>, <’’>………………..;
  log_file_name_convert= ’<source log file loc>’,’< target log file loc>’;

Now we have to create the password file at $ORACLE_HOME/dbs Location in source and target like below
 bash-3.00$orapwd file=orapwTEST1   password=sys  force=y entries=5  (On source)   
bash-3.00$orapwd  file=orapwTEST2    password=sys  force=y entries=5  (On Target)
 Note: we have to provide the same password in source and target
On Target:-
We have to start the db in nomount state
-bash-3.00$ ps -ef|grep ora_
  oracle  4859  1718   0 16:29:48 pts/1       0:00 grep ora_
-bash-3.00$ ORACLE_SID=TEST2
-bash-3.00$ export ORACLE_SID
-bash-3.00$ sqlplus  sys/sys as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Fri Mar 8 16:30:07 2013
Copyright (c) 1982, 2008, oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile='/u02/oradb/db/tech_st/11.1.0/dbs/initTEST2.ora';
oracle instance started.
Then We have to create spfile from pfile. Then we start the db no mount state.
After that we have to check tnsping is working on Source and target
Note:  we have set the source tns entries and target tns entries in source and target of tnsname.ora file. Then we check the tnsping
$tnsping   <source IP>
$tnsping    <Target IP>
$tnsping   <Source db name>
$tnsping   <target db name>
On Source:-
$tnsping   <source IP>
$tnsping    <Target IP>
$tnsping   <Source db name>
$tnsping   <target db name>
If  tnsping connection is fine. Then we will check the at sqlplus level
Bash-3.0sqlplus sys/sys@TEST2 as sysdba (From Source)
 Bash-3.0sqlplus sys/sys@TEST1 as sysdba (From Target)
If everything fine we can proceed next step
On Target:-
-bash-3.00$ rman target sys/sys@TEST1 nocatalog  auxiliary sys/sys@TEST2
Recovery Manager: Release 11.1.0.7.0 - Production on Fri Mar 8 16:48:06 2013
Copyright (c) 1982, 2007, oracle  All rights reserved.
connected to target database: TEST1 (DBID=4138996220)
using target database control file instead of recovery catalog
connected to auxiliary database: TEST2 (not mounted)
RMAN> duplicate target database to 'TEST2' from active database
 db_file_name_convert  ‘/u01/oradb/db/apps_st/data','/u02/oradb/db/apps_st/data';
Starting Duplicate Db at 08-MAR-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=98 device type=DISK
contents of Memory Script:
{
   set newname for datafile  1 to "/u02/oradb/db/apps_st/data/system01.dbf";
   set newname for datafile  2 to "/u02/oradb/db/apps_st/data/system02.dbf";
   set newname for datafile  3 to "/u02/oradb/db/apps_st/data/system03.dbf";
   set newname for datafile  4 to "/u02/oradb/db/apps_st/data/system04.dbf";
   set newname for datafile  5 to  "/u02/oradb/db/apps_st/data/system05.dbf";
   backup as copy reuse
   datafile  1 auxiliary format "/u02/oradb/db/apps_st/data/system01.dbf"   datafile
 2 auxiliary format  "/u02/oradb/db/apps_st/data/system02.dbf"   datafile
 3 auxiliary format "/u02/oradb/db/apps_st/data/system03.dbf"   datafile
 4 auxiliary format  "/u02/oradb/db/apps_st/data/system04.dbf"   datafile
 5 auxiliary format "/u02/oradb/db/apps_st/data/system05.dbf"   datafile
 sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 08-MAR-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=334 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00045 name=/u01/oradb/db/apps_st/data/a_txn_data08.dbf
output file name=/u02/oradb/db/apps_st/data/a_txn_data08.dbf tag=TAG20130308T075928 RECID=0 STAMP=0
STAMP=809551448cataloged datafile copy
cataloged datafile copy
input datafile copy RECID=1 STAMP=809551447 file name=/u02/oradb/db/apps_st/data/system02.dbf
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 08-MAR-13.
RMAN>
********database will open automatically on target******
 Error 1:-
RMAN> duplicate target database to 'TEST2' from active database
 db_file_name_convert  ‘/u01/oradb/db/apps_st/data','/u02/oradb/db/apps_st/data';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/08/2013 17:38:49
RMAN-06136: oracle error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01130: database file version 11.1.0.0.0 incompatible with version 11.0.0.0.0
ORA-01110: data file 1: '/u02/oradb/db/apps_st/data/system01.dbf'
We will get the above yellow marked error while creation of Control file level
 we can resolve the above issue by providing below solution
Solution: - we add the COMPATIBLE= 11.1.0.0.0 parameter in initTEST2.ora file.
Error 2:-
Contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount ;
}
executing Memory Script
database dismounted
oracle instance shut down
connected to auxiliary database (not started)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/09/2013 13:04:28
RMAN-03015: error occurred in stored script Memory Script
RMAN-04014: startup failed: ORA-48141: error creating directory during ADR initialization [/u02/oradb/db/tech_st/11.1.0/admin/SID_<hostname>/diag/rdbms//u01/oradb/db/apps_st/dat]
ORA-48189: OS command to create directory failed
SVR4 Error: 2: No such file or directory
Additional information: 2

Solution: - create the spfile from pfile then we need to execute the same script