Friday, April 20, 2018

Patching Interview Question

Patching


Describe the AD Administration Main Menu  
  1.    Generate Applications Files menu
   2.    Maintain Applications Files menu  —Snapshot details
   3.    Compile/Reload Applications Database Entities menu ————-COMPILE APPS schema (invalid objects or runtime error)
   4.    Maintain Applications Database Entities menu  
   5.    Change Maintenance Mode —–While patching
   6.    Exit AD Administration
 Maintain Snapshot Information
   1.    List snapshots
   2.    Update current view snapshot
   3.    Create named snapshot
   4.    Export snapshot to file
   5.    Import snapshot from file
6.       Delete named snapshot(s)










1.)Take the snapshot of the appl_top

  > I have some doubts regarding the APPL_TOP snapshot features.
>
> 1. How is the current view snapshot created? 
Current view snapshot is created through adadmin 

> 2. (How) Can just a current view snapshot  be created/updated (i.e.
> without creating a named snapshot)? 
Yes again through adadmin 


> 3. When is the current view snapshot used? When is the named snapshot used? 


> 4. Why must we run adadmin “Maintain Snapshot Information” before we apply a patch if  AutoPatch automatically updates the list of file versions and bug
> fixes in the current view snapshot for each APPL_TOP as patches are applied to that APPL_TOP? 
Eventhough autopatch automatically updates the list of file versions 
and bug fixes in the current view snapshot, we can not "trust" that 
every patch ran ok and updated the information.  You must run 
"Maintain snapshot information" once for each APPL_TOP so that the 
automatic prerequisite patch checking feature has a complete picture 
of your file system.   This can take up to two hours per APPL_TOP. 
This step does not require that users be logged off of Oracle 
Applications. To reduce downtime, you may run this step with users on 
the system. 

APPL_TOP snapshot information is stored in the AD_SNAPSHOTS, AD_SNAPSHOT_FILES, and
AD_SNAPSHOT_BUGFIXES tables


2.) Put the database in maintenance mode either using adadmin .

    In the adadmin utility you will get a main menu where you can select to 'change to maintenance mode' then you will get a sub menu where you select 'Enable Maintenance Mode', If you want to disable select 'Disable Maintenance Mode'. When you Enable or Disable 'Maintenance Mode', adadmin will execute the below script:

$AD_TOP/patch/115/sql/adsetmmd.sql sending the parameter 'ENABLE' or 'DISABLE'

When adsetmmd.sql runs, it sets the Profile Option 'Applications Maintenance Mode' (APPS_MAINTENANCE_MODE) to 'MAINT' to Enable 'Maintenance Mode' and to 'NORMAL' to Disable it.

select fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;
FND_PROFILE.VALUE('APPS_MAINTENANCE_MODE')
--------------------------------------------------------------------------------
NORMAL




[OTST1_BALANCE]-->echo $APPL_TOP
/OTST1/shared/apps/apps_st/appl
[applmgr@amxt05ap01a:/OTST1/shared/apps/apps_st/appl/ad/12.0.0/bin]
[OTST1_BALANCE]-->echo $AD_TOP
/OTST1/shared/apps/apps_st/appl/ad/12.0.0

Q: Whether we can apply 2 patches at a time without merging them, why ??
A: We can’t apply 2 patches at a time because when patch started it will create 2 tables in db (AD_DEFERRED_JOBS AND
FND_INSTALL_PROCESSES). If you apply patches at a time both will try to create those 2 tables in db, so both will fail.



1. Utility used to apply application patch is ??
Ans 
à “adpatch”
Note -- Various options available with adpatch are
option=nocheckfile, noautoconfig, nocompiledb, nocompilejsp, nocopyportion, nodatabaseportion, nogenerateportion, hotpatch, integrity, prereq, noprereq, nomaintainmrc, validate, nojcopy, noforcecopy, forcecopy, nolink, nogenform,nogenrep
2. For database patch utility used to apply patch is ??
Ans 
à“opatch”
Note -- .log and .lgi files for adpatch will be under $APPL_TOP/admin/SID/log directory.
3. What are .lgi files for ?
Ans à While applying patch put the system in maintenance mode by running
$adadmin  and then select option 5 (change maintenance mode) after that select options enable/disable maintenance mode. (
You can also change system to maintenence mode using $AD_TOP/patch/115/sql/adsetmmd.sql)
4.By default where adadmin log file will go??
Ans 
à$APPL_TOP/admin/$SID/log/
5. How to check what adpatch is doing ??
Ans 
à“adctrl” is the utility to do check status of ad worker, including adpatch.
6. What are various stages of adpatch worker
Ans 
àFirst of all workers will be in “waiting” stage after that jobs will be “assigned” then “running“, If error doesn’t come it will move to “complete” (waiting -> assigned -> running -> complete)
If error comes it will go like waiting -> assigned -> running -> failed -> fixed ->restarted -> completed
7. What is Default number of workers:
Ans 
à2 times the number of CPU on the database server.
8. Have you ever seen worker status as deferred, while using adctrl ??
Ans 
àOnce you start applying patch , manager assigns jobs and unique ID to each worker. Manager will also insert one row into FND_INSTALL_PROCESSES table for each worker  with information about who is doing what ???
1) CONTROL_CODE 2) STATUS, these two columns are important for us from thefnd_install_processes. Manager will monitor the workers by these two columns about status of the assigned job.Once worker is done with first job, manager will assign it the second job to do with the status update as <assigned>.
Once all the worker’s status is completed for all the jobs, manager will tell the workers to shutdown and will drop fnd_install_process table.
9. What happens if worker is working on some particular job say updating some table but that table is locked ??? so what the worker will do in such situation…
Ans àThat’s the AD_DEFERRED_JOBS table which will be created at the time ofFND_INSTALL_PROCESSES and ad_deferred_jobs too will be dropped with FND_INSTALL_PROCESSES. First time when worker checks and find that table is locked, that job fails and manager will automatically defers the job, and it will assigns a new job to the worker.
    The job which was waiting in ad_deferred_jobs table will be assigned again till time it will not become failed or completed.
In such situation above, worker will wait till either the lock is released or timed out is reached and We (DBA) need not to take any action till the job status becomes fails…. once it shows its failed we can fix it and restart it.
10. Why APPS schema present in the 11i application ??
Ans 
à It reduces traffic because all the product schemas will grant full privileges to Apps schema. so it will have full access to the complete Oracle application.
All the products like AP,AR,FIN has the code for respective products and APPS will have access to all these code objectives too. Apps will have all the synonyms for base tables and sequences as well.
 OBJECT_NAME
——————————————————————————–
OBJECT_TYPE        STATUS  OWNER
—————— ——- ——————————
BEN_PL_PCP_S
SYNONYM            VALID   APPS
BEN_PL_PCP_TYP_S
SYNONYM            VALID   APPS
BOM_CTO_ORDER_DEMAND_S1
SYNONYM            VALID   APPS

16: Whats things you do to reduce patch timing ? You can take advantage of following -

Merging patches via admrgpch
Use various adpatch options like nocompiledb or nocompilejsp
Use defaults file
Staged APPL_TOP during upgrades
Increase batch size (Might result into negative )


119: What is difference between AD_BUGS & AD_APPLID_PATCHES ?

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

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.

116: How will you skip worker during patch ?

If in your adctrl there are six option shown then seventh is hidden option.(If there are seven options visible then 8th option is to Skip worker depending on ad version).

115: What is .lgi files ?


lgi files are created with patching along with .log files . .lgi files are informative log files containing information related to patch. You can check .lgi files to see what activities patch has done. Usually informative logs.

90: While applying Apps patch using adpatch, if you want to hide the apps password, how will that be possible ?




Use adpatch flags=hidepw while applying patches in apps to hide apps or system password being displayed on Users Screen.

52. How to find out which patch driver is applied(like c,d,g or u)?
Ans: query ad_patch_drivers.
53. How to find out whether a language patch is applied for a perticular patch?
Ans : Query ad_patch_driver_langs.

No comments:

Post a Comment