Saturday, August 31, 2019

What is Smart Scan in Exadata?

What is Smart Scan in Exadata?


It is a feature of the Exadata Software which enhances the database performance many times over. It processes queries in an intelligent way, retrieving specific rows rather than the complete blocks. It applies filtering criteria at the storage level based on the selection criteria specified in the query.

Wednesday, August 28, 2019

Oracle E-Business Suite Interview Questions

Oracle E-Business Suite Interview Questions 


Difference between Oracle EBS 12.1.3 and Oracle EBS R12.2.0 ?

1)In R12.2 we have two kind of filesystems fs1(run filesystem) and fs2(patch filesystem) where as In R12.1.3 we only deal with one application filesystem.

2)In R12.2 we have the Application servers replaced by Weblogic server to manage the technology statck.
The 10.1.3 Home is replaced by FMW  (Fusion Middleware Home) i.e $FMW_HOME

3)The major change in R12.2 is involvement of Weblogic server to manager all the forms,oacore servers
where as in R12.1.3 we had the Application server 10.1.3 to manage the web home or Java Home

4)The adpatch(patching) in R 12.1.3 is replaced by adop(online patching) in R 12.2.4

5)adop utility involves 5 phases to apply a standard patch in Oracle EBS R12.2.4.

6)While installing Oracle EBS 12.2.0 ,It will ask for TWO PORT POOLS one for the run file system and another patch file system.

7)In oracle EBS 12.2.0 ;While starting and stop all services it will ask weblogic password in additional to apps.

How to check prerequisite patches while applying Database Patch using opatch?

Go to the Directory where patch is copied(PATCH TOP)
$OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Verify the Logfile
Message:Patch 18308717 is not subset of any other patch processed till now
From the above logs we can confirm that there are no-prerequistics patches to be applied before applying 18308717.

Name few profiles, which will differentiate the prod to test ?

Base Desktop look and feel
Site name
Java Colour scheme
Java Look and Feel

fnd_conc_clone.setup_clean ?

fnd_conc_clone.setup_clean:
fnd_conc_clone  ===> is package
setup_clean ====> it is procedure name
When we run fnd_conc_clone.setup_clean it deletes the information from the below tables.
fnd_conc_clone.setup_clean to cleanup fnd_nodes table in the target to clear source node information as part of cloning.
Delete from fnd_concurrent_queue_size
Delete from fnd_concurrent_queues_tl
Delete from fnd_concurrent_queues
Delete from fnd_nodes;

Syntax:
Connect as apps user:
SQL> exec fnd_conc_clone.setup_clean;
PL/SQL procedure successfully completed.
SQL> commit;
Post step:
run the autoconfig on DB tier and middle tier this will register the nodes in fnd_nodes tables.

What is cmclean.sql ?

Scenario when to run:
To cleanup running and pending requests we use cmclean.sql, If we stop concurrent managers using abort options then concurrent requests will be in running state ,Next when we start concurrent manager the processes will not start properly.

Clean out the concurrent manager tables by re-setting values to ZERO.

If cmclean.sql is run when the concurrent managers are up and running ,the script will not be able to clean and remove the rows from the concurrent manager process and request tables as the ICM and other managers will be holding locks on these tables.So its better to shutdown the concurrent manager cleanly and then run the cmclean.sql

CMCLEAN will update below tables:
1) FND_CONCURRENT_QUEUES
2) FND_CONCURRENT_PROCESSES
3) FND_CONCURRENT_REQUESTS
4) FND_CONFLICTS_DOMAIN
5) FND_CONCURRENT_CONFLICT_SETS

what is the difference between local inventory and global inventory ?

1.Local Inventory:
Inventory inside each Oracle Home is called as local Inventory or ORACLE_HOME Inventory. This Inventory holds information to that ORACLE_HOME only.
2.Global Inventory
The central inventory directory outside the ORACLE_HOME (Global Inventory.Global Inventory holds the information about Oracle Products on a Instance, The inventory contains the high level list of all oracle products installed on a machine such as ORACLE_HOMES or JRE.
oraInst.loc in /etc (on Linux) or /var/opt/oracle (solaris).

* The inventory in the ORACLE_HOME (Local Inventory)
* The central inventory directory outside the ORACLE_HOME (Global Inventory)

What to do if my Global Inventory is corrupted?

If your global Inventory is corrupted, you can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option
#NAME?
./runInstaller -silent -attachHome -invPtrLoc $location_to_oraInst.loc ORACLE_HOME=Oracle_Home_Location ORACLE_HOME_NAME=Oracle_Home_Name CLUSTER_NODES={}

why do you run root.sh ?

Root.sh to create a ORATAB in /etc/oratab
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname of /u01/app/oraInventory to dba.

When running on RAC :

1)It Sets Oracle base and home environmental variables.
2)The /etc/oratab file will be created
3)It Performs the super user privileges verification.
4)Adds trace directories
5)It Generates OCR keys for the 'root' user.
6)Adds a daemon to inittab
7)Starts the Oracle High Availability Service Daemon (OHASD) process.
8)It Stops/starts a cluster stack and other cluster resources on the local node
9)Performs a backup of the OCR file
10)Installs the cvuqdisk-1.0.7-1 package
11)Updates the Oracle inventory file.

How to find Oracle EBS Weblogic Server Admin Port and URL ?

1.grep -i s_wls_adminport $CONTEXTFILE
Check for the value 'WLS Admin Server Port'.

2.grep -i AdminServer $CONTEXTFILE
Check for 'listen-port' value of the 'AdminServer'

Weblogic console URL
http://<server name>. <domain name> : <weblogic Admin Port>/console
Ex: http://oracle.test1.com:7001/console

What is Oracle Home Inventory?

Oracle home inventory or local inventory is present inside each Oracle home. It only contains information relevant to a particular Oracle home. This file is located in the following location:
$ORACLE_HOME/inventory
It contains the following files and folders:
* Components File
* Home Properties File
* Other Folders

What is fndfs and fndsm ?

In Oracle application listener support two services FNDFS and FNDSM

FNDFS or the Report Review Agent (RRA) is the default text viewer within Oracle Applications, which allows users to view report output and log files.
FNDSM is the Service manager. FNDSM is executable & core component in GSM ( Generic Service Management Framework ).

what is nofilenamecheck in rman ?

If you want the duplicate filenames to be the same as the target filenames, and if the databases are in different hosts, then you must specify NOFILENAMECHECK. If duplicating a database on the same host as the target database, do not specify the NOFILENAMECHECKoption. Otherwise, RMAN may signal error.

What is DBC File in oracle apps?

The .dbc file is actually the database connector descriptor file used to connect to database and this file is by-default located in $FND_TOP/secure directory, this file is quite important as whenever any program likes to connect to database like forms it uses dbc file where there you find the Guest_user_pwd ,when the guest user connect it does not allow it to directly connect to the database but it first connect goes via this file and cross verify the password of the guest which is kept in this file.
DBC file is quite important as whenever Java or any other program like forms want to connect to database it uses dbc file.
Typical entry in dbc file are:
GUEST_USER_PWDAPPS_JDBC_URLDB_HOST

what are the Different Oracle Application Database Users ?

Standard Users:
* Apps user
* Applsys
* Applsyspub
* Gust user
* Sysadmin

Custom Users:
* Oracle
* Applmgr

Apps:
Apps User is a Application Super User or Universal Schema. Apps User has complete access to EBS Data Module.  & APPS User has privilege to access all Application Objects.
• All runtime Applications connect to Apps Schema,
• Apps User is the owner of all Business Modules.
• Apps is the owner of AOL (Application Object Library) at Database level.
• All Tables Synonym of other Users by default will be granted to Apps User, so that the Apps User can be access the other Users Schema.

Applsys:
Applsys User is a common User created for all Technology Modules.
• Applsys is a owner of All Technology Modules & (Application Data Dictionary).
• Applsys is the owner of Application at Database Level.

Sysadmin:
Sysadmin is the System Administrator User to perform System Administrative tasks.

Applmgr:
Applmgr User is the owner of Application Database Tire at O/S level.

Oracle:
Oracle Useris the owner of Oracle Database Tire at O/S level.

Applsyspub:
Applsyspub User checks the authentications. It will have all the login& logout details of the Users.

Note:- Apps is the default password for both Apps User and Applsys User.
If we change the Password of Apps User then it will automatically change the Password of Applsys User also.

Gust user:-
It is  application user with no responsibilities.
GUEST_USER_PWD=GUEST/ORACLE

Aborting an Online Patching Cycle ?

If a patching cycle is failing and the issue cannot be resolved quickly, it is possible to abort the patching cycle and return to normal runtime operation. The patch edition will be dropped.
You can abandon a patching cycle (without applying any patches) by running the command:
$ adop phase=abort
Important: This abort command can only be used before successful completion of the cutover phase. After cutover, the system is running on the new edition, and abort is no longer possible for that patching cycle.
Aborting a patching cycle will drop the patch edition, but you must then run the cleanup and fs_clone phases before starting a new patching cycle. The cleanup must be a full cleanup.
For example:
$ adop phase=prepare
$ adop phase=apply patches=123456
[Patch application encounters problems and you want to abort]
$ adop phase=abort
$ adop phase=cleanup cleanup_mode=full
$ adop phase=fs_clone
Optionally, you can combine the abort and cleanup commands as follows:
$ $ adop phase=abort,cleanup cleanup_mode=full
Note: You cannot abort application of a patch applied in hotpatch mode or downtime mode.

On a R12 Multi-Node Install -- Why Do All Middle Tiers Run All Services ?

In R12, the concept for Applications Nodes has changed.  When installing R12 with multiple nodes. all the nodes are now set as 'Y' in FND_NODES.
This occurs because in R12, concept of unified APPL_TOP is introduced which means everything is laid down on all servers.
From the APPL_TOP perspective, all the Servers on a Multi-Node Environment will have the same files and can now potentially start any Service if needed.  In some cases, additional configuration will be required before this can be done since there can be profiles, etc associated with each Server.
For R12, the only difference between the Servers, are the Services that have been activated on each Node.
The Services are identified by the variables on the /service_group/ section in the APPS Context File:
Root Service Group : s_root_status
Web Entry Point Services : s_web_entry_status
Web Application Services : s_web_applications_status
Batch Processing Services : s_batch_status
Other Service Group : s_other_service_group_status
Depending on the value of these variables (enabled or disabled), adstrtal.sh / adstpall.sh will only start/stop the Services associated with them, ignoring the rest.
For example, if a node has only /s_batch_status/ "enabled" and the rest of the services are disabled, when you run adstrtall.sh on that Server and it will only start the Concurrent Managers and the TNS Listener for Apps.

Why is adop still showing phase APPLY status ACTIVE after having applied successfully a patch using "adop phase=apply hotpatch=yes"?
There were no errors in the adop patch logs.  But adop status still shows ?

One cannot run adop phase=cutover or adop phase=cleanup because there are no Online Patching cycle that was started.
The patch was applied in hotpatch=yes mode on the RUN filesystem.

When the patch is applied with adop hotpatch=yes mode, there are no Online Patching cycle started yet -- all is on the RUN filesystem -- so there are no adop commands that can be used like adop phase=cutover or adop phase=cleanup.
Example:
When one applies in hotpatch mode the APPLY phase will remain active until such time as run a PREPARE during the next patching cycle.
The APPLY phase is active because you can potentially run another hotpatch.
Once one apples a hotpatch, there are no further actions required.
When needing to apply a new patch -- this time in Online Patching mode -- run the adop phase=prepare command.
At that time, adop config change detector will find that the RUN filesystem has had patches applied in hotpatch mode and will sync the PATCH filesystem as part of the prepare phase.

Where we need to apply a patch in Multinode ?

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.

Which are the possible ways to follow for applying a patch on a multinode enviroment? (The production is multi-application node (6 Application servers i.e 1 master / 5 slaves) (12.1.1 & 12.1.3)?

The answer depends on your architecture :
if you are using a shared application tier file system for all your nodes
you will have to patch only one time on one of the nodes (Primary node or Master node)
if not the patch needs to be applied on all nodes.

Cloning of Oracle E-business Suite (12.1.1 & 12.1.3)
Clone From Production To Development

*Make sure preclone scripts already run, if it is not first run preclone on dbTier and appsTier.
*Take the backup of application binaries as well as database backup.
*Mount the backups to the target side, if it is not mounted then do the scp.
*Create blackouts on target side, and send an outage email to business users that this instance is going to clone.
*Shutdown the application services, shutdown the database and startup restrict mode drop the database, and take backup if required (export*import, pfile, context_file and other config files) sometimes it depends on your project to project)
*On target side untar the binaries of database and prepare the pfile, in pfile keep all the parameters which is there, just add two parameters (db_file_name_convert and log_file_name_convert) which actually convert the filesystem from source to target, and then we do startup nomount (which starts the instance and background processes)
*Now we will run rman duplicate.
*Rman connect auxiliary and run command allocate channels.
*"DUPLICATE" target database to name of the database along with the backup location and then release channels.

what internally rman duplicate will do is?
*it will restore the controlfile from the backup.
*it will mount the database internally (alter database mount).
*it will restore the database.
*it will recover the database.
*and then it will open the database with resetlogs option.

when you open the database with resetlogs, incarnation of the database will be happen, it means
*new logfile sequence number will be assigned and it will be set to 1
*redologfile will be given a new timestamp
*new scn number will be assigned and then your datafile and controlfile will be sync.

*Untar binaries for application side, and then go to common_top/clone/bin and fire perl adcfgclone.pl appsTier.
*Fire perl adcfgclone.pl appsTier context_file=<give cloned instance contextfile>

Post Clone Steps:
* Change the APPS password.
*Cancel the scheduled requests.
*Change the java color and banner.
*Updating workflow mailer status.
*Cleanup the nodes table by running.
EXEC FND_CONC_CLONE.SETUP_CLEAN;.
*Run autoconfig on both the tiers.
*Drop softlinks which are pointing to production
*Do sanity check and release instance for user access.
*Etc

Applying Application Patches to Oracle EBS 11i/R12 Applications (12.1.1 & 12.13) ?

Step 1: Before applying a patch you must check whether the patch is applied or not:
Method 1:
For this we query the database:
Sqlplus apps/<apps_password>
Sql> select bug_id, bug_number from ad_bugs where bug_number='&num';
Sql> select patch_type, patch_name from ad_applied_patches where patch_name='&num';

Method 2:
Checked with OAM
a) Connect to OAM
b) Go to System Administrator --> OAM-->Dashboard --> Site map --> Maintenance --> Applied patches
c) Enter patch id and press ‘Go’
d) See if patch was returned

Step 2: Download the patch:
Example:
www.support.oracle.com

Step 3: Unzip the patch:
Exapmple: Command:
Unzip < patch.zip>

Step 4: Before applying patch:(check invalid objects in DB) and Backup the invalids object before applying the patch:
Example:
Sql> select name from v$database;
Sql>select owner,count(*) from dba_objects where status='INVALID' group by owner;
Backup the invalids with CTAS:
create table dba_objects_18apr2013 AS select * from dba_objects where status='INVALID';
Note:
Send outage communication/put mail to business

Step 5: Stop all application services (If we don’t want to close application services, we have hot patch option:
Note: If it is shared application file system you have to bring down admin tier service i.e, concurrent node it depends on business requirement.
ps -fu applmgr|grep -i FND|wc -l
If processes not went down, do kill processes and proceed ahead

Step 6: Enable Maintenance mode
Example:
$ adadmin
5. change maintenance mode
To check maintenance mode enable or not use below query
select fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;
If  the status:
“MAINT” = MAINTENANCE MODE HAS BEEN ENABLED AND THE USERS WILL NOT BE ABLE TO LOGIN.
“NORMAL” = MAINTENANCE MODE HAS BEEN DE-ACTIVATED AND THE USERS WILL BE ABLE TO LOGIN.

Step 7: Applying patch using ‘adpatch’ (auto patch utility):
FIRE :adpatch

Step 8 : Please check whether patch is applied or not.

Step 9: Disable Maintenance mode again by using 'adadmin' utility:

Step 10: Start application services :

Step 11:After applying PATCH:
step a:Verify the patch is applied successfully:
SQL> select name from v$database;
NAME
---------
TESTDB
SQL> select bug_number,creation_date from ad_bugs where bug_number='5522470';
BUG_NUMBER                     CREATION_DATE
------------------------------ ---------------
5549427                        12-FEB-13
Step b:Run cmclean.sql

Run cmclean.sql from application node by going to $COMMON_TOP/admin/scipts/TESTDB_ebstest in 11i,where as in R12 goto $ADMIN_SCRIPTS_HOME or $INST_TOP/admin/scripts
commit;
Note:We run cmclean after clonning also to make sure the node name is updated in the FND_NODES Table correctly
SQL> select owner,count(*) from dba_objects where status='INVALID' group by owner;
OWNER                            COUNT(*)
------------------------------ ----------
SYS                                     1
TEST_USER1                    2
TEST_USER2                    5
APPS                                 22

Step c:Check the file versions got changed successfully after applying patch:
strings -a POXWARMB.pls|grep Header =>Can be used to check the file version.

Step d:Do the Health Check of Oracle EBS Application
Note :We can get HOME page URL by using below query:
SQL>Select Home_URL from icx_parameter;
Health check completed successfully by submitting active user Concurrent request REQUEST ID 28758820.

Step e:Intimate end User
Make sure you intimate the end User or release your application to the end User
do sanity check and release instance for user access .
In sanity check you will submit below two requests:
Go to System adminstrator --->Request--->Run
1)Active User =====>Check View LOG/vIEW OUT
2)Active Responsiblity ===>Check View LOG/vIEW OUT

what are Managed Servers R12.2 EBS ?

oacore – Used to provide core functionality in Oracle E-Business Suite application tier Java code, including OAF-based functionality for Oracle E-Business Suite products.
oafm – Used for web services, Secure Enterprise Search, Oracle Transport Agent, and other components.
forms – Serves all Oracle Forms functionality.
forms-c4ws – Exposes Oracle Forms-based functionality as web services.

An additional application type, which is not deployed out-of-the-box, may be provisioned if additional Oracle applications are installed:

oaea: Used when installing additional Oracle applications such as Oracle E-Business Suite AccessGate, eKanban, and Spatial.
Oracle E-Business Suite creates one cluster for each application type deployed in the EBS WLS domain:

oacore_cluster1
oafm_cluster1
forms_cluster1
forms-c4ws_cluster1
oaea_cluster1
Managed server names for these clusters are grouped as follows:

oacore_server1 for Node1, oacore_server2 for Node 2, etc.
oafm_server1 for Node 1, oafm_server2 for Node 2, etc.
forms_server1 for Node 1, forms_server2 for Node 2, etc.
forms-c4ws_server1 for Node 1, forms-c4ws_server2 for Node 2, etc.
oaea_server1 for Node 1, oaea_server2 for Node 2, etc.

what is Restart option adop 12.2 ?

If you have shut down the workers, or if adop quits while performing processing actions, it saves all the actions completed up to that point in restart files. Investigate and resolve the problem that caused the failure, then restart adop. After you restart adop, it will ask if you want to continue with the previous session (at the point where the processing stopped), or start a new session.

Note: A difference from adpatch is that adop restart behavior is controlled by the abandon=yes/no and restart=yes/no options in the input_file that can be passed to the adop command in the apply phase.
You have several options when restarting (or abandoning) application of individual patches, as follows.
If you want to restart a failed patch from where it left off, you only need to specify restart=yes on the command line:
adop phase=apply patches=1234 restart=yes
If you want to restart a failed patch from the very beginning, you need to specify abandon=yes on the command line:
adop phase=apply patches=1234 abandon=yes
If you want to ignore a previously failed patch and apply a different one instead, you need to specify the new patch number and abandon=yes on the command line:
adop phase=apply patches=5678 abandon=yes

How to execute empty patching cycle, without applying any patch?
Solution:
The syntax to run an empty patch cycle is:
adop phase=prepare,finalize,cutover,cleanup

Which are the possible ways to follow for applying a patch on a multinode enviroment? (The production is multi-application node (6
Application servers i.e 1 master / 5 slaves) (12.1.1 & 12.1.3) ?

The answer depends on your architecture :
if you are using a shared application tier file system for all your nodes
you will have to patch only one time on one of the nodes (Primary node or Master node)
if not the patch needs to be applied on all nodes.

how to skip a workers during patching ?

If you want to skip a worker , this option is not visible & do it at your own risk there is option 8 ( depending on your AD version , it might vary so if adctrl is displaying 7 options skip worker will be option 8 & if adctrl is showing 6 options skip worker will be option 7)
You can select individual worker or a group of worker separated by - like 2-5 will select worker from 2 to 5.

Changes In 12.1.3 : While performing cloning activity on newly 12.1.3 instance ?

* While running adcfgclone on appsTier it will ask hostname(FQDN).
* After providing all the inputs to adcfgclone.pl it will ask to start the services or not.
* When you are running cmclean.sql it will give notification to stop all the concurrent managers.

EBS Technology Codelevel Checker (ETCC) ?

There is one patch provides two scripts, together referred to as ETCC, that help ensure you have the required database and middle tier bugfixes installed for your Oracle E-Business Suite Release 12.2 system.
The scripts are:

* checkDBpatch.sh (checkDBpatch.cmd on Windows). This is the Database EBS Technology Codelevel Checker (DB-ETCC), which determines if all the needed bugfixes exist in the specified database ORACLE_HOME.

* checkMTpatch.sh (checkMTpatch.cmd on Windows). This is the Middle Tier EBS Technology Codelevel Checker (MT-ETCC), which determines if all the needed bugfixes exist in the middle tier file system.

What Does FND Stands For?
FND stands for foundation tables which is a combination of AOL SYSTEM ADMINISTRATOR MODULES tables, it will be placed under FND_TOP. This module is a standard and any customization may some-time leads to distruction of the Oracle Applications.

Reasons For Enabling Maintenance Mode ?

To ensure optimal performance and reduce downtime during patching sessions, AutoPatch requires that you enable Maintenance mode when you apply a patch. Enabling this feature shuts down the Workflow Business Events System and sets up function security so that Oracle Applications functions are unavailable to users. This provides a clear separation between normal runtime operation and system downtime for patching.

12.2 E-Business Suite Applications DBA Steps To Check if a Patch is Applied in 12.2.x using SQL*PLUS ?

In eBusiness Suite (EBS) 12.2.x you cannot query the AD_BUGS table to check if patches have been applied.
The AD_BUGS table may have entries for patches that were applied but later the patching cycle was aborted (not really applied).
To check whether a patch is really applied use the AD_PATCH.IS_PATCH_APPLIED pl/sql function.

Using this API is an alternative method for users without access to Oracle Applications Manager's "Patching and Utilities" feature to determine if a certain patch is applied.

expected results:
EXPLICIT = applied
NOT APPLIED = not applied / aborted

Note: If you are sure patch is applied but it is not showing as applied via the above steps, then update the snapshot manually with the steps below:

1. Start adadmin after source the RUN FS env.
2. Select "2. Maintain Applications Files menu" in "AD Administration Main Menu".
3. In "Maintain Applications Files", select "4. Maintain snapshot information".
4. Select "2. Update current view snapshot" in the "Maintain Snapshot Information".
5. Select "1. Update Complete APPL_TOP" in the "Maintain Current View Snapshot Information".

How many number of workers required for applying adop patch ?

Run TOP/HTOP/GLANCE during patching,

increase the number of workers if CPU usage is mostly < 65%
decrease the number of workers if CPU usage is mostly > 85%

what is RUN and PATCH filesystem in 12.2.x ?

1.The "Run Edition" is the code and data used by the running application. The Run Edition includes a complete application-tier file system along with all objects and data visible in the default edition of the database. As a developer, you will connect to the Run Edition whenever you are engaged in normal development activity on the system.

2.The "Patch Edition" is an alternate copy of Oracle E-Business Suite code and seed data that is updated by Online Patching. The Patch Edition includes a complete copy of the application-tier file system and editioned database code objects. The Patch Edition is only usable when an Online Patching session is in progress. End users cannot access the Oracle E-Business Suite Patch Edition, but as a developer you may need to connect to the Patch Edition of a system when applying patches or debugging problems with Online Patch execution.

Note:
There are a number of SQL*Plus scripts that can provide useful information about the state of your editioned development environment. All ADZD* scripts are found under $AD_TOP/sql. For convenience, you can add this directory to the SQLPATH environment variable so that you can refer to the scripts by simple name.

Custom Forms, Reports and other custom files deployed on RUN file system lost after adop cutover phase during adop patching in R12.2.x ?

If you have deployed custom forms, reports etc. on a RUN filesystem then -
You should add entries for all your custom files to the custom synchronization driver file located at $APPL_TOP_NE/ad/custom/adop_sync.drv (%s_ne_base%/EBSapps/appl/ad/custom/adop_sync.drv).

The adop utility uses this driver file to synchronize files between the run file system and the patch file system.
Add your entries in the section marked by the '#Begin Customization' and '#End Customization' comments.

Example:
rsync -zr %s_current_base%/EBSapps/appl/<Company identifier> %s_other_base%/EBSapps/appl

Synchronizing custom Top with Symbolic Links using adop_sync.drv:
Please add "-l" option to rsync command
This option is copy symbolic link as a symbolic link.

Example:
rsync -rl %s_current_base%/EBSapps/appl/XXX/12.0.0/bin %s_other_base%/EBSapps/appl/XXX/12.0.0

What is apply_mode=hotpatch in ebs 12.2 ?

With apply_mode=downtime; adop directly applies the patch .. No patching cycles...
Note: apply a patch with downtime is only applicable with Oracle support or if given in a readme.txt file

Steps:
1. shutdown  the application (adspall.sh)
2. start the admin server (adadminsrvctl.sh start)
3. download the patch and copy to patch_top
4. apply patch as below,
$ adop phase=apply patches=19845055 apply_mode=downtime workers=15
5. stop the admin server (adadminsrvctl.sh stop)
6. start the application (adstrtall.sh)
It is logical to run cleanup and fs_clone as well after applying using hotpatch option.

what is actualize_all option in 12.2 ?

Every time we perform online patching , there will an old database edition entry and this will accumulate as and when we do more online patching's.
Oracle suggests that we perform actualize_all after this reaches a count of 25. However it would be time consuming to perform the cleanup after the count has increased.

If the number of these grows too large, system performance will start to be affected. When the number of old database editions reaches 25 or more, you should consider dropping all old database editions by running the adop actualize_all phase and then performing a full cleanup.

Table=dba_editions
select edition_name from dba_editions order by edition_name;

Steps:
$ adop phase=prepare
$ adop phase=actualize_all
$ adop phase=finalize finalize_mode=full
$ adop phase=cutover
$ adop phase=cleanup cleanup_mode=full

How to check the Log files for adop phases ?

The log directory structure is as follows:
$ADOP_LOG_HOME/<session_id>/<execution_id>/<phase>

The components of this structure are as follows:
<session ID> is the patching session ID
<execution_id> is a timestamp in the standard <YYYYMMDD_HHMMSS> format. An <execution_id> sub-directory is created for every invocation of adop on the command line
<phase> is the online patching phase

What modes in adop Patching ?

The adop utility is normally used to apply patches in an online patching cycle. It can also be used:
* To run a patching cycle, and test patch application without actually taking any apply actions, in test mode
* To apply patches outside a patching cycle in downtime mode
* To apply patches without connecting to the database in preinstall mode

What is Backup Directory ?

When adop runs, a backup directory is created in the directory where you unzip the patch. The old version of each file updated by the patch is copied into the backup directory. When applying large patches (such as release update packs, product family RUPs, and pre-upgrade patches), ensure there is enough disk space on the system where you unzip the patch, or the patching process may fail. We recommend having at least twice the amount of disk space as the unzipped patch file uses.

How to Monitor Adop Status ?

You can obtain a brief report for the current patching session by running the command.
$ adop -status

If you want information about a particular session, specify the relevant session ID:
$ adop -status <session ID>

If you want additional details of operations performed:
$ adop -status -detail

How to Abort an Online Patching Cycle ?

If a patching cycle is failing and the issue cannot be resolved quickly, it is possible to abort the patching cycle and return to normal runtime operation. The patch edition will be dropped.

You can abandon a patching cycle (without applying any patches) by running the command:
$ adop phase=abort
Important: This abort command can only be used before successful completion of the cutover phase. After cutover, the system is running on the new edition, and abort is no longer possible for that patching cycle.
Aborting a patching cycle will drop the patch edition, but you must then run the cleanup and fs_clone phases before starting a new patching cycle. The cleanup must be a full cleanup.

For example:
$ adop phase=prepare
$ adop phase=apply patches=123456
[Patch application encounters problems and you want to abort]
$ adop phase=abort
$ adop phase=cleanup cleanup_mode=full
$ adop phase=fs_clone

Optionally, you can combine the abort and cleanup commands as follows:
$ adop phase=abort,cleanup cleanup_mode=full
Note: You cannot abort application of a patch applied in hotpatch mode or downtime mode.

How to Restart adop patch ?

If you have shut down the workers, or if adop quits while performing processing actions, it saves all the actions completed up to that point in restart files. Investigate and resolve the problem that caused the failure, then restart adop. After you restart adop, it will ask if you want to continue with the previous session (at the point where the processing stopped), or start a new session.

Note: A difference from adpatch is that adop restart behavior is controlled by the abandon=yes/no and restart=yes/no options in the input_file that can be passed to the adop command in the apply phase.

You have several options when restarting (or abandoning) application of individual patches, as follows.
If you want to restart a failed patch from where it left off, you only need to specify restart=yes on the command line:

adop phase=apply patches=1234 restart=yes
If you want to restart a failed patch from the very beginning, you need to specify abandon=yes on the command line:

adop phase=apply patches=1234 abandon=yes
If you want to ignore a previously failed patch and apply a different one instead, you need to specify the new patch number and abandon=yes on the command line:

adop phase=apply patches=5678 abandon=yes

What are Customized Files ?

adop reviews the AD_FILES table to determine if any customized files (Register Flagged Files) will be replaced by the patch. If so, it displays a message listing the customized files it will replace.

Note:
adop reviews the AD_FILES table to determine if any customized files (Register Flagged Files) will be replaced by the patch. If so, it displays a message listing the customized files it will replace.

What are Managers adctrl ?

The manager assigns each worker a unique ID and inserts a row for each worker in the FND_INSTALL_PROCESSES table. It creates this table to serve as a staging area for job information, and as a way to communicate with the worker. Communication is accomplished using two columns: CONTROL_CODE and STATUS.

What are deffered_jobs ?

The deferred job feature uses the AD_DEFERRED_JOBS table. This table is created when the FND_INSTALL_PROCESSES table is created, and is dropped when the FND_INSTALL_PROCESSES table is dropped.

What is Oracle Workflow?

Oracle Workflow allows you to define business processes using a drag-and-drop designer. You can route relevant information to decision makers, automate processes, deliver electronic notifications to users in a given workflow, and monitor your processes as they are implemented.

Online Patching Log Analyzer Utility (this new feature is delivered by AD and TXK C Delta 4 patches) ?

This utility analyzes adop log directories for errors and warnings, and displays messages to help the user quickly identify any problems that may have occurred during an adop run. It thereby offers an alternative to reviewing log files manually.

The Log Analyzer utility can be run without options:

To scan all log directories of the latest adop session for errors:
$ adopscanlog

The utility can also be run with various options. Examples include:

To scan log directories relating to the latest run of adop in the latest session:
$ adopscanlog -latest=yes
To scan log directories relating to the latest run of the specified phase, in the latest session:
$ adopscanlog -latest=yes -phase=<phase_name>
To scan all log directories of a given session (represented by a session_id) for errors:
$ adopscanlog -session_id=<number>
To see a complete list of supported parameters:
$ adopscanlog -help

How to Check the current status of the adop cycle ?

Source the run filesystem environment file and run command
adop -status
usage:
adop -status  generates a summary report
adop -status <sessionID> generates a summary report for that session ID
adop -status -detail generates a detailed report

How to Check AD and TXK C Patch levels

SELECT codelevel FROM AD_TRACKABLE_ENTITIES WHERE abbreviation in ('txk','ad');

Online Patching Delta 7 Enhancements ?

1.Enhanced adop console messages
2.New Online Patching monitoring tool (adopmon)
3.New Online Patching infrastructure validation option (adop -validate)
4.Improved phase execution performance

Tuesday, August 27, 2019

Tell me About your self ?

Tell me About your self ?


This is ABC, Currently I'm working with XYZ technologies, I have around 4.8 years of experience as a Oracle dba and appsdba, from this company i started my career...... initially i started as Oracle Core dba, but later i got a chance to work with Applications DBA.

Comes to my day 2 day responsibilites are:

* checking the handover emails (maybe some scheduled activies like patching, clone, code deployments etc)
* checking the scheduled backup status.
* Perform cloning activity on users request, on few instances we clone every week.
* Sometimes getting a request to apply patch.
* creating SR's and follow-up with pending SR's
* checking the calendar notes for any scheduled activities assigned in the shift
* doing Sanity checks on production servers. Depending on the priority basis I will start the work. If there is any pending in the work I will handover to next shift people.

==> Tell me About your Company Architecture.


We support 3 production instances, & that related we have UAT, TEST and DEVELOPMENT instances, all instances are running on Rac with multi-node instance.
We are supporting all 100 Instances in 24X7. We have 6 Members of team apart from Lead and Manager. In four shifts we are maintaining these servers.

===> Troubleshooting activities:

* users unable to connect to database
* listeners went down
* concurrent managers not coming up after clone.
* immediately after clone users are complaining that permissions and grants are missing.
* creating users and assigning roles in the new clone.


==> Monitoring Procedure

We are configured GRID control. All our servers and their services are attached to 12c-OEM Grid. And all our backup jobs are scheduled in OEM. When ever any error comes OEM will send an alert to our distibution list and we work on that error. In the same way when ever any job failes OEM will send error information as an alert.

Everyday one person will be dedicate to OEM Alerts monitoring.


We are having on internal tool for ticketing system. When ever any end user impacted by our server immediately they can raise a ticket. In the same way here we monitor all opened tickets.

==> What type of Tickets you get from End User.

    * Toad connectivity failures
    * SQL Develooper connectivity failures
    * Browser Issues
    * Jinitiator Issues
    * User Password reset

==> What is your server Architecute
   
    Two Node/ 3- Node Architecture
   
    Node1 : Database (DB User) , CM, REP, ADMIN (App User)
    Node2 : Web, Forms
   
    All servers are in same configuration
   
==> How do you connect to your Client Machine

    * First I wll establish a connectivity using VPN Client Software
    * I will use PUTTY to connect
   
==> Activities Implementation

    - Weekdays we will perfom Non Prod activities
    - Weekends we perform PROD Activities
       
    (Activies are two types downtime activities and non downtime activities)



Health of the Database can be check in various ways


1 Physical memory / Load :Load normal, Load averages: 0.35, 0.37, 0.36
2 OS Space threshold ( archive, ora_dump etc.. ) :Sufficient Space available.
3 Top 10 process consuming memory:No process using exceptional high memory
4 Free volumes available :Sufficient disk space is available on the mount points
5 Filesystem space Under normal threshold
Database level.
6 Check extents / Pro active Space addition:Space is being regularly added.
7 Check alert log for ORA- and warn messages.
8 Major wait events (latch/enqueue/Lib cache pin) No major wait events
9 Max Sessions
10 Long running Jobs 6 inactive sessions running for more than 8 hrs
11 Invalid objects 185
12 Analyze Jobs ( once in a week ) Done on 20-JAN-2008 Time 06:00:06
13 Temp usage / Rollback segment usage Normal
14 Nologging Indexes
15 Hotbackup/Coldbackup Gone fine
16 Redo generation normal
17 PQ proceses Normal
18 I/O Generation Under normal threshold
19 2 PC Pending transactions 0
DR / backup
1 Sync arch Normal
2 Purge arch Normal
3 Recovery status Normal
20)DATABASE HEALTH CHECK SCRIPT: Showing locks and Archive generation details

Apps & RAC checks:
=================

1)Agent up and running
2)Workflow,Concurrent
3)Apllication services
4)Long running Concurent requets
5)Cluster Services

Thursday, August 22, 2019

How to Change Database Name

How to Change Database Name 


BY RE-CREATING CONTROLFILE

STEP1:- CREATE CONTROLFILE CREATATION SCRIPT.

SQL> alter database backup controlfile to trace as 'D:\q.sql';
Database altered.

STEP2:- EDIT/MODIFY CONTROLFILE CREATION SCRIPT.

CREATE CONTROLFILE SET DATABASE "YE" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 'C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\ONLINELOG\O1_MF_1_G9Z48JWN_.LOG'  SIZE 50M BLOCKSIZE 512,
  GROUP 2 'C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\ONLINELOG\O1_MF_2_G9Z48LD1_.LOG'  SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF',
  'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF',
  'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF',
  'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF',
  'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\MKTBS.DBF',
  'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\R.DBF'
CHARACTER SET AL32UTF8
;

STEP3: CHANGE DB_NAME PARAMETER IN SPFILE/PFILE.

SQL> alter system set db_name=YE scope=spfile;
System altered.

STEP4:- NOW REMOVE OR MOVE OLD CONTROL FILES.

Before removing old controlfile do take backup of all controlfiles.

SQL> show parameter control
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      C:\ORACLEXE\APP\ORACLE\ORADATA\XE\CONTROL.DBF
control_management_pack_access       string      NONE

STEP5: SHUT DOWN THE DATABASE AND STARTUP IN NOMOUNT MODE TO REFLECT DB_NAME PARAMETER CHANGES.

SQL> startup nomount;

STEP6: NOW EXECUTE NEWLY CREATED CONTROLFILE SCRIPT.

SQL>@D:\control_db.sql
Control file created.

STEP7: OPEN DATABASE WITH RESETLOGS OPTION.

SQL> alter database open resetlogs;
Database altered.

SQL> select database_name from v$database;


USING NID(DBNEWID UTILITY)

Step-1. We will change both db_name to XE and dbid belongs to cloned database.

Check db_id and db_name for new environment before operation.

SQL> select dbid,name from v$database;

DBID NAME
---------- ---------
6753825411 YE

Step-2. Startup instance with mount state.

export ORACLE_SID=CLONEDB
sqlplus / as sysdba
shutdown immediate;
startup mount;

nid target=/ dbname=XE logfile=/D:/nid.log
Database name changed to XE.
Modify parameter file and generate a new password file before restarting.
Database ID for database XE changed to 2898066260.
All previous backups and archived redo logs for this database are unusable.
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed succesfully.

After DBNEWID completed successful, instance has been also closed automatically.

Step-3. Startup instance with nomount option and change the db_name to XE.

Then shutdown and startup mount instance again for activate new db_name. At last, open database with resetlogs option.

Step-4. You should create new password file for the new environment if you need

cd $ORACLE_HOME/dbs
orapwd file=orapwXE password=clone entries=3 

Concurrent Managers Interview Questions

Concurrent Managers Interview Questions


1: What are different types of concurrent manager?

Answer: There are several types of concurrent manager. Important ones:
Internal Manager
Standard Manager.
Conflict Resolution Manager
Internal monitors
Service Manager
Transaction Manager
Custom Manager Defined

2: What is Internal Concurrent Manager?

Answer : It is responsible for controlling all other concurrent managers. Its main task is to make sure that all other concurrent managers are up and running. It controls other manager through the requests made to the service manager. It also starts, stops and restarts the service manager for all nodes.

3: What is Conflict Resolution Manager (CRM)?

Answer: It takes care of resolving the program incompatibilities and checks if a request in queue can be run in parallel with the running request. If a program is identified as run alone, then it prevents concurrent managers from starting other programs in the same conflict domain.

4: What is Standard Manager?

Answer : Standard Manager is the master concurrent manager. It is always running and can take care of processing any concurrent request. If at all, no other manager is assigned to a program, that program will be picked by standard manager.


5:What happened behind the scene when a concurrent request is submitted?

Answer: 1) Once a concurrent request is submitted by the user, the table FND_CONCURRENT_REQUESTS is automatically updated with the details of the request. The table is also updated with the information about the schedule of the concurrent request whether it’s immediately scheduled or scheduled at a fixed time.

2)a) If the request is incompatible/constraints defined ,Once the request time to run is arrived,it status is set to pending/Standby.Now the conflict resolution manager takes care of the request and finds out what are the incompatibilities and set the status pending normal when the incompatibilities are cleared.

b) If there are no incompatibilities then Once the request time to run is arrived,it status is set to pending/Normal

c) ALL the standard concurrent Manager and special manager continuously poll the FND_CONCURRENT_REQUESTS table .The job of a concurrent manager is to execute concurrent requests that are in Pending / Normal phase / status and that it is qualified to run according to its specialization rules.
Concurrent Manager Processes
– Act independently
– Select only requests that: (a) match the manager specialization rules, (b) are Pending/Normal, (c) have a requested start time <= sysdate

d) Once the request is processed, the FND_CONCURRENT_REQUESTS table is updated with the status.

6: Business user create the task that Concurrent request is taking a lot of time to complete. What will be your approach for debugging it?

Answer :1) First find the status of the concurrent request. It may be scheduled later on or it could be pending/standby mode or all the concurrent manager are occupied running other request. If it is pending/standy, we need to find the incompatible program running and inform user.Many times the users schedule the request to run at a later time.

2) Find out the database sid of the concurrent request and check it is waiting on any locks. We will kill the blocking session to order to complete the job

3) We can run a trace on the request id to find the sql running and then generate the explain plan for it. You can see if the sid is stuck on particular sql . If it is particular sql, then it is good to check the statistics of the table involved . We can look for tuning option for that query

4) We can check the parameters with which the request is run. (For example, once a user came saying the request is not printing the output. On Checking the possible things, it was realized that he scheduled the request with print copies = 0.)

7: What happens when the internal concurrent manager dies abruptly? Are all the managers also killed immediately after it?

Answer: No ALL the standard manager keep running and executing the request. if the internal manager dies, below queue control request are not performed

a) Starts all other processes.
b) Executes “control requests” submitted by the administrator.
c) Activate/Deactivate/Abort Concurrent Manager
d) Terminate Concurrent Request
e) Monitors processes, restarting any that failed.
f) Sets the target number of processes for each service based on the current work shift.

8: Does the internal manager run or schedule any request for itself?

Answer :No, the internal manager does not run or schedule any requests. It has nothing to do with scheduling requests, or deciding which manager will run a particular request. Its function is only to run ‘queue control’ requests

a) Starts all other processes.
b) Executes “control requests” submitted by the administrator.
c) Activate/Deactivate/Abort Concurrent Manager
d) Terminate Concurrent Request
e) Monitors processes, restarting any that failed.
f) Sets the target number of processes for each service based on the current work shift.

9: How do I process more concurrent requests in parallel?

Answer :We can increase the target processes of the concurrent manager in order to increase the parallelism. This can be done using define concurrent manager form or through direct update from sqlplus

10 : If the internal manager goes down, do I need to kill all the managers before restarting the internal manager?

Answer: No, if the internal manager goes down you need not kill all the managers. You can simply start the internal manager using startmgr.

Concurrent Manager troubleshooting

11 : What are the problems u have faced while shutting down applications?

Answer :While shutting down application generally concurrent manager won’t go down because some or the other request may be running. We will see what are the concurrent requests running by querying fnd_concurrent_requests, fnd_concurrent_program_vl, v$session, v$process and v$sqltext.

If that request is only doing some select statement then we will kill those requests, otherwise we will check what time it will take to complete by querying the previous runs of that request and then we will decide what to do.

Oracle Concurrent Manager Secrets

12: What are Internal Monitors ?

Answer: Internal Monitors are used specifically in PCP to allow for ICM failover to other available middle tier nodes.
a) Place an Internal Monitor on any node where the ICM can start in case of a failure.
b) Internal Monitors are seeded on every registered node by default.
c) If the ICM goes down, the Internal Monitor will attempt to start a new ICM on the local node.
d) If multiple ICMs are started, only the first will stay active. The others will gracefully exit.

13: Can I delete concurrent manager?

Answer:Yes, you can delete any concurrent manager. For deleting, query for the manager in the defined concurrent manager form and then delete the row.

Deleting the predefined concurrent managers is not recommended and it should never be done. Deletion may cause instability in the system.

15: Explain how parallel concurrent processing(PCP) works?

Answer
In case of parallel concurrent processing, all the managers are assigned a primary and a secondary node. The managers are started in their primary node by default. In case of node failure or Oracle instance failure, all the concurrent managers on that node are switched to their secondary nodes. Once the primary node is available again the concurrent managers on the secondary nodes are migrated back to the primary node. During the migration process, a manager may be spread across both primary and secondary nodes.

In case of parallel concurrent processing, it may happen that in a node where parallel concurrent processing is configured, the Oracle instance may or may not be running. The node which is not running Oracle, the concurrent managers connects via Net8 to a node which is running Oracle.
The internal concurrent manager can run on any node, and can activate and deactivate concurrent managers on all nodes. Since the internal concurrent manager must be active at all times, it needs high fault tolerance. To provide this fault tolerance, parallel concurrent processing uses internal monitor processes. The job of the internal monitor process is to constantly monitor the internal manager and start it when it fails. Only one internal monitor process can be active on a single node. You decide which nodes have an internal monitor process when you configure your system. You can also assign each internal monitor process a primary and a secondary node to ensure fail over protection. Internal monitor processes, like concurrent managers, can be assigned work shifts, and are activated and deactivated by the internal concurrent manager.

Parallel Concurrent Processing

16: What are the circumstances in which you need to bounce the concurrent manager?

Answer: There can be many situation where you need to bounce the concurrent manager

a) When you modify the definition of the printers
b) When you modify the environment variables. Suppose you have changed the APPLTMP and APPLPTMP variable.
c) When all the requests are pending and hanging and no processing happening
d) patch application requires the bounce of the CM
e) We have many global hangs in the system due to locks by several concurrent manager and other processes

17: What are the reasons a concurrent manager hangs?

Answer:
The concurrent manager hangs due to many reasons. A few of them are:
– Long running jobs
– The internal manager was activated by someone other then owner of the application system
– The operating system files system is full
– It’s not able to create the log file
– You’ve shut down the internal manager, but actual has a number in it
– The database is hanging may be because the archive log files have filled
– Pending/standby requests are too many

18: How can we enable/disable Conflict Resolution Manager?

Answer: It can be done using profile options “Concurrent: Use ICM”. Set it to “Y” to enable Conflict Resolution manager. To disable it, set the profile option to “N”.

19: What are Transaction Managers?

Answer : Transaction managers provide synchronous job processing by continually monitoring a DBMS pipe for requests to come through from a client-side application. The job of a transaction manager is to process this job immediately and send information back to the client using the pipe.

a) Transaction Managers Provide Synchronous Job Processing
b) A client makes a request for a specific transaction manager to run a program, and waits for the results of that program
c) Product teams’ programs are linked directly into the transaction manager executables
d) PO, CRP, INV, AR, and OE all ship transaction managers

20: How the mechanism of viewing log and output files works from browser?

Answer
The sequence of events is as follows:
1. A user within an Applications session requests to view a log or out file.
2. The browser receives the request and spawns the cgi program FNDWRR.exe
3. FNDWRR.exe logs into the database and queries FND_CONCURRENT_REQUESTS to discover on which node the files for this request are stored.
4. FNDWRR.exe constructs the service name for the file server on that node. And makes the tns call to contact the listener for this service name.
5. The listener responds by spawning the local FNDFS executable, as defined in it’s listener.ora file. Now, FNDFS and FNDWRR.exe are able to communicate directly now, using RPC calls.
6. FNDWRR.exe requests FNDFS to transfer the file that was selected by the user.
7. FNDFS transfers the file contents to a temporary file directory on the web server’s node.
8. The web server displays the file contents to the user.

21: Why does the Concurrent manager put a concurrent program into a queue? Why doesn’t the manager simply let the program run?

Answer: Because at any given point in time a concurrent manager can run no more than say 10 programs concurrently. This figure of 10 is configurable of course. First the manager puts a submitted program into a queue, next the manager checks if there is a slot available (i.e. Less than 10 programs are currently running). If a slot is found available, the concurrent manager then runs the program, or else it keeps the concurrent program in a queue with status Pending.

22: What to do if a request is Inactive/No Manager

Answer: This is quite tricky s
a) Make certain that there is at least one active manager with specialization rules that allow the program.
b) If you have confirmed the previous point, then the problem may be a stale Worker Request View
– The view is used internally to map requests to managers
– The view is regenerated when managers are created, or specialization rules are altered
c) You can manually regenerate the view
FNDLIBR FND FNDCPBWV apps/apps SYSADMIN ‘System Administrator’ SYSADMIN

23: What are Service Managers

Answer: Service Managers are spawned on the middle-tier nodes of a GSM enabled system in order to act as an agent of the ICM. When the ICM sees that it needs An Service Manager to perform some function, such as start a concurrent manager process, on a middle-tier node, it will make remote procedure control (RPC) calls to the Apps listener on that node to start the Service manager. Once the Service manager has been started and initialized, the ICM communicates directly to the SM through RPC, giving it information to manage the services on that node. The SM is spawned from the APPS TNS Listener.The APPS TNS Listener must be started on every middle-tier node in the system, and started by the user that starts ICM (e.g. applmgr) .TNS Listener spawns Service Manager to run as agent of ICM for the local node
The Service Manager is started by ICM on demand when needed. If no management actions are needed on a node a Service Manager will not be started by ICM until necessary. When ICM exits its Service Managers exit as well.

24: What all is performed by ICM Process Monitor?

Answer: The ICM itself and each process spawned by the ICM has an entry in FND_CONCURRENT_PROCESSES and holds a uniquely named DBMS lock.
The unique lock of the ICM has a format of FNDCPLK_ICM. This database session lock is the method that the ICM ensures each PMON cycle that manager and service processes are still alive. If the ICM can get the DBMS session lock of a process, the ICM will start a new process for that manager or service.

This is the reason you will often see entries like dead process found ,starting new process in ICM log files.

25.A concurrent program is taking more time than usual, what things are to be checked?

What is the changes happened to this conc program
Like packages,etc ?
At present at which state concurrent is taking time
Db waits
Output post processing
Check tablespace size
Check alert log
Check any locks on db

Wednesday, August 21, 2019

How to find if the instance is Primary/Standby?

How to find if the instance is Primary/Standby?


By querying v$database one can tell if the host is primary or standby

For primary

select database_role from v$database;

DATABASE_ROLE
-------------------------
PRIMARY

For Standby – Note you may need to connect to as sys as sysdba if the instance is in mount state

select database_role from v$database;

DATABASE_ROLE
-------------------------
PHYSICAL STANDBY

OR

On Primary database the value of controlfile_type in V$database is “CURRENT” and standby is “STANDBY”

Value on Primary:

SQL> SELECT controlfile_type FROM V$database;

CONTROL
--------------
CURRENT

Value on Standby:

SQL> SELECT controlfile_type FROM V$database;

CONTROL
--------------
STANDBY

How to add a new disk to ASM Diskgroup

How to add a new disk to ASM Diskgroup 



[root@rac10 ~]# fdisk /dev/sdb

The number of cylinders for this disk is set to 12446.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined.  Delete it before re-adding it.

Command (m for help): ^C
[root@rac10 ~]# fdisk /dev/sdb

The number of cylinders for this disk is set to 12446.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
3
Invalid partition number for type `3'
Command action
   e   extended
   p   primary partition (1-4)
^C
[root@rac10 ~]# fdisk /dev/sdb

The number of cylinders for this disk is set to 12446.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (4866-12446, default 4866):
Using default value 4866
Last cylinder or +size or +sizeM or +sizeK (4866-12446, default 12446): +15g

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@rac10 ~]#
[root@rac10 ~]#
[root@rac10 ~]#
[root@rac10 ~]#
[root@rac10 ~]# oracleasm exit
Unmounting ASMlib driver filesystem: failed
Unable to unmount ASMlib driver filesystem
[root@rac10 ~]# oracleasm init
[root@rac10 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@rac10 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@rac10 ~]# oracleasm listdisks
DATAQ
OCRVD
[root@rac10 ~]# fdisk -l

Disk /dev/sda: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3187    25599546   83  Linux
/dev/sda2            3188        4717    12289725   83  Linux
/dev/sda3            4718        5737     8193150   82  Linux swap / Solaris
/dev/sda4            5738       13054    58773802+   5  Extended
/dev/sda5            5738       13054    58773771   83  Linux

Disk /dev/sdb: 102.3 GB, 102374572032 bytes
255 heads, 63 sectors/track, 12446 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1217     9775521   83  Linux
/dev/sdb2            1218        4865    29302560   83  Linux
/dev/sdb3            4866        6690    14659312+  83  Linux

[root@rac10 ~]# oracleasm createdisk FRA /dev/sdb3  ------ only on one node
Writing disk header: done
Instantiating disk: done

Below steps on all nodes:

[root@rac10 ~]# oracleasm exit
Unmounting ASMlib driver filesystem: failed
Unable to unmount ASMlib driver filesystem
[root@rac10 ~]# oracleasm init
[root@rac10 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@rac10 ~]# oracleasm listdisks
DATAQ
FRA
OCRVD

[root@rac10 ~]# cat /proc/partitions

major minor  #blocks  name

   8        0  104857600 sda
   8        1   25599546 sda1
   8        2   12289725 sda2
   8        3    8193150 sda3
   8        4          1 sda4
   8        5   58773771 sda5
   8       16   99975168 sdb
   8       17    9775521 sdb1
   8       18   29302560 sdb2
   8       19   14659312 sdb3

[oracle@rac10 ~]$ export ORACLE_SID=+ASM1
[oracle@rac10 ~]$ asmca








How to determine the installed SOA Version ?

How to determine the installed SOA Version ?


Run soaversion.sh/cmd file to find the version.
Location: $SOA_ORACLE_HOME/bin 

What is OVA & OVF Files ?

What is OVA & OVF Files ?



OVF & OVA both are virtualization file format’s. Which are used to export & import virtual machines from one server to another. It can be used in VMware, Virtual Box & RHEL virtualization.

OVF:-
OVF stands for Open virtualization Format used for pack & distribute virtual appliances or virtual machines.OVF package contains multiple files into one directory. one is the description file (.ovf), VM state files such as *.vmdk or *.vhd & manifest file.

OVA:-
OVA stands for Open virtualization Appliance. It is only a single file which contains all the files of ovf into single file called ova.It is an tar or zip archive of all the files into one directory.

Which is Better :-
You can consider OVA is better because you have to transfer or send only 1 file that is ova instead of multiple files in ovf

How to combine all .ova files into one file:

Run the following command to combine the .ova files into one .ova file:

Go to the directory where all .ova files and issue the below command

On Linux: cat VBox*.ova > VBox_EM13_1_0_0_Linux64.ova
On Windows: type VBox*.ova > VBox_EM13_1_0_0_Linux64.ova

Tuesday, August 20, 2019

Which Background processes started/stopped during database startup and shutdown ?

Which Background processes started/stopped during database startup and shutdown ?


startup sequence:
Mon Apr 15 16:03:30 2019
PMON started with pid=2, OS id=5336
Mon Apr 15 16:03:30 2019
PSP0 started with pid=3, OS id=5340
Mon Apr 15 16:03:32 2019
GEN0 started with pid=5, OS id=5350
Mon Apr 15 16:03:32 2019
DIAG started with pid=6, OS id=5354

shutdown sequence:
Shutting down instance (immediate)
Stopping background process SMCO
Shutting down instance: further logons disabled
Stopping background process QMNC
Mon Apr 15 16:20:52 2019
Stopping background process CJQ0
Stopping background process MMNL
Stopping background process MMON

Note:

It is applicabe for 11g/12cR2

Monday, August 19, 2019

Oracle Application Management Pack (AMP) for Oracle E-Business Suite, Release 13.1.1.1.0

Oracle Application Management Pack (AMP) for Oracle E-Business Suite, Release 13.1.1.1.0


The Oracle Application Management Pack for Oracle E-Business Suite is built on top of the Oracle Enterprise Manager 13c Cloud Control platform and provides advanced features to effectively monitor and manage Oracle E-Business Suite systems

Application Management Pack (AMP) 13.1.1.1 for Oracle E-Business Suite is now available.  This E-Business Suite plug-in for Oracle Enterprise Manager Cloud Control 13c can be used to manage Oracle E-Business Suite 11.5.10.2, 12.0, 12.1, and 12.2 environments.

Key Features:

The following are brief descriptions of key features introduced in this release:

1. Enterprise Manager 13c Technology Uptake
2. Oracle E-Business Suite Management on Oracle Cloud Infrastructure
3. Hybrid Cloud Management
4. System Management for Oracle E-Business Suite - Discovery and Monitoring
5. Change Management for Oracle E-Business Suite

1. Enterprise Manager 13c Technology Uptake
Oracle Enterprise Manager 13c includes several enhancements such as:

* A new Oracle Fusion Middleware technology stack
* The "Alta" user interface to enhance user experience
* Edition Based Redefinition (EBR) support

2. Oracle E-Business Suite Management on Oracle Cloud Infrastructure
Discovery of Oracle E-Business Suite environments provisioning on Oracle Cloud Infrastructure
Oracle Enterprise Manager can be installed on Oracle Cloud Infrastructure to monitor and manage Oracle E-Business Suite environments residing on Oracle Cloud Infrastructure

3. Hybrid Cloud Management
Oracle Application Management Suite now delivers several capabilities to monitor and manage Oracle E-Business Suite environments on Oracle Cloud and on-premises. These capabilities are delivered through the Enterprise Manager command line interface (EMCLI) for greater flexibility.

* Automation of deployment of Hybrid Cloud Agent during EBS discovery process
* Start and End Blackouts on a single Oracle E-Business Suite environment
* Start and Stop Services includes more granularity at the component and node levels
* View and apply recommended patches for EBS applications and database
* Apply EBS patches to multiple environments
* Create custom packages

4. System Management for Oracle E-Business Suite - Discovery and Monitoring
Discovery of Oracle E-Business Suite on Oracle Cloud Infrastructure Classic
In Oracle Application Management Pack Release 13.1.1.1.0 Bundle Patch 1 (BP1), discovery of Oracle E-Business Suite on Oracle Cloud Infrastructure Classic is supported, provided that the E-Business Suite database is on Compute.
Real User Experience Insight (RUEI) regions integrated within the Oracle E-Business Suite Summary page
In this release, we have integrated five different RUEI regions within the Oracle E-Business Suite Summary page. Customers can personalize and activate one or all RUEI regions. These RUEI regions are specific to a given Oracle E-Business Suite instance and customers can view the data and drill down for detailed information.
Auto Host Aliasing
Host aliasing is now automated and will attempt to match the host name in the Oracle E-Business Suite context file and the discovered host name in Oracle Enterprise Manager. If this attempt fails, you will be prompted to perform the mapping manually. Customization Manager and Patch Manager features now support host aliasing.
Support for Gold Agent
Now we have support for Gold Agent Images feature of Enterprise Manager. For more information, please refer chapter "Managing the Lifecycle of Agent Gold Images" of Enterprise Manager Cloud Control Advanced Installation and Configuration Guide.

5. Change Management for Oracle E-Business Suite
Patch Manager - Oracle E-Business Suite Technology Stack Pack Deployments
During the prior release of Application Management Suite, you had the ability to view patch recommendations for E-Business Suite applications and the technology stack. In this release, you now have the ability to deploy Database and WebLogic server patches using Enterprise Manager patch plans.
UI now shows if the patch is already applied or not.
Advanced search filtering options for online patching section.
UI now allows you to set number of workers for patching.
You can now specify a duration after which the Internal Concurrent Manager will be shut down forcefully, earlier it used to wait indefinitely to bring down the ICM.
Default option for online patching is now "No Cutover". Customers have to explicitly check the box to cut over after online patching.
Code level recommendations for EBS products and product families.

Customization Manager - Customization Discovery & Reporting
Customization Discovery & Reporting process now includes discovery of database objects.
Cloning - Automated Cloning
You now have the ability to save the cloning interview process as templates that can be used for future purposes for Smart Clone for R12, 12.2.x procedure.
You can add custom parameters to the cloning procedure
Smart Clone and Instance Administration now support Dual File System Configurations

Reference Metalink Doc ID 2045552.1)

Opatch Interview Questions

Opatch Interview Questions


1. What is Opactch in Oracle?

The Opatch utility is a tool that allows the application and rollback of interim patches to Oracle products. This chapter provides information on using Opatch to apply patches.

2. What is a Catbundle.sql script ?

To make necessary modification to the catalog.
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus / as sysdba
sql>@catbundle.sql psu apply
Once you’ve executed the catbundle.sql means your database is fully patched.

3. what a database bundle series ?

A database bundle series is a sequence of patches where each patch in the series includes the contents of the previous patch in the series.

4. How to check conflicts while applying CPU patch?

step 1: unzip your patch zip file
step 2: run below command
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir
Example:
$ unzip p9655017_10204_linux.zip
$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir 9655017

5. Opatch options and description?

* apply: Installs an interim patch. Refer to "apply Command" for more information.
* napply:  Installs n number of patches (hence napply). Refer to "napply Command" for more     information.
* auto: Applies Oracle Clusterware patches. Refer to "auto Command" for more information.
* lsinventory: Lists what is currently installed on the system. Refer to "lsinventory Command" for more information.
* query: Queries a given patch for specific details. Refer to "query Command" for more information.
* rollback: Removes an interim patch. Refer to "rollback Command" for more information.
* version: Prints the current version of the patch tool. Refer to "version Command" for more information.

6. What are the features of opatch?

* Scalability: Opatch is scalable to support a large number of patches.
* Reliability: Opatch is reliable and protects the Oracle home and inventory. It can bring back the Oracle home to a stable state from patch application failures. It can also easily detect patch conflicts.
* Availability: Opatch's online patching improves system availability by allowing database patches   to be applied without needing to shut down databases.
* Portability: Opatch is compatible with all operating systems for which Oracle releases software.
* Robust: Opatch is very robust. It is very easy to apply a patch as well as remove it.
* Easy to maintain: Opatch is easy to maintain and is also extensible.
* Support for Silent Operation: Opatch supports silent operation. This mode allows you to run the software without any user interaction.
* Support for Real Application Clusters: Opatch supports RAC and works well in that setup. It is easy to extend it to Enterprise Manager Grid   Control.
* Easy to debug: Opatch has various levels of logging and tracing mechanisms. It also has a debug option that helps to easily diagnose software problems.

7. Opatch supports the following tasks ?

Applying an interim patch.
Rolling back the application of an interim patch.
Detecting a conflict when applying an interim patch after previous interim patches have been applied. It also suggests the best options to resolve a conflict.
Reporting on installed products and interim patches.

8. What is CPU patch?
Critical Patch Update (CPU) - Release of security fixes each quarter instead the cumulative database security patch for the quarter.

9. What is PSU patch?
Patch Set Updates (PSU) - Cumulative patches that include both the security fixes and priority fixes. They are "version upgrades" modifying the las number of version (11.2.0.1.1, 11.2.0.1.2,...).

10. What is SPU patch?
Security Patch Update (SPU) - It is the new terminology of CPU (From October 2012) . SPU's can't be applied if any PSU's have been applied, unless your database is upgraded with a new base version.

11. In which months oracle release CPU patches?
JAN, APR, JUL, OCT

12. When we applying single Patch, can you use opatch utility?
Yes, we can use Opatch incase of single patch. The only type of patch that can't be used with OPatch is a patchset.

13. Is it possible to apply OPATCH without downtime?
As you know for apply patch your database and listener must be down. When you apply OPTACH it will update your current ORACLE_HOME. Thus coming to your question to the point in fact it is not possible without or zero downtime in case of single instance but in RAC you can Apply Opatch without downtime as there will be more separate ORACLE_HOME and more separate instances (running once instance on each ORACLE_HOME).

14. You have collection of patch (nearly 100 patches) or patchset. How can you apply only one patch from it?

With Napply itself (by providing patch location and specific patch id) you can apply only one patch from a collection of extracted patch. For more information check the opatch util NApply –help. It will give you clear picture.
For Example:
opatch util napply <patch_location> -id 9 -skip_subset -skip_duplicate
This will apply only the patch id 9 from the patch location and will skip duplicate and subset of patch installed in your ORACLE_HOME.

15. How to Apply Opatch in Oracle?

* You MUST read the Readme.txt file included in opatch file, look for any prereq. steps/ post installation steps or and DB related changes. Also, make sure that you have the correct opatch version required by this patch.
* Make sure you have a good backup of database.
* Make a note of all Invalid objects in the database prior to the patch.
* Shutdown All the Oracle Processes running from that Oracle Home , including the Listener and Database instance, Management agent etc.
* You MUST Backup your oracle Home and Inventory
  tar -cvf $ORACLE_HOME $ORACLE_HOME/oraInventory | gzip > Backup_Software_Version.tar.gz
* Unzip the patch in $ORACLE_HOME/patches
* cd to the patch direcory and do opatch -apply to apply the patch.
* Read the output/log file to make sure there were no errors.
* Log file location : /d02/oracle/ebs12/db/tech_st/11.2.0.3.0/cfgtoollogs/opatch/opatch2016-03-30_21-41-45PM_1.log

16. Oracle version 11.2.0.1.0 what does each number refers to?
 
Oracle version number refers:
  11 - Major database release number
   2 - Database Maintenance release number
   0 - Application server release number
   1 - Component Specific release number
   0 - Platform specific release number


17. When we applying single Patch, can you use opatch utility?

Yes, you can use Opatch incase of single patch. The only type of patch that cannot be used with OPatch is a patchset.

18. Is it possible to apply OPATCH without downtime?

As you know for apply patch your database and listener must be down. When you apply OPTACH it will update your current ORACLE_HOME. Thus coming to your question to the point in fact it is not possible without or zero downtime in case of single instance but in RAC you can Apply Opatch without downtime as there will be more separate ORACLE_HOME and more separate instances (running once instance on each ORACLE_HOME).

19. You have collection of patch (nearly 100 patches) or patchset. How can you apply only one patch from it?

With Napply itself (by providing patch location and specific patch id) you can apply only one patch from a collection of extracted patch. For more information check the opatch util NApply –help. It will give you clear picture.
For Example:
opatch util napply <patch_location> -id 9 -skip_subset -skip_duplicate
This will apply only the patch id 9 from the patch location and will skip duplicate and subset of patch installed in your ORACLE_HOME.

20. Oracle version 10.2.0.4.0 what does each number refers to?

Oracle version number refers:
10 – Major database release number
 2 – Database Maintenance release number
 0 – Application server release number
 4 – Component Specific release number
 0 – Platform specific release number


21. Will Patch Application affect System Performance?

Sometimes applying certain patch could affect Application performance of SQL statements. Thus it is recommended to collect a set of performance statistics that can serve as a baseline before we make any major changes like applying a patch to the system.

Can you stop applying a patch after applying it to a few nodes? What are the possible issues?

Yes, it is possible to stop applying a patch after applying it to a few nodes. There is a prompt that allows you to stop applying the patch. But, Oracle recommends that you do not do this because you cannot apply another patch until the process is restarted and all the nodes are patched or the partially applied patch is rolled back.

22. How you know impact of patch before applying a patch?

OPATCH <option> -report
You can use the above command to know the impact of the patch before actually applying it.

23. How can you run patching in scripted mode?

opatch <option> -silent
You can use the above command to run the patches in scripted mode.

Can you use OPATCH 10.2 to apply 10.1 patches?

No, Opatch 10.2 is not backward compatible. You can use Opatch 10.2 only to apply 10.2 patches.

24. What you will do if you lost or corrupted your Central Inventory?

In that case when you lost or corrupted your Central Inventory and your ORACLE_HOME is safe, you just need to execute the command with –attachHomeflag, OUI automatically setup the Central Inventory for attached home.

25. What you will do if you lost your Oracle home inventory (comps.xml)?

Oracle recommended backup your ORACLE_HOME before applying any patchset. In that case either you can restore your ORACLE_HOME from the backup or perform the identical installation of the ORACLE_HOME.

26. Different types of Patch Conflicts - Superset/Subset/Duplicate/Bug/File?

1.Superset
If all the bugs fixed by a patch which is already installed in the Oracle Home are also fixed by the patch to be applied, then the patch to be applied is considered a superset of the patch already applied.
Example:
Patch A, which is already installed in the Oracle home, fixed bugs 1, 2, and 3
Patch B,which is to be installed, fixes bugs 1, 2, 3, and 4.
Patch B is considered a superset of Patch A.
Result: it is not considered as an error situation. OPatch removes the subset patches from the Oracle Home and applies the new patch.

2.Subset
If all the bugs fixed by the patch being installed are fixed in a patch already installed in the Oracle Home, the patch being installed is a subset.

Example:
Patch A, which is already installed in the Oracle home, fixed bugs 1, 2 and 3
Patch B, which is to be installed, fixes bugs 1 and 2.
Patch B is a subset of Patch A
Result: it is not considered as an error situation. Patch B will not be installed and reported as a subset to Patch A

3.Duplicate
If a patch is installed and it is reinstalled, it is considered a duplicate
Example:
Patch A, which is already installed in the Oracle home, fixed bugs 1, 2 and 3
Patch A is reinstalled
 Results: If -skip_duplicate is included in the apply command, OPatch will skip the duplicate.  If not set, OPatch will rollback Patch A and reapply it

4.Bug Conflict
If a patch already installed in the Oracle Home has updated an object which the patch being installed also updates, the patch being installed is in Conflict with the patch already installed.
Example:
Patch A, which is already installed in the Oracle home, updates aaa.o, bbb.o and ccc.o in libserver10.a
Patch B, which is to be installed, updates aaa.o and ddd.o in libserver10.a
Patch B is in conflict with Patch A because they both update object aaa.o in libserver10.a
Result: OPatch reports Patch B is in conflict with Patch A and recommends an SR be filed requesting a merge of Patch A and Patch B created.  If the option to continue the installation is selected, Patch A will be rolled back and Patch B will be installed.  The bugs fixed in Patch A will no longer be fixed.

5.File Conflict
If a patch already installed in the Oracle Home has updated files which the patch being installed also updates, the patch being installed is in File Conflict with the patch already installed.
Example:
Patch A, which is already installed in the Oracle home, updates ins_rdbms.mk and env_rdbms.mk
Patch B, which is to be installed, updates ins_rdbms.mk, env_rdbms.mk and ins_sqlplus.mk
Patch B is in conflict with Patch A because they both update ins_rdbms.mk and env_rdbms.mk
Result: OPatch reports Patch B is in conflict with Patch A and recommends an SR be filed requesting a merge of Patch A and Patch B created.  If the option to continue the installation is selected, Patch A will be rolled back and Patch B will be installed.  The bugs fixed in Patch A will no longer be fixed.

Attention
It may happen that opatch returns a confusing output such as
"..is a  bug superset of patch .......but is not a file superset."
ex.:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13343461
.................................................................................................
Given patch "13343461" is a bug superset of patch "12419384" but is not a file superset.

The "is not a file superset" can be just ignored and will be fixed in later OPatch versions

27. Types of patches ?

Critical Patch Update (CPU) now refers to the overall release of security fixes each quarter rather than the cumulative database security patch for the quarter.  Think of the CPU as the overarching quarterly release and not as a single patch.

Patch Set Updates (PSU) are the same cumulative patches that include both the security fixes and priority fixes.  The key with PSUs is they are minor version upgrades (e.g., 11.2.0.1.1 to 11.2.0.1.2).  Once a PSU is applied, only PSUs can be applied in future quarters until the database is upgraded to a new base version.

Security Patch Update (SPU) terminology is introduced in the October 2012 Critical Patch Update as the term for the quarterly security patch.  SPU patches are the same as previous CPU patches, just a new name.  For the database, SPUs can not be applied once PSUs have been applied until the database is upgraded to a new base version.

Bundle Patches are the quarterly patches for Windows and Exadata which include both the quarterly security patches as well as recommended fixes.