R12.2 Apps DBA. Powered by Blogger.

Stop & Start OID and OAM components in R12.2

No comments :
Stop Services
STOP MANAGED SERVERS ON OAM WEBLOGIC INSTANCE
1.Login to weblogic console for  OAM
http://hostp01.shostnameapdba.com:7013/console/login/LoginForm.jsp 
Enter Weblogic username & password
Username: weblogic
2.Navigate to IAMDomain > Environment > Servers > Click on Control tab
Select all the server > Shutdown > Force Shutdown > Click yes on yes screen   
STOP MANAGED SERVERS ON IDM WEBLOGIC INSTANCE
3.Login to weblogic console for  IDM
http://hostp01.shostnameapdba.com:7011/console/login/LoginForm.jsp
Enter Weblogic username & password
Username: weblogic
4.Navigate to IDMDomain > Environment > Servers > Click on Control tab
Select all the server > Shutdown > Force Shutdown > Click yes on yes screen
KILL ANY JAVA PROCESS
5.Log on to LINUX machines   as apsupoid@hostp01
6.Kill any leftover process
ps -ef | grep java |grep apsupoid |grep "/idm/" | grep -v grep | awk '{print $2}' | xargs kill -9
ps -ef | grep Node |grep apsupoid |grep "/idm/" | grep -v grep | awk '{print $2}' | xargs kill -9
ps -ef | grep java |grep apsupoid |grep "/iam/" | grep -v grep | awk '{print $2}' | xargs kill -9
ps -ef | grep Node |grep apsupoid |grep "/iam/" | grep -v grep | awk '{print $2}' | xargs kill -9
rm  /tmp/U*
rm  /var/tmp/U*
STOP IDM OPMN SERVICES
7.Log on to LINUX machines  apsupoid@hostp01
8.Stop IDM OPMN services
on apsupoid@hostp01
.  /home/apsupoid/env/idm.env
/d02/app/apsupoid/idm/instances/IDM_inst1/bin/opmnctl status -l
/d02/app/apsupoid/idm/instances/IDM_inst1/bin/opmnctl stopall
STOP WEB OPMN SERVICES
9.Log on to LINUX machines    apsupoid@hostp01
10.Stop WEB OPMN services
on apsupoid@hostp01
. /home/apsupoid/env/web.env
/d02/app/apsupoid/idm/instances/ohsinst1/bin/opmnctl status -l
/d02/app/apsupoid/idm/instances/ohsinst1/bin/opmnctl stopall
Start Services
START IDM OPMN SERVICES
11.Log on to LINUX machines    apsupoid@hostp01
12.Start  IDM OPMN services
on apsupoid@hostp01
.  /home/apsupoid/env/idm.env
/d02/app/apsupoid/idm/instances/IDM_inst1/bin/opmnctl startall
/d02/app/apsupoid/idm/instances/IDM_inst1/bin/opmnctl status -l
START IDM WEBLOGIC ADMIN SERVER
13.Log on to LINUX machines  apsupoid@hostp01
14.Start  IDM services
apsupoid@hostp01:
. /home/apsupoid/env/idm.env
cd $WLS_HOME/bin
nohup ./startNodeManager.sh > log/node_start.log 2>&1 &
cd $DOMAIN_HOME
nohup ./startWebLogic.sh  > log/wls_start.log 2>&1 &
Log Location
echo " tail -10f $WLS_HOME/bin/log/node_start.log "
echo " tail -10f $DOMAIN_HOME/log/wls_start.log "
Tail the output
tail -10f $WLS_HOME/bin/log/node_start.log
tail -10f $DOMAIN_HOME/log/wls_start.log
START IDM WEBLOGIC MANAGED SERVERS (WLS_ODS)
15.Login to weblogic console for  IDM
http://hostp01.shostnameapdba.com:7011/console/login/LoginForm.jsp
Enter Weblogic username & password
Username: weblogic
16.Navigate to IDMDomain > Environment > Servers > Click on Control tab
Select all the server > Control > Start > Click yes on yes screen
START IAM WEBLOGIC ADMIN SERVER
17.Log on to LINUX machines  apsupoid@hostp01
18.Start  IAM services
apsupoid@hostp01::
. /home/apsupoid/env/iam.env
cd $WLS_HOME/bin
nohup ./startNodeManager.sh > log/node_start.log 2>&1 &
cd $DOMAIN_HOME
nohup ./startWebLogic.sh  > log/wls_start.log 2>&1 &
Log Location
echo " tail -10f $WLS_HOME/bin/log/node_start.log "
echo " tail -10f $DOMAIN_HOME/log/wls_start.log "
Tail the output
tail -10f $WLS_HOME/bin/log/node_start.log
tail -10f $DOMAIN_HOME/log/wls_start.log
START IAM WEBLOGIC MANAGED SERVERS (WLS_OAM/WLS_ACCESSGATE)
19.Login to weblogic console for  OAM
http://hostp01.shostnameapdba.com:7013/console/login/LoginForm.jsp
Enter Weblogic username & password
Username: weblogic
20.Navigate to IAMDomain > Environment > Servers > Click on Control tab
Select all the server > Start > Click yes on yes screen
START WEB OPMN SERVICES
21.Log on to LINUX machines  apsupoid@hostp01
22.Start  OHS services
on apsupoid@hostp01
. /home/apsupoid/env/web.env
/d02/app/apsupoid/idm/instances/ohsinst1/bin/opmnctl startall
/d02/app/apsupoid/idm/instances/ohsinst1/bin/opmnctl status -l
Test and validate
23.Login to WebLogic console for  OAM
http://hostp01.shostnameapdba.com:7013/console/login/LoginForm.jsp
Enter Weblogic username & password
Username: weblogic
Navigate to IAMDomain > Environment > Servers
Make sure all services are up & running
24.Login to weblogic console for  IDM
http://hostp01.shostnameapdba.com:7011/console/login/LoginForm.jsp
Enter Weblogic username & password
Username: weblogic
Navigate to IDMDomain > Environment > Servers
Make sure all services are up & running
Login into the below header check with you network credentials
https://oracleoam.shostname.com/headercheck/header.jsp
Enter your Network ID and Password

Installation of Oracle Apex 5.0

No comments :
Instance Name      : APDBA
Installation Path   :  $ORACLE_HOME/apex
Software                :  apex_5.0_en.zip
                                   ords.3.0.1.177.18.02.zip
Summary of the Installation Process steps:-
A.      Installation Of base APEX Software (Ver:- 5.0)
B.       Choosing Apex Web Listener (Embedded PL/SQL gateway in our case):-
1.       Oracle REST Data Services (formerly Oracle Application Express Listener).
2.       Oracle HTTP Server
3.       Embedded PL/SQL gateway
Install Apex with Embedded PL/SQL Gateway and Oracle XML DB Protocol Server                 
(All these software is available in /ora/APDBA/home/product/11.2.0)
Steps
1. Checking Version of Database
Col Comp_name Format a22
Col Status Format a12
Select Comp_name, status, Version from Dba_Registry Order by Comp_name;
2. Installing Full development environment.
 Connect as sys
SQL> @apexins.sql SYSAUX SYSAUX TEMP /i/
3. Change the Password for the ADMIN Account
 @apxchpwd
Enter a password for the ADMIN user   Oracleapex$123
4. Unlocking and changing the password APEX_PUBLIC_USER
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY APEX_PUBLIC_USER;
5. Installing the Apex listener using  Embedded PL/SQL Gateway (EPG) Configuration
Run the "apex_epg_config.sql" script, passing in the base directory of the installation software as a parameter.
SQL> CONN sys@pdb1 AS SYSDBA
SQL> @apex_epg_config.sql /ora/APDBA/home/product/11.2.0
Unlock the ANONYMOUS account.
SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK;
If this is an upgrade to an existing APEX installation, you will also have to run the following script, to update the images.
SQL> @apxldimg.sql /ora/APDBA/home/product/11.2.0
Check the port setting for XML DB Protocol Server.
SQL> SELECT DBMS_XDB.gethttpport FROM DUAL;
GETHTTPPORT
-----------
          0
1 row selected.
If it is set to "0", you will need to set it to a non-zero value to enable it.
SQL> EXEC DBMS_XDB.sethttpport(8080);
PL/SQL procedure successfully completed.
6.  Execute the below to provide Network ACL privilege to APEX owner
SQL> DECLARE
2 ACL_PATH VARCHAR2(4000); 3 BEGIN 4 -- Look for the ACL currently assigned to '*' and give APEX_050000 5 -- the "connect" privilege if APEX_050000 does not have the privilege yet. 6 7 SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS 8 WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL; 9 10 IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_050000', 11 'connect') IS NULL THEN 12 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH, 13 'APEX_050000', TRUE, 'connect'); 14 END IF; 15 EXCEPTION 16 17 -- When no ACL has been assigned to '*'. 18 WHEN NO_DATA_FOUND THEN 19 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml', 20 'ACL that lets power users to connect to everywhere', 21 'APEX_050000', TRUE, 'connect'); 22 DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*'); END; 23 24 / COMMIT; PL/SQL procedure successfully completed.
7. Set the following init parameters for XDB protocol registration with the Listener
*.dispatchers=(PROTOCOL=TCP)(SERVICE=APDBAXDB)
*.LOCAL_LISTENER = (ADDRESS=(PROTOCOL=TCP)(HOST=APDBA-APDBA1.global.internal)(port=1542))
8. Recycle the APDBA services(application + database + listener)
9. Verify the XDB dispatchers are running
lsnrctl status APDBA
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCAPDBA)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=APDBA-APDBA1.global.internal)(PORT=1542)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=APDBA-APDBA1.global.internal)(PORT=8080))(Presentation=HTTP)(Session=RAW))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=APDBA-APDBA1.global.internal)(PORT=2100))(Presentation=FTP)(Session=RAW))
Services Summary...
Service "APDBA" has 2 instance(s).
  Instance "APDBA", status UNKNOWN, has 1 handler(s) for this service...
  Instance "APDBA", status READY, has 1 handler(s) for this service...
Service "APDBAXDB" has 1 instance(s).
  Instance "APDBA", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
10. Verify if the port 8080 is listening -
[obdev@APDBA-APDBA1 dbs]$ netstat -plan|grep 8080
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 :::8080                     :::*                        LISTEN      13373/tnslsnr
11. Access the below links
To access Application Express administration services, use -
http://APDBA-APDBA1.global.internal:8080/apex/apex_admin   
Administrator username: admin
Password: apdbapex$123
Link to the Application Express development interface is as follows:
http://APDBA-APDBA1.global.internal:8080/apex   
References:
How to Setup XDB Protocol Server: FTP, HTTP, WebDAV (Doc ID 362540.1)

R12.2 ADOP ONLINE PATCHING.

No comments :
POSSIBLE VALUES
DESCRIPTION
PHASE=PREPARE
PHASE=APPLY
PHASE=CUTOVER
PHASE=CLEANUP
PHASE=FINALIZE
PHASE=ACTUALIZE_ALL
PHASE=FS_CLONE
PHASE=ABORT
These are the eight phases in which adop can run. It is most important and mandatory parameter that is used with adop.
You can also club multiple phases in single command like ‘PHASE=PREPARE,APPLY’ although abort and fs_clone need to be run alone and can’t be clubbed.Standard phases:
prepare – Prepare the instance for patch application.
apply – Apply patches (to the patch edition).
finalize – Ready the instance for cutover. It is run automatically.
cutover – Make the patch edition the new run edition.
cleanup – Drop obsolete objects and data from old editions. It is run automatically. 
There are also three special phases, used as per requirement.
Special phases:
abort – Abort the current patching cycle. The abort phase can be run after either the prepare or apply phases have been run, but not after the cutover phase.
actualize_all – Create new copies of all code objects in the patch
edition.
fs_clone – Copy the run file system to the patch file system.
LOGLEVEL=STATEMENT
LOGLEVEL=PROCEDURE
LOGLEVEL=EVENT
LOGLEVEL=WARNING
LOGLEVEL=ERROR
LOGLEVEL=UNEXPECTED
 STATEMENT > for debugging.
PROCEDURE > for debugging high level procedures.
EVENT > to capture informational messages in normal processing. (default)
WARNING > to capture any internal error that is handled by the system and does not affect processing.
ERROR > indicates action failed, need to be reviewed, but the system continue processing.
UNEXPECTED > indicates an unrecoverable error, requires user intervention before processing can continue.
CLEANUP_MODE=FULL
CLEANUP_MODE=STANDARD
CLEANUP_MODE=QUICK
Cleanup processing needs to happen after adop finishes the patching work.Quick mode > shortest execution time, skips non-essential actions
Standard mode > All quick mode action + drops covered objects
Full mode > All quick mode action +  remove all unused code, data, and old editions and takes much longer
FINALIZE_MODE=QUICK
FINALIZE_MODE=FULL
Quick mode > shortest execution, skips non-essential actions, no gather statistics.
Full mode > Gather statistics, may improve performance after cutover, can take an hour extra to complete.
INPUT_FILE=<Absolute input_file path>
 To specify the name of the input_file supplied to adop. (see details on input_file later in this post)
WORKERS=<User-specified-value>
Number of parallel workers used to execute tasks.In earlier released  adpatch used to prompt for number of workers. With adop in R12.2, if you want  to override the default formula that oracle uses now to calculation number of workers, use the WORKERS parameter. Take care that you don’t specify very high number of workers or else adop will fail.
 MAXWORKERS=<User-specified-value>
Maximum parallel workers that can be engaged. maxworkers should always be set to greater than the desired number of workers.
 RUNCONTEXTFILE=<Absolute context_file path>
 To specify the non-default context file patch in RUN filesystem
 PATCHCONTEXTFILE=<Absolute context_file path>
  To specify the non-default context file patch in PATCH filesystem
 PATCHES=<User-specified-value>For Standard Patch:when>patch directory is  a 6- to 8-digit number PATCHES=<patch_number>
For Non-Standard Patch when
> patch directory is not a 6- to 8-digit number example NLS patches <patch_number>_<language_code>.
> patch driver files are not named *<patchnum>.drv example merged patchesPATCHES=<patch_number>:<driver_file>.drv
This parameter specifies the patches adop needs to apply.Remember the numbered-only patches (standard) and containing-a-colon categories of patch (non-standard) can be mixed.Like:PATCHES= <patch_number1>,  <patch_number2>:<driver_file2>.drv
 DEFAULTSFILE=<Absolute defaults_file path>
Default file locations on both the run APPL_TOP and patch APPL_TOP is: $APPL_TOP/admin/<SID>_patch/adalldefaults.txtIn case you have created your own defaults file and want to use that instead, then use this parameter.
PATCHTOP=<Absolute patch_location_file path>
 Default patch_top location is below.$NE_BASE/EBSapps/patchIf you want to keep your patches in some other lcoation, then you need to use this patrameter to let ADOP know where to search for patches pointed by ‘patches’ parameter.If you have a multi-node environment, you must download and unzip the patches (under $APPL_TOP_NE/EBSapps/patch) on the respective nodes.
MERGE=NO
MERGE=YES
In R12.2, oracle has integrated patch merging action in the patching command itself. In earlier releases we used to first merge patches using admrgpch command.By using MERGE=YES option ADOP will merge all the unified driver files into a single driver file.
ABANDON=YES
ABANDON=NO
If the patch you are applying went into error, you have two option when you start the adop utility again.1) you corrected error and want to continue with previous adop session:ABANDON=NO2) you decided that you don’t want to correct issue for now and want to abandon the previous adop session:ABANDON=YES
RESTART=NO
RESTART=YES
If the patch you are applying went into error and you corrected the issue and want to restart the previous patching session.It is just the reverse of ABANDON parameter.Remember ABANDON and RESTART will always have opposite value.
FLAGS=AUTOSKIP
Use “flags=autoskip” in conjunction with the “abandon=no” parameter at the command-line to skip a failing patching step to “Continue as if a patch were successful”. You need to review the “autoskip” log that gets generated during the patching cycle in order to make sure that their were no errors and to take required actions in case of any errors
ALLNODES=NO
ALLNODES=YES
This parameter comes into picture when you have multi node setup. If you want to run adop on all nodes then use ALLNODES=YES.
ACTION=DB
ACTION=NODB
Use this parameter to specify whether to perform database actions or skip. For example if you are in a multi-node environment and adop has already updated the database so when running on other node just use ACTION=NODB to save time.Remember when you are using ‘allnodes=yes’ in a multi-node ‘action=db’ must be specified.
APPLY=YES
APPLY=NO
To run adop in test mode (without applying any patches),specify apply=no
AUTOSKIP=YES
AUTOSKIP=NO
This parameter control whether the user is prompted about skipping actions in non-interactive patching. This is specifically useful when you are applying patches in multi node setup.
MTRESTART=YES
MTRESTART=NO
This parameter specify whether to restart application tier services after cutover phase or not.
 CM_WAIT=user_specified_number
Specifies the number of minutes to wait until the ICM will be forced down.
ALLOWCOREDUMP=NO
ALLOWCOREDUMP=YES
To specify that a core dump will be generated if adop crashes.
ANALYTICS=NO
ANALYTICS=YES
To specify that a report will be generated that can help debug certian adop issue.
PREINSTALL=Y
This mode is used only if the patch readme instructs. Generally this mode is used during the upgrade process to update AD utilities, apply pre-upgrade patches, or work around other patching issues.It will Compares version numbers, Copies files, Relinks FND and AD executables, Saves patch information. It also runs autoconfig if required.The dual file system in Release 12.2 means that there is no need to shut down application tier services before running AutoConfig.
 -help
Shows the help screen.
-STATUS (for latest session)
-STATUS <SESSION_ID> (for specific session)
Display status of the latest adop session.Use ‘adop -status -detail’ for detailed info
ADOP EXAMPLE :
‘Complete’ adop patching cycle using parameters input through command line  (INTERACTIVE MODE)
You must set the environment by executing the run file system environment file.
$ . <run APPL_TOP path>/APPS<CONTEXT_NAME>.env
1) adop phase=prepare
2) adop phase=apply patches=<patch_number1>,<patch_number2> workers=<number_of_worker>
3) adop phase=finalize workers=<number_of_worker> (called automatically)
4) adop phase=cutover workers=<number_of_worker>
5) adop phase=cleanup (called automatically)
OR Running all phases in single command:
adop phase=prepare,apply,finalize,cutover,cleanup patches=<patch_number1>,<patch_number2>
All the phases need to be completed and you can’t skip any of these. For example, if you try to skip prepare phase, you may get error message like “Apply phase can only be run while in a patching cycle, i.e. after prepare phase.”
$ adop phase=apply input_file=<input_file.txt>
Location of Default file on both the run APPL_TOP and patch APPL_TOP is:
$APPL_TOP/admin/<SID>_patch/adalldefaults.txt
Just in case this file gets corrupted or lost, you can run AutoConfig and it will automatically instantiate a new copy.
NOTE: In R12.2, you don’t need to create this defaults file. The file is already created by oracle process. However you need to create one ‘input file’ to use with adop (The defaults file is not specified on the adop command line. It is the input file.)
The input_file contents should include the following required parameters:
patches=<patch number>
workers=<number of workers>
patchtop=<directory where patches are staged>
defaultsfile=<defaults file on patch APPL TOP>
 To skip specific patching portion or action
adop phase=apply options=nodatabaseportion, nogenerateportion
options=noactiondetails  — if you do not want the details to be printed.
options=noautoconfig  — if you are applying a number of patches in sequence and want to run
AutoConfig only once in the end.
option=nocheckfile –to turn off the checkfile feature. Using checkfile adop skip some actions which are   already done.
option=nocompiledb –when applying multiple NLS, documentations patches etc
option=nocompilejsp –when applying multiple NLS, documentations patches etc
option=nocopyportion  –for skipping copy portion of the patch
To apply patch in ‘HOTPATCH’ mode
adop phase=apply options=hotpatch
examples commands by typing on Unix command prompt  ‘adop -examples‘ .
Phases in adop
Phases must be specified in the order they run, which is the order listed.
Prepare Prepare the instance for online patching.
Apply Apply patches to the patch edition.
Finalize Ready the instance for cutover.
Cutover Promote the patch edition to become the new run edition.
Cleanup Drop obsolete objects and seed data from old editions.
Examples :
$adop phase=prepare                      
$adop phase=prepare, apply patches=12345, 67890 merge=yes workers=4
$adop phase=prepare, apply
$adop phase=apply input_file=adopsession20120702.txt
To fully automated patching with all parameters taken from input_file:
$adop input_file=adopsessions20120702.txt
To apply patches in hotpatch mode
$adop phase=apply input_file=adopsession20120702.txt hotpatch=yes
Parameters (all are optional):
$adop -status    (Status of the last or specific adop session)
$adop -help      (Provides usage details for the adop command)
cleanup_mode (optional cleanup processing control)
loglevel  (Takes values 'statement', 'exception', 'error', 'unexpected' [default: statement])
defaultsfile        (Path to custom adop defaults file)
patchtop             (Path to the user-specified directory where patches are unzipped)
mtrestart           (Takes values 'yes' or 'no' [default: yes]. Specifies whether to restart
                          the middle tier services at the end of cutover)
Parameters relevant for the apply phase
workers      (Specify number of parallel workers. If not specified, will be calculated automatically)
merge          (Merge patches before applying. Takes values 'yes' or 'no' [default: yes])
NOTE: This replaces AD Merge Patch
Abandon   Used to specify whether to restart the previous run of adop.
$adop phase=apply patches=10721639 abandon=yes
restart
Used to specify whether to restart the previous run of ADOP. May be useful if the previous action had an error.
$adop phase=apply patches=10721639 restart=yes
Note: If there was an error in the previous run, and 'abandon' is not set to 'yes', the same parameters will be re-used that were used in the failed run.
If you give a value for the 'restart' parameter, it cannot be the same as the value given for this parameter.
hotpatch
Applies patches in hotpatch mode. Takes values 'yes' or ‘no’ [default: no].
NOTE: This does not require or allow any other phases to be specified except 'apply'.
How ADOP patches work on Multi node?
Adop patch is online "Patching Tool" uses remote APIs and ssh logging to execute patching operation on remote in a multi node environment. The Node that launch Adop become "Master node" and remote node become "salves".
NOTE: You only need to patch one node in a multi-node shared file system, but you must run AutoConfig manually on all the other nodes.
options=nocompiledb            when applying multiple NLS, documentations patches etc
options=nocompilejsp           when applying multiple NLS, documentations patches etc
options=nocopyportion        for skipping copy portion of the patch  
If adop phase=abort has run, then before proceeding further run below command
$adop phase=cleanup cleanup_mode=full
Error: Unable to continue as already another user is using adzdoptl.pl.
Previous session exist, cannot continue as per user input.
Workaround: Update the internal adop repository table for the latest session setting the status to completed.
Run the following statement to find out the session that is in running state:
SQL>select adop_session_id from ad_adop_sessions where status='R';
Set the status to 'C' (Completed) for that session, to re-try the phase that was interrupted:
SQL>update ad_adop_sessions set status='C' where status='R;
commit;
The EBS Technology Codelevel Checker (ETCC) is downloaded via Patch 17537119 and instructions to run the EBS Technology Codelevel Checker (ETCC) (checkDBpatch.sh and checkMTpatch.sh) are available in th patch's readme. 
ADZDDBCC - database compliance checker, shows violations of the database object development standards documented in the Oracle E-Business Suite Developer's Guide, Part No. E22961. Warning: this script takes a long time to run.
ADZDSHOWED - Show database editions and current edition.
ADZDSHOWLOG - Show full diagnostic log for online patching infrastructure
ADZDSHOWLOGEVT - Show only event and error messages from online patching diagnostic log (a useful summary, without the detailed statement text).
ADZDSHOWLOGERR - Show only error messages from online patching diagnostic log.
ADZDSHOWEV TABLE_SYNONYM_NAME - Show editioning view column mapping for table.
ADZDSHOWTAB TABLE_SYNONYM_NAME - Show table information and related objects.
ADZDSHOWMV MVIEW_NAME - Show materialized view information and related objects.
ADZDSHOWTS - Show important tablespace status. Ensure that you have enough SYSTEM tablespace.
ADZDCMPED - Compare Patch Edition with Run Edition. Warning: this script may take a long time to run.
ADZDSHOWDDLS - Show stored DDL summary by phase.
ADZDALLDDLS - Show stored DDL statement text and status.
ADZDDDLERROR - Show stored DDL execution errors and messages.
adutlrcmp - Recompile all objects, with before/after status report. Warning: this script may take a long time to run.
The following scripts are for experts:
ADZDSHOWOBJS - Show Object Summary per edition. Counts of actual and stub (inherited) editioned object per edition.
ADZDSHOWAOBJS - Show Actual Objects in the current edition. These are the editioned objects that have been changed by the patch.
ADZDSHOWIOBJS - Show Inherited Objects in the current edition. These are the editioned objects that remain untouched in the Patch Edition.
ADZDSHOWCOBJS - Show Covered Object Summary per edition. Count of objects in old editions that have a replacement in the run edition.
ADZDSHOWCOBJX - Show Covered Object List. List of objects in old editions that have a replacement in the run edition.
ADZDSHOWSM - Show Seed Manager status.
ADZDSHOWTM - Show Table Manager status.
ADZDSHOWAD - AD (online patching) database object status
ADZDSHOWSES - Show sessions connected to the database (by edition).
ADZDSHOWDEP OBJECT_NAME - Show objects that OBJECT_NAME depends on.

ADZDSHOWDEPTREE OBJECT_NAME - Show full dependency tree of objects that OBJECT_NAME depends on.
==========================
How ADOP works ?
The online patching cycle consists of five phases which are executed in order. Example of a typical online patching cycle:
source <ebs_root>/EBSapps.env run
adop phase=prepare
adop phase=apply patches=123456
adop phase=finalize
adop phase=cutover
source <ebs_root>/EBSapps.env run
adop phase=cleanup
Note that after cutover the command line environment should be re-loaded as the run edition file system has changed.
In a multi-node deployment, adop commands are only executed from the primary node. The primary adop session uses remote execution to automatically perform required actions on any secondary node.
Multiple phases of adop can be executed in a single line command. Example of combined finalize/cutover/cleanup:
adop phase=finalize,cutover,cleanup
Prior to cutover, it is possible to execute additional “apply” and “finalize” phases as needed. Example of applying multiple patches using separate apply commands:
source <ebs_root>/EBSapps.env run
adop phase=prepare
adop phase=apply patches=123456
adop phase=apply patches=223456
adop phase=finalize
adop phase=apply patches=323456
adop phase=finalize
adop phase=cutover
source <ebs_root>/EBSapps.env run
adop phase=cleanup
Note that it is possible to apply additional patches after running the finalize phase, but if you do so then you will need to run the finalize phase again. Finalize must always be run immediately prior to cutover.
ADOP Common Parameters
workers=<number> [default: computed]
Number of parallel workers used to execute tasks. Default value is computed principally according to number of available CPU cores.
input_file=<file_name>
adop parameters can be specified in a text file, with one
<parameter>=<value>
on each line of the file. Command line parameters override input file parameters.
loglevel=(statement|procedure|event|warning|error|unexpected) [default: event]
Controls the level of diagnostic log detail displayed on the console output. Each log message is tagged with a level:
1) statement – is only used for debugging.
2) procedure – is only used for debugging high level procedures.
3) event – is used to display informational messages in normal processing. This is the default value.
4) warning – is used to indicate an internal error that is handled by the system and does not affect processing.
5) error – indicates an action failed and will need to be reviewed by the user, but the system was able to continue processing.
6) unexpected – indicates an unrecoverable error that halts processing and requires user intervention before processing can continue.
Setting loglevel will display messages at that level and higher.
prompt=(yes|no) [default: yes]
Specifies whether adop should prompt for user input on warnings. By default adop will ask user whether to continue or exit on some warning messages. If this parameter is set to “no” adop will remain fully non-interactive, and will continue past any warning messages without user confirmation.
Below is the list of Diagnostic Parameters. Normally these parameters are not used, until unless directed by Oracle Support:
allowcoredump=(yes|no) [default: no]
Specifies whether adop should create a core dump if it crashes. This option should only be used if directed by support.
analytics=(yes|no) [default: no]
Controls whether adop writes additional reports with information that might be helpful in some diagnostic situations. This option should not be used unless directed by Support.
defaultsfile=<file_name> [default: adalldefaults.txt]
Name of the response file providing default parameter values for non-interactive execution of adadmin and adop. The file must be in the $APPL_TOP/admin/$TWO_TASK directory in both run edition and patch edition file systems. The default file “adalldefaults.txt” is maintained by AutoConfig and normally you should not need to change any values.
ADOP Prepare Phase
Prepare phase will be create a new Online Patching Cycle ID and start with Syncronizing the File System of Run into Patch. This will be followed by creation of Patch Edition in database.
The phase has below specific parameter:
skipsyncerror=(yes|no) [default: no]
It specifies whether to ignore errors that may occur during incremental file system synchronization. This might happen if you applied a patch in the previous patching cycle that had errors but decided to continue with the cutover. When the patch is synchronized on the next patching cycle, the apply errors may occur again, but can be ignored.
After complition of Prepare Phase you can start with migration of customization to the Patch Edition File System and you can apply Application Technology Stack Patches i.e. Oracle Home (10.1.2) Patches and Weblogic Patches. This can be done until you are completed with Cutover Phase.
ADOP Apply Phase
This is the phase where in patches are actully applied.
The phase has below specific parameters:
apply=(yes|no) [default: yes]
Controls whether adop actually applies the patch. You can specify “apply=no” to run adop in test mode, where the patch will not actually be applied, and adop will record what it would have done in the log.
patches=<patch#>[,<patch#>…]
patches=<patch_directory>:<driver>[,<patch_directory>:<driver>…]
This parameter specifies a comma-separated list of patches to be applied. Patches can be specified either as the patch number or by the patch directory and driver file. All patches are expected to be in the $PATCH_TOP directory on all tiers. Patches are applied serially unless the merge=yes parameter is specified.
patchtop=<directory_name> [default: $PATCH_TOP]
Path to a user-specified directory where patches are unzipped. The default and recommend location is the $PATCH_TOP directory automatically created by the install. When using an alternate patchtop you must ensure that the location is not within the editioned file systems (fs1, fs2) and is accessible by the same path for all nodes of a multi-node deployment.
apply_mode=(online|downtime|hotpatch) [default: online]
It is used to specify how the patch will be applied. There 3 option can be explained as below:
online – It will apply a patch to the patch edition during an online patching cycle.
downtime – It will apply a patch to the run edition when application services are down. When using this mode, you only run the apply phase.
hotpatch – apply a patch to the run edition when application services are up. When using this mode, you only run the apply phase
In downtime mode, adop will validate that application services are shutdown before apply the patch. The patch will be applied to the run edition of the system. Downtime mode patching does not use an online patching cycle and hence if there is an online patching cycle in progress. The process of applying a patch in downtime mode completes more quickly than in online mode, but at the cost of increased system downtime.
In hotpatch mode, adop will apply the patch to the run edition of the system while application services are still running. Patches that can be safely applied in hotpatch mode (such as NLS and Online Help patches) will document this in the patch readme. Hotpatch mode cannot be used if there is an online patching cycle in progress.
merge=(yes|no) [default: no]
Indicates whether adop should merge a list of patches before applying. By default, adop will apply a list of patches serially in the order specified. You can also use AD Merge Patch to merge multiple patches ahead of the apply command.
restart=(yes|no) [default: no]
Use restart=yes to resume the previous failed apply command from where processing terminated. If an apply command fails, check the log files for further information. If the problem can be corrected, you can then restart the apply command where it left off using the restart parameter.
When restarting a failed apply it is important to use the same parameters as the failed command, with only the addition of the restart=yes parameter.
abandon=(yes|no) [default: no]
Use abandon=yes to abandon the previous failed apply command and start a new apply command. Note that any changes made to the system by the failed command will remain in effect. The abandon flag is most useful when applying a replacement patch for the failing patch. If a patch fails to apply and there is no replacement patch, you may also abort the online patching cycle. See abort phase later in this blog.
options=<patch_option>[,<patch_option>…]
Options can be specified in a comma-separated list to control advanced features when a patch is applied. These options are normally not needed unless specified by documentation or support. Note that these options can be prefixed with “no”, e.g. “nocheckfile”, to disable the behavior, and for some options “no” is the default.
checkfile [default: checkfile] – Skip running exec, SQL, and exectier commands if they are recorded as already run.
compiledb [default: compiledb] – Compile invalid objects in the database after running actions in the database driver.
compilejsp [default: compilejsp] – Compile out-of-date JSP files, if the patch has copy actions for at least one JSP file.
copyportion [default: copyportion] – Run commands found in a copy driver.
databaseportion [default: databaseportion] – Run commands found in a database driver.
generateportion [default: generateportion] – Run commands found in a generate driver.
integrity [default: nointegrity] – Perform patch integrity checking
autoconfig [default: autoconfig] – Run AutoConfig.
actiondetails [default: actiondetails] – Turn off display of action details.
parallel [default: parallel] – Run actions that update the database or actions that generate files in parallel.
prereq [default: noprereq] – Perform prerequisite patch checking prior to running patch driver files.
validate [default: novalidate] – Connect to all registered Oracle E-Business Suite schemas at the start of patch application.
phtofile [default: nophtofile] – Save patch history to file
forceapply [default: noforceapply] – Reapply a patch that has already been applied. Useful in combination with “nocheckfile” option to rerun files that have already been executed.
flags=<patch_flag>[,<patch_flag>…]
Flags can be specified in a comma-separated list to control advanced features when applying a patch. Note that these flags can be prefixed with “no”, e.g. “nologging”, to disable the behavior and for some flags “no” is the default.
hidepw [default: hidepw] – Omit the “HIDEPW:” comments in the log file.
trace [default: notrace] – Log all database operations to a trace file.
logging [default: nologging] – Create indexes in LOGGING or NOLOGGING mode.
autoskip [default: noautoskip] – To proceed with adpatch execution even if some driver actions failed. Failed actions are recorded in a log file.
preinstall=(yes|no) [default: no]
Allows a patch to be applied to the file system without connecting to the database. Do not use this parameter unless directed by Oracle.
wait_on_failed_job=(yes|no) [default: no]
Controls whether adop apply command exits when all workers have failed. Instead of exiting, you can force adop to wait, and use the “adctrl” to retry failed jobs.
printdebug=(yes|no) [default: no]
Controls whether to display additional debugging information.
uploadph=(yes|no) [default: yes]
Controls whether to upload patch history information to database after applying the patch.
ADOP Finalize Phase
Finalize Phase is performed to keep the system ready for Cutover phase. This phase perform various activities like:
1. Compiling Invalid Objects
2. Generating driverd objects
3. Pre-compute DDL to be run during Cutover
Finalize Phase have below specific parameters:
finalize_mode=(full|quick) [default: quick]
Quick mode will provide the shortest execution time, by skipping non-essential actions. Full mode performs additional actions such as gathering statistics that may improve performance after cutover.
ADOP Cutover Phase
Cutover phase perform below activities:
1. Bring down Application services
2. Promote Patch File System to the Run File System.
3. Promote Patch Database Edition to the Run Database Edition.
4. Perform Maintenance task
5. Bring up application services
Cutover Phase have below specific parameters:
mtrestart=(yes|no) [default: yes]
Specifies whether to restart application tier servers after cutover. Leave at default unless you need to perform any manual steps during downtime.
cm_wait=<minutes> [default: forever]
Specifies the number of minutes to wait for Concurrent Manager shutdown. Adop cutover starts by requesting a concurrent manager shutdown and then waits for in-progress requests to complete. If Concurrent Manager does not shutdown within the specified time limit, remaining concurrent requests will be killed and cutover will proceed.
Note that any concurrent requests killed during forced shutdown may need to be manually re-submitted after cutover. To avoid killing concurrent requests, schedule cutover at a time of minimal user activity or manually shutdown Concurrent Manager in advance of cutover.
ADOP Cleanup Phase
This phase will cleanup the Application and Database for the next Patching Cycle.
Cleanup phase specific parameters are:
cleanup_mode=(full|standard|quick) [default: standard]
Quick mode provides the shortest execution time, by skipping non-essential actions. Standard mode performs additional processing to drop obsolete code objects from old editions. Full mode performs additional processing to drop empty database editions and unused table columns.
Cloning the Patch Edition File System
The patch edition file system is normally synchronized with the run edition file system during the prepare phase. There are some cases where it is helpful or required to manually re-clone the patch edition file system from the run edition.
1) After aborting an online patching cycle.
2) After manually changing the run edition file system.
3) After patching middle-tier technology components.
4) After applying an EBS RUP.
By re-cloning the patch edition file system, you can be certain that it is correctly synchronized, and also minimize any synchronization delay that would normally occur on the next prepare command. This can be down by below command:
adop phase=fs_clone
If there is any error you must examine log files and correct the problem, then restart the fs_clone by running the command again. User below command if fs_clone does not restart correctly and you want to force the process to restart from the beginning.
adop phase=fs_clone force=yes
Aborting an online patching cycle
If an online patching cycle encounters problems that cannot be fixed immediately you can abort the patching cycle and return to normal runtime operation. Aborting an online patching cycle can be issue as below:
adop phase=abort
Note that once you are done with Cutover phase, you can abort ADOP Cycle.
The abort command drops the database patch edition and returns the system to normal runtime state. Immediately following abort, you must also run a full cleanup and fs_clone operation to fully remove effects of the failed online patching cycle.
Dropping old database editions
As online patching cycles are completed, the system will build up a number of old database editions. When the number of old database editions reaches about 25, you should consider running a special maintenance operation to drop old database editions. This can be down as below:
adop phase=prepare
adop phase=actualize_all
adop phase=finalize
adop phase=cutover
adop phase=cleanup cleanup_mode=full
This maintenance operation will take much longer than a typical online patching cycle, and should only be performed when there is no immediate need to start a new online patching cycle. The actualize all and full cleanup can be done separately as shown above, or can be executed in conjunction with an online patching cycle.
Log File Location
The adop log files are located on the non-editioned file system (fs_ne), under:
$NE_BASE/EBSapps/log/adop/<adop_session_id>/<phase>_<date>_<time>/<context_name>/log
Session

The adop utility maintains a session for each online patching cycle. A new session is created when you run the prepare phase. Each session is given a numeric ID number. The session is used to maintain the state of the online patching cycle across the various adop phases and commands. You can only run one adop session at a time on a particular Oracle E-Business Suite system.
======================================