Friday, September 6, 2013

Step by step Patching On Oracle Applications 11i and Apache in restricted mode in R12

PATCHING STEPS

Step 1 : Set Environment Variables by executing APPSORA.env
Login as Oracle user.
In R11i we will do as follows:
$ cd /d01/oracle/prodappl
$. ./APPSORA.env
Step 2 : Stop Apps Services
In R11i we will do as follows:
$ cd /d01/oracle/prodcomn/admin/scripts/PROD_erp
Execute the following script
$./adstpall.sh apps/appspassword
The script prompts are shown below for 11i
Please Note : Database and Database Listener Should be up.

Step 3 - Enable Maintenance Mode
We need to run adadmin to change maintenance mode as shown below.
In R11i we will do as follows:
$ cd /d01/oracle/prodappl/ad/11.5.0/bin
$./adadmin
give the inputs asked by adadmin
when the main menu of adadmin will apper
select option 5 for changing maintenece mode
enable the maintenece mode.
and exit.
Step 4 - Patching using adpatch
 Unzip the downloaded patch from metalink.
 Open readme.html file from unzipped patch folder.
 Read the  readme.html of patch # 6502082 for 11i.
We need to follow the steps mentioned in readme.html of the patch we are going to apply.
 Here we have the patch contains the u6502082.drv.Oracle has changed the patch files and now only one file is included that has prefixed as u<patch number> .drv, previously patch had three files to apply with prefixes (c, d, g).
In R11i we will do as follows:
 Change directory $ cd /do1/oracle/prodappl/ad/11.5.0/bin
$./adpatch
 Run adpatch as shown below
and give priffered input and location of patch file,name of the patch
and then it will asks for .drv file
after sucessfull completion of patch with out errors
change maintenance mode and start all services.

In 11i and R12 Apache in restricted mode

E-Business Suite Release 12 provides a useful mechanism for the Applications administrators to start the Apache on the applications tier during down time. Applications administrator can start the apache in a mode called restricted mode. Down time tasks like patching can continue to be performed while the Apache is in restricted mode. Restricted access to Oracle Applications Manager (OAM) is available in this mode. This allows the system administrator to monitor taskslike patching from OAM. When the Apache is started in restricted mode, normal users are redirected to a downtime URL containing downtime details.

Enabling Maintenance mode while Patching
Use OAM to schedule downtime ( Navigation: Sitemap=>Maintenance=>Patching and
utilities=>Schedule Downtime)
Whats the use of Enabling maintenance, even though down we bring all the services while patching…
While patching we can monitor the patch logs and timing reports etc.. through OAM.For this we need to log in through an URL as ‘ad_monitor’ user.Oracle Applications Manager uses this schema to monitor running patches. Although the default password for
AD_MONITOR is ‘lizard’, the 
schema is created locked and expired.
The SQL script       $AD_TOP/patch/115/sql/admonusr.sql creates AD_MONITOR.. 














SQL> select USERNAME,ACCOUNT_STATUS,EXPIRY_DATE from dba_users
where username like ‘%AD%MONITOR%’;
USERNAME ACCOUNT_STATUS EXPIRY_DA
—————————— ——————————– ———
AD_MONITOR EXPIRED & LOCKED
SQL> ALTER USER AD_MONITOR ACCOUNT UNLOCK;
User altered.
SQL> select USERNAME,ACCOUNT_STATUS,EXPIRY_DATE from dba_users
where username like ‘%AD%MONITOR%’;
USERNAME ACCOUNT_STATUS EXPIRY_DA
—————————— ——————————– ———
AD_MONITOR EXPIRED
SQL> CONN AD_MONITOR/LIZARD;
ERROR:
ORA-28001: the password has expired
Changing password for AD_MONITOR
New password:
Retype new password:
Password changed
Connected.
SQL> CONN AD_MONITOR/LIZARD;
Connected.
Stop all the services :adstpall.sh apps/apps
Enable maintanence mode : cd $AD_TOP/patch/115/sql
sqlplus apps/apps @adsetmmd.sql ENABLE
start the web server : sh adapcctl.sh start
Login to browser with :http://hostname:port/servlets/weboamLocal/oam/oamLogin
login with user details :ad_monitor/lizard
We can monitor the following
Timing Reports
Manage Downtime Schedules
Database Sessions
Applications Manager Log ..etc.,

Enable restrict mode of Apache in R11i

sh adapcctl.sh stop
sh adaprstctl.sh start

Enable restrict mode of Apache in R12
1. Login to your applications tier as application user and source the
environment file if it is not set in user bash profile.
2. Stop your all application tier services by running adstpall.sh from
$ADMIN_SCRIPTS_HOME. And check if any application services by using
ps -ef|grep applmgr
3. Run the script 'txkrun.pl -script=ChangeApacheMode' from the $FND_TOP/bin
4. Then it'll prompts for the following inputs:
a). full path for the Applications Context file
b). Enter the mode for Apache. Type 'Restrict'
c). Confirmation of whether you have stopped your applications tier
services
5. Once you enter the above details, the configuration script
a). sets the respective context variables in the context file required to
configure the Restricted mode
b). instantiates the configuration files for the HTTP Server and OC4J in
the ..
6. Restart all application services on the applications tier.
Whenever the users try to access the Applications home page, they get redirected to the downtime page generated when you schedule downtime.

Disable restrict mode of Apache in R12
-------------------------------
1. Login to your applications tier as application user and source the
environment file if it is not set in user bash profile.
2. Stop your all application tier services by running adstpall.sh from
$ADMIN_SCRIPTS_HOME. And check if any application services by using
ps -ef|grep applmgr
3. Run the script 'txkrun.pl -script=ChangeApacheMode' from the $FND_TOP/bin
4. Then it'll prompts for the following inputs:
a). full path for the Applications Context file
b). Enter the mode for Apache. Type 'Normal'
c). Confirmation of whether you have stopped your applications tier
services
5. Restart all application services on the applications tier.


No comments:

Post a Comment