R12.2 Apps DBA. Powered by Blogger.

RMAN Database Restore and Recovery scenarios

No comments :
RMAN  performs backup and recovery tasks on the databases and automates administration of the backup strategies.
Case 1: ALL DATA FILES ARE LOST
Case 2: FEW BLOCKS IN DATAFILE GOT CORRUPTED
Case 3: ONLY ONE DATA FILE IS LOST/CORRUPTED
Case 6:  ALL DATAFILES OF A TABLESPACE GOT CORUPTED/LOST
Case 5: SPFILE/PFILE LOST
CASE 1 : ALL DATA FILES ARE LOST
Assumption :
you have good backups of your database
you have access to all redo archive files generated after the backup was taken.
you have all the redo required to recover the database datafiles.
You can perform a complete database-level recovery in this situation with either the current control file or a backup control file.
i) Using current control file
In this situation, we simply start up the database in mount mode, issue the restore and recover commands, and then open the database:
$ rman
RMAN> connect target /
RMAN> startup mount
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open;
Remember that RMAN will look in older backups if it can’t find a backup piece or if corruption is detected.
RMAN will search through backup history until it locates a good backup or until it exhausts all possibilities. This feature is called restore failover.
What about Read only and temporary tablespaces?
Read only tablespaces:
NOTE: By default, the restore command skips datafiles associated with read-only tablespaces. If you want read-only tablespaces restored, then you must use the check readonly command.
RMAN> restore database check readonly;
Temporary Tablespaces:
You don’t have to restore or re-create missing locally managed temporary tablespace tempfiles. When you open your database for use, Oracle automatically detects and re-creates locally managed temporary tablespace tempfiles.
If you wanna restore form some specific backups which you tagged:
RMAN> restore database from tag WEEKLY_BACK
How to use until clause with RMAN restore command
You can also tell RMAN to restore datafiles from a point in the past using the until clause of the restore command in one of the following ways:
A) Until SCN
If you know the SCN in a backup piece that you want to restore from
RMAN> restore database until SCN 5636176;
B) Until sequence
If you know the log sequence number that you want to restore up to
RMAN> restore database until sequence 17;
C) Until restore point
If you’ve created restore points, then you can also use the restore point name
RMAN> restore database until restore point WEEKLY_BACK;
D) Until time
You can also specify a point in time from which you want RMAN to restore an older backup.
RMAN> restore database until time ‘sysdate – 5′;
RMAN> restore database until time “to_date(’08-jan-2016 13:00:00′, dd-mon-rrrr hh26:mi:ss’)”;
ii) Using backup control file
RMAN> connect target /
RMAN> startup nomount;
RMAN> restore controlfile from autobackup;
RMAN> alter database mount;
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open resetlogs;
You are required to open your database with the open resetlogs command anytime you use a backup control file during a recovery operation.
CASE 2: FEW BLOCKS IN DATAFILE ARE CORRUPT
There can be a corrupt block in a large datafile in your database which RMAN can easily report. Now it would take significant effort and time to perform the traditional restore and recover of a large datafile. So instead we will just recover the corrupt block and not the entire datafile.
For Oracle Database 10g or Oracle9i Database, use the blockrecover command to perform block media recovery.
As for Oracle Database 11g or newer, we will use the recover datafile … block command as shown below:
ONLY FOR TESTING FIRST WE CREATED SOME DB BLOCK CORRUTION
SELECT header_block FROM dba_segments WHERE segment_name=’apps';
HEADER_BLOCK
————
33
$ dd of=/u01/oracle/DB11G/oradata/apdba/users01.dbf bs=8192 conv=notrunc seek=15 << EOF
> corruption test
> EOF
0+1 records in
0+1 records out
16 bytes (16 B) copied, 0.000159796 s, 100 kB/s
 ALTER SYSTEM FLUSH BUFFER_CACHE;
select * from scott.emp;
select * from scott.emp
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 6, block # 15)
ORA-01110: data file 6: ‘/u01/oracle/DB11G/oradata/apdba/users01.dbf’
A) CHECK CORRUPTION USING RMAN
RMAN will automatically detect corruption in blocks whenever a backup or backup validate command is issued. These blocks are reported as corrupt in the alert.log file and the V$DATABASE_BLOCK_CORRUPTION view.
RMAN> backup validate database archivelog all;
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
—- —— ————– ———— ————— ———-
6 FAILED 0 18 667 1086086
File Name: /u01/oracle/DB11G/oradata/apdba/users01.dbf
Block Type Blocks Failing Blocks Processed
———- ————– —————-
Data 0 90
Index 0 39
Other 1 693
In Alert Log:
Wed Feb 26 13:53:28 2016
Hex dump of (file 6, block 15) in trace file /u01/oracle/DB11G/diag/rdbms/apdba/apdba/trace/apdba_ora_6736.trc
Corrupt block relative dba: 0x01000093 (file 6, block 15)
Bad header found during validation
Data in bad block:
type: 99 format: 7 rdba: 0x69767075
last change scn: 0x7365.76206e6f seq: 0x76 flg: 0x0a
spare1: 0x72 spare2: 0x72 spare3: 0x0
consistency value in tail: 0x0eef0602
check value in block header: 0xb863
block checksum disabled
Reread of blocknum=15, file=/u01/oracle/DB11G/oradata/apdba/users01.dbf. found same corrupt data
Reread of blocknum=15, file=/u01/oracle/DB11G/oradata/apdba/users01.dbf. found same corrupt data
Reread of blocknum=15, file=/u01/oracle/DB11G/oradata/apdba/users01.dbf. found same corrupt data
Reread of blocknum=15, file=/u01/oracle/DB11G/oradata/apdba/users01.dbf. found same corrupt data
Reread of blocknum=15, file=/u01/oracle/DB11G/oradata/apdba/users01.dbf. found same corrupt data
In V$DATABASE_BLOCK_CORRUPTION view:
RMAN backup populates V$DATABASE_BLOCK_CORRUPTION.
 select * from V$DATABASE_BLOCK_CORRUPTION;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE#              CORRUPTIO
———- ———- ———- —————— ———
6         15    1             0                         CORRUPT
Using DBV:
dbv file=/u01/oracle/DB11G/oradata/apdba/users01.dbf blocksize=8192
B) CORRECT DATA BLOCK CORRUPTION
Database can be in mounted or open when you are performing block-level recovery. Also you do not have to take the datafile being recovered offline. Block-level media recovery allows you to keep your database available hence reducing the mean time to recovery since only the corrupt blocks are offline during the recovery.
RMAN CAN NOT perform block-level recovery on block 1 (datafile header) of the datafile.
RMAN> recover datafile 6 block 15;
C) VERIFY
select * from V$DATABASE_BLOCK_CORRUPTION;
no rows selected
select * from scott.emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
———- ———- ——— ———- ——— ———- ———- ———-
7369 SMITH CLERK 7902 17-DEC-80 800 20
CASE 3: ONLY ONE DATA FILE IS LOST
You have one datafile that has experienced media failure. You don’t want to restore and recover the entire database or all datafiles associated with the tablespace. You just want to restore and recover the datafile that experienced media failure.
In this example we lost /u01/oracle/DB11G/oradata/apdba/users01.dbf
SCENARIO 1: DATABASE IS NOT OPEN
Here you restore/recover datafile from backup
A) CHECK IF YOU HAVE BACKUP PRESENT
RMAN> list backup;
B) MOUNT DATABASE
$ rman
RMAN> connect target /
RMAN> startup mount;
C) RESTORE DATAFILE
RMAN> restore datafile 6;
D) RECOVER DATAFILE
RMAN> recover datafile 6;
E) OPEN DATABASE
RMAN> alter database open;
SCENARIO 2 : DATABASE IS OPEN
Scenario 2 CASE 1: Datafile image copy from FRA
Here we will use datafile image copy from Flash Recovery Area (FRA), if it is enabled. This is FASTER WAY to recover a datafile.
A) check present files of the database:
RMAN> report schema;
B) Check image copies of the damaged datafile:
In our scenario datafile 6 is damaged.
RMAN> list copy of datafile 6;
C) Take ‘damaged’ datafile ‘offline’
RMAN> sql ‘alter database datafile 6 offline';
D) Switch to the copy of the file in the FRA
RMAN> switch datafile 6 to copy;
E) Recover the datafile copy and make it online
RMAN> recover datafile 6;
RMAN> sql ‘alter database datafile 6 online';
sql statement: alter database datafile 6 online
F) Check the datafiles once again:
RMAN> report schema;
AT THIS STAGE DATAFILE IS ONLINE AND DATABASE CAN BE USED NORMALLY.
When you bring the datafile back online, the tablespace will be brought online as well. The tablespace is now operational. But we don’t want to leave the database using a file in the flash recovery area, though, especially not for the long term.
BELOW STEPS ARE ADVISED TO BE DONE CAN BE DONE LATER ON (say weekend or off-business hours)
In below steps we will move back the data file to its original location.
G) Remove the ‘original damaged’ file at the OS level from the original location, if present
$ /u01/oracle/DB11G/oradata/apdba
$ mv users01.dbf users01.dbf.bkp
H) Create an image copy of the file & place it in the file’s original location
RMAN> backup as copy datafile 6 format ‘/u01/oracle/DB11G/oradata/apdba/users01.dbf';
I) Take the datafile offline:
RMAN> sql ‘alter database datafile 6 offline';
sql statement: alter database datafile 6 offline
J) Switch to the copy of the file
RMAN> switch datafile 6 to copy;
datafile 6 switched to datafile copy “/u01/oracle/DB11G/oradata/apdba/users01.dbf”
K) Recover the datafile copy and make it online
RMAN> recover datafile 6;
RMAN> sql ‘alter database datafile 6 online’;
L) Check the datafiles once again:
RMAN> report schema;
RMAN> backup as copy datafile 6;
$ RMAN
RMAN> sql “alter database datafile ”/u01/oracle/DB11G/oradata/apdba/users01.dbf” offline”;
sql statement: alter database datafile ”/u01/oracle/DB11G/oradata/apdba/users01.dbf” offline
RMAN> restore datafile ‘/u01/oracle/DB11G/oradata/apdba/users01.dbf';
RMAN> recover datafile ‘/u01/oracle/DB11G/oradata/apdba/users01.dbf';
RMAN> sql “alter database datafile ”/u01/oracle/DB11G/oradata/apdba/users01.dbf” online”;
NOTE: When using the RMAN sql command, if there are single quote marks within the SQL statement, then you are required to use double quotes to enclose the entire SQL statement and then also use two single quote marks where you would ordinarily just use one quote mark.
If you want to put the restored datafile to new location, use below RMAN commands instead
RMAN>run
{
sql “alter database datafile ”/u01/oracle/DB11G/oradata/apdba/users01.dbf” offline”;
set newname for datafile ‘/u01/oracle/DB11G/oradata/apdba/users01.dbf’ to ‘/backups/users01.dbf';
restore datafile ‘/u01/oracle/DB11G/oradata/apdba/users01.dbf';
switch datafile all;
recover datafile ‘/backups/users01.dbf';
sql “alter database datafile ”/backups/users01.dbf” online”;
}
Remember that set command needs to be used inside a run block
 select file_name from dba_data_files;

FILE_NAME
——————————————————–
/u01/oracle/DB11G/oradata/apdba/users02.dbf
/u01/oracle/DB11G/oradata/apdba/system02.dbf
/u01/oracle/DB11G/oradata/apdba/undotbs02.dbf
CASE 6: ALL DATAFILES OF A TABLESPACE GOT CORUPTED/LOST
One of the tablespace is giving errors. the tablespace has multiple datafiles and all got corrupted.
If only one datafiles had error, we would have gone for datafile level recovery but since all datafiles associated with have corruption so it is better to go for tablespace level recovery .
Scenario 1: Database NOT Open
This solution works for any tablespace in your database (including system and undo tablesapce).
In this example, we are restoring the users tablespace:
There are two data files in this tablespace and both got corrupted somehow.
$ RMAN
RMAN> startup mount
RMAN> restore tablespace users;
RMAN> recover tablespace users;
RMAN> alter database open;
Scenario 2: Database is Open
Sometimes it is not possible to take the database down. You can take a tablespace offline, restore, and recover it while your database is open. This works for any tablespace except the system and undo tablespaces.
This example takes users offline and then restores and recovers before bringing it back online:
Here also we got the same error in users tablesace as showin in scenario 1 forcing us to go for restore/recover of users tabespace.
$ RMAN
RMAN> SQL ‘ALTER TABLESPACE USERS OFFLINE IMMEDIATE';
RMAN> RESTORE TABLESPACE USERS;
RMAN> RECOVER TABLESPACE USERS;
RMAN> sql ‘alter tablespace users online';
CASE 5: SPFILE/PFILE LOST
Sometimes spfile gets accidentally deleted or you are not able to open database using current spfile
Scenario 1: Using a Recovery Catalog
We will start Oracle instance without parameter file for retrieval of spfile
$ RMAN
RMAN> startup nomount
RMAN> restore spfile;
RMAN> startup force;
Scenario 2: Not Using a Recovery Catalog
Here you must tell the DBID of database to RMAN process.
$ rman
RMAN> connect target /
RMAN> set dbid 8473653926;
RMAN> startup force nomount;
RMAN> restore spfile from ‘/backups/apdba/controlfile_apdba_c-8473653926-20160226-06′;
RMAN> startup force;
NOTE: If our spfile autobackup was in default location, we could have used below command:
RMAN> restore spfile from autobackup;

Gather Schema Statistics Oracle Applications

No comments :
Gather Schema Statistics program generates statistics that quantify the data distribution and storage characteristics of tables, columns, indexes, and partitions.
The cost-based optimization (CBO)  uses these statistics to calculate the selectivity of prediction and to estimate the cost of each execution plan.
As a general rule, run Gather Schema Statistics under the following circumstances:
1.  After there has been a significant change in data in either content or volume.
2.  After importing data.
3.  Any time end-users notice deterioration in performance in routine day-to-day business transactions or when running concurrent programs.
4.  Run on a regular basis (weekly at a minimum) and anytime after application of patch, conversion, etc.
Estimate Percentage / Modification threshold defines the percentage which should be used to initiate gather stats for those objects which have actually changed beyond the threshold.
 The default is 10% (i.e. meaning any table which has changed via DML more than 10%, stats will be collected, otherwise it will be skipped).
How to run Gather Schema Statistics concurrent program:
1. Log on to Oracle Applications with
    Responsibility = System Administrator
2. Submit Request Window
    Navigate to: Concurrent > Requests
3. Query for the Gather Schema Statistics
4. Enter the appropriate parameters. This can be run for specific schemas by specifying the schema name or entering  ‘ALL’  to gather statistics for every schema in the database
5. Submit the Gather Schema Statistics program
Parameters :
------------------
Schema Name:  Schema for which statistics are to be gathered. Specify ALL for all Oracle Applications schemas
Percent:  The sampling percentage. If left blank, the default value of 10 is used. The valid range is from 0 to 100
Degree:  The degree of parallelism to be used for gathering statistics. If a Degree is not provided, it defaults to the minimum ofparallel_max_servers and cpu_count.
Backup Flag:  NOBACKUP is used, then the GATHER_SCHEMA_STATS procedure will not backup the current statistics. This way the GATHER_SCHEMA_STATS procedure will run faster.
Restart Request ID:  In the case where the Gather Schema Statistics run fails due to whatever reasons, the concurrent request can be re-submitted and it will pick up where the failed run left off, if you provide the concurrent request_id of the failed run.
History Mode:  Last Run – History records for each object are maintained only for the last gather statistics run. Each subsequent run will overwrite the previous history record for the object. This is the default behavior
Gather Options:  GATHER: All tables and indexes of the schema schema name are selected for stats gathering. This is the default
Modifications Threshold:  Applicable only to GATHER AUTO and LIST AUTO Options
Invalidate Dependent Cursors:  This flag indicates whether cursors dependent on the table being analyzed should be invalidated or not. By default, dependent cursors are invalidated.
How to Gather the Statistics of Custom Schema when we submit the concurrent request called Gather Schema Statistics :
When we submit Gather Schema Stats with Parameter  ALL, concurrent request will complete successfully, and DBAs will not realize that custom schemas are not analyzed.
 select count(table_name)  from  dba_tables  where  last_analyzed  is  not null  and  owner= <custom_schema_name>;
Here you realize none of the tables in custom schema are analyzed.
Gather Schema Statistics program gathers statistics for all schemas , however it skips custom schemas registered in Oracle Applications.
Reason:  
Whenever Custom schemas are registerd in Oracle Applications , the entries are done in 2 tables
ie  FND_ORACLE_USERID  and  FND_APPLICATIONS_TL
However , when Gather schema statistics is submitted it uses the below query to get schema information
Sql > select distinct upper(oracle_username) sname
          from fnd_oracle_userid a,
         fnd_product_installations b
         where a.oracle_id = b.oracle_id
         order by sname;
Note : When custom schema are created the entry is not made in  FND_PRODUCT_INSTALLATIONS  and hence it is not picked up in the above query.
Solution :
How can we make an entry in fnd_product_installations so that it is picked up by Gather Schema Stats. Follow below steps
Go to the Responsibility called Alert Manager and Navigate to the form -> Installations under Systems Menu.
Define custom application in this form. Go to the last record and make entry for custom applications. Once this is done , it will insert an entry in fnd_product_installations.
Submit Gather Schema stats and then query dba_tables and you will realize , stats are being gathered for custom schema as well.
GATHER SCHEMA STATS from Back-end
Use the following command to gather schema statistics:
exec fnd_stats.gather_schema_statistics(‘ONT’) < For a specific schema >
exec fnd_stats.gather_schema_statistics(‘ALL’) < For all schemas >
Use the following command for gathering statistics on a temporary table
(ie: temporary tablename = TEMP_tmp in schema ABC):
exec fnd_stats.gather_table_stats(‘ABC’,'TEMP_tmp’);
Note 1065813.1 How to Gather Statistics on Custom Schemas for Ebusiness Suite 11i and R12? (Doc ID 1065813.1)
Monitoring:
exec fnd_stats.ENABLE_SCHEMA_MONITORING (SCHEMA_NAME);

ADOP Online Patching in Oracle Apps R12.2

No comments :
Online patching is supported by the capability of storing multiple application editions in the database, and the provision of a dual application tier file system. At any given point in time, one of these file systems is designated as run (part of the running system) and the other as patch (either being patched or awaiting the start of the next patching cycle).
For applying a patch in R12.2 you need to use adop and run through all below phases in sequence mentioned below.
1) adop phase=prepare
2) adop phase=apply patches=<patch_number1>,<patch_number2> workers=<number_of_worker>
3) adop phase=finalize workers=<number_of_worker> (called automatically)
4) adop phase=cutover workers=<number_of_worker>
5) adop phase=cleanup (called automatically)
OR
Running all phases in single command:
adop phase=prepare,apply,finalize,cutover,cleanup patches=<patch_number1>,<patch_number2>
DESCRIPTION OF EACH PHASE
1) PREPARE PHASE DETAILS
Used to start a new online patching cycle
How to execute:
A) Set the environment by executing (sourcing) the run file system environment file:
$ source <EBS install base>/EBSapps.env run
B) Verify envirionment
You can confirm that the environment is properly set by examining the relevant environment variables:
$ echo $FILE_EDITION
 run
$ echo $TWO_TASK
 dbSID
C) Download Patches
Download patches to be applied and place then in the $PATCH_TOP directory of your system. This directory is pre-created by the install in the non-editioned file system (fs_ne) and should not be changed.
Important: On a multi-node system with non-shared file systems, you must copy the patch files to each separate $PATCH_TOP directory, so that the patch files are available from the same location on all nodes.
D) Unzip the patch
$ unzip <patch>.zip
E) Run Prepare Command
Prepare the system for patching by running the following command to start a new patching cycle:
$ adop phase=prepare
 What it will do:
• Checks whether to perform a cleanup, which will be needed if the user failed to invoke cleanup after the cutover phase of a previous online patching cycle.
• Checks the integrity of the database data dictionary. If any corruption is found, adop exits with an error.
• Checks system configuration on each application tier node. A number of critical settings are validated to ensure that each application tier node is correctly registered, configured, and ready for patching.
• Checks for the existence of the “Online Patching In Progress” (ADZDPATCH) concurrent program. This program prevents certain predefined concurrent programs from being started, and as such needs to be active while a patching cycle is in progress (that is, while a database patch edition exists). If the ADZDPATCH program has not yet been requested to run, a request is submitted.
Note: ADZDPATCH is cancelled later on when the cutover phase is complete.
• Checks to see if the patch service has been created. adop requires that a special database service exists for the purpose of connecting to the patch edition. This service is created automatically, but its continued existence is validated on each prepare.
It can be checked by the database parameter SERVICE_NAME
SQL> show parameter service_name
NAME TYPE VALUE
 ------------------------------------ ----------- ---------------
service_names string dba, ebs_patch
Here dba is the SID of our database and ebs_patch is additional service_name which is required by online patching tool.
If you look at tnsnames.ora file in the Application tier $TNS_ADMIN directory you will find below kind of entry:
<SID>_patch=
 (DESCRIPTION=
 (ADDRESS=(PROTOCOL=tcp)(HOST=<your_database_server_name>)(PORT=<your_database_port>))
 (CONNECT_DATA=
 (SERVICE_NAME=ebs_patch)
 (INSTANCE_NAME=<your_database_SID>)
 )
 )
During patching phase, adop will use this tns entry to connect to database.
• Invokes the TXK script $AD_TOP/patch/115/bin/txkADOPPreparePhaseSynchronize.pl to synchronize the patches which have been applied to the run APPL_TOP, but not the patch APPL_TOP.
• Checks the database for the existence of a patch edition, and creates one if it does not find one.
2) APPLY PHASE DETAILS
In the apply phase, adop applies the specified patches to the system. Patches are applied to the patch edition of the database and file system.
How to execute:
Example:
$ adop phase=apply patches=1234,7891 workers=8
Where 1234 and 7891 are the patch numbers
What it will do:
If a post-installation patch step mentions any tasks that need to be performed explicitly, where they are run from depends on the type of patching:
• In a normal online patching cycle, the steps should be executed from the patch file system after the apply phase.
• If the patch is being applied in hotpatch mode or downtime mode, the steps should be executed from the run file system after the apply phase.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3) FINALIZE PHASE DETAILS
The finalize phase will be executed while the application is still online. It is used to perform any remaining processing that is needed to ensure the system is ready for the fastest possible cutover.
Used to perform the final patching operations that can
How to execute:
$ adop phase=finalize
What it will do:
• Pre-compute DDL that needs to be run at cutover.
• Compile all invalid objects.
• Validate that the system is ready for cutover.
If finalize_mode=full, compute statistics for key data dictionary tables for improved
performance.
VERY IMPORTANT 1 : Up to this phase, you can run a special phase called abort, which will undo the changes made so far in the patching cycle. After cutover is complete, however, you cannot do this.
VERY IMPORTANT 2 : In an online patching cycle, the requisite JAR files are initially stored in the $APPL_TOP/admin/<SID>/out directory, and then uploaded into the database during the cutover phase. Therefore, the out directory must not be deleted at least until cutover (next phase) is complete.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4) CUTOVER PHASE DETAILS
Used to perform the transition to the patched environment. Shuts down application tier services, makes the patch edition the new run edition, and then restarts application tier services. This is the only phase the involves a brief downtime.
Important: No users should remain on the system during cutover, as there will be a short downtime period while the application tier services are restarted. Also, any third-party processes connected to the
old run edition of the database should be shut down, or they will be terminated automatically.
How to execute:
$ adop phase=cutover
What it will do:
• Shut down internal concurrent manager. The adop utility signals the internal concurrent manager to shut down, but will wait for any existing concurrent requests to finish before it proceeds with cutover actions.
Note: Cutover will take longer if it has to wait for long-running concurrent processes to complete. In such a case, you can expect to see an informational message of the form: [STATEMENT] [END 2013/10/28 23:47:16] Waiting for ICM to go downIf you do not want to wait for in-progress concurrent requests to finish normally, you can terminate the internal concurrent manager by executing the adcmctl.sh abort command from a different shell.
• Shut down application tier services: All application tier services are brought down. During this period, the system is unavailable to users.
• Cutover database: Promote patch database edition to become the new run database edition, using adzdpmgr.pl script.
• Cutover file system: Promote patch file system to become the new run file system, switching the $FILE_EDITION values in the patch and run enviroments. The current patch APPL_TOP becomes the new run APPL_TOP, and the current run APPL_TOP becomes the new patch APPL_TOP. Terminate old database sessions: Terminate any database connections to the old run edition of the database.
• Start application tier services: Application tier services are restarted, on the new run edition. The system is now available again to users
• ADZDPATCH concurrent program is cancelled when the cutover phase is complete.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5) CLEANUP PHASE DETAILS
Important: If you fail to run the cleanup phase explicitly, it will be run automatically on the next prepare cycle, but this will cause a delay in starting your next online patching cycle.
How to execute:
$ adop phase=cleanup
What it will do:
• Various actions are performed during cleanup, including dropping (removing) obsolete: Crossedition triggers, Seed data, Editioned code objects (covered objects), Indexes, Columns, Editions.
Using parameter cleanup_mode:
a) cleanup_mode=quick – Performs minimum cleanup, including removal of obsolete crossedition triggers and seed data.
Use quick cleanup when you need to start the next patching cycle as soon as possible. For example, if you want to start a new patching cycle right away, but have not yet run cleanup from the previous patching cycle, you can use quick cleanup mode to complete the essential cleanup tasks as fast as possible.
b) cleanup_mode=standard – Does the same as quick mode, and also drops (removes) obsolete editioned code objects (covered objects).
This is the default mode , so does not need to be specified.
c) cleanup_mode=full – Performs maximum cleanup, which drops all obsolete code and data from earlier editions
Use full cleanup when you want to recover the maximum amount of space in the database. If you have run a large number of patching cycles, or applied a very large patch such as a rollup, significant space may be consumed by obsolete table columns and recovered by running a full cleanup. A full cleanup should only be performed when there is no immediate need to start a new patching cycle.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
THERE ARE TWO SPECIAL PHASES:
A) ABORT PHASE DETAILS
Abort PHASE is conditional phase. This phase cannot be specified with any other phase.
If for some reason either the prepare or apply phase failed or gave problems, you can abort the patching cycle at either of these points by running a special phase with the Command. The actions taken will be discarded (rollbacked).
IMPORTANT: This abort command is only available up to (but not including) the cutover phase. After cutover, the system is running on the new edition, and abort is no longer possible for that patching cycle.
How to execute:
The command to perform this operation is:
$ adop phase=abort
What it will do:
• Confirms that there is an in-progress online patching cycle, so the abort call is therefore valid.
• Checks for the existence of a patch edition and drops one if it exists.
• Cancels the ADZDPATCH concurrent program, if it is running.
• Deletes the rows inserted for the pending session ID from the ad_adop_sessions and ad_adop_session_patches tables.
VERY IMPORTANT: After running abort, a full cleanup must be performed. The cleanup command is: adop phase=cleanup cleanup_mode=full). This will remove any columns that were added by the patch but are no longer needed because of the abort. If they are not removed, they may cause problems in a later patching cycle.
Alternatively, you can run a combined command to abort the patching cycle and perform a full cleanup:
$ adop phase=abort,cleanup cleanup_mode=full
If any attempt was made to apply patches to the patch edition, after abort you must run the fs_clone phase (adop phase=fs_clone) to recreate the patch file system.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
B) FS_CLONE PHASE DETAILS
The fs_clone phase is a command (not related to adcfgclone.pl) that is used to synchronize the patch file system with the run file system. The fs_clone phase should only be run when mentioned as part of a specific documented procedure.
How to execute:
The fs_clone phase is run using the following command:
$ adop phase=fs_clone
What it will do:
This phase is useful if the APPL_TOPs have become very unsynchronized (meaning that there would be a large number of delta patches to apply). It is a heavyweight process, taking a backup of the entire current patch APPL_TOP and then cloning the run APPL_TOP to create a new patch APPL_TOP. As this method requires more time and disk space, it should only be used when the state of the patch file system is unknown. This command must be invoked from the run file system, before the next prepare phase is run.
Note: The patch file system requires at least 25 GB of free disk space to be available for adop operations, including fs_clone. If there is insufficient free space, the adop operation will fail.
If an fs_clone operation fails, you can rerun it with the option force=yes to restart it from the beginning (with the same session ID), or force=no to restart it from the point where it failed.
IMPORTANT POINTS REGARDING ONLINE PATCHING:
1. adop utility is put under $APPL_TOP_NE/ad/bin. It is a wrapper script which calls internally the perl script $AD_TOP/bin/adzdoptl.pl which does actual work of applying the patch.
2. adop will automatically set its environment as required, but it is the user’s responsibility to set the environment correctly for any other commands that may be run. Set the run edition environment whenever executing commands that you intend to affect the run edition.
For example:
$ . <EBS_ROOT>/EBSapps.env run
 $ adstrtal.sh
Set the patch edition environment whenever you intend to execute commands that affect the patch edition.
For example:
$ . <EBS_ROOT>/EBSapps.env patch
 $ sqlplus apps/apps @my_custom_patch_script.sql
3. All the phases need to be completed and you can’t skip any of these. For example, if you try to skip prepare phase, you may get error message like “Apply phase can only be run while in a patching cycle, i.e. after prepare phase.”
4. After an online patching cycle is started, you should not perform any configuration changes in the run edition file system. Any that are made will not be propagated and will therefore be lost after cutover is complete.
5. You should not attempt to clone an Oracle E-Business Suite system while an online patching cycle is in progress.
6. The prepare, apply, and fs_clone phases all require at least 10GB of free disk space. All other phases require 1GB of free space. A warning message will be displayed if less than the needed amount is available.
7. The directories where you extracted the patches applied in a given patching cycle must be retained, in the same location and with the same contents, until the next prepare phase completes. This is also a requirement for patches applied in a hotpatch session.
8. Maintenance Mode is not needed for online patching, and so Maintenance Mode is not available in Oracle E-Business Suite Release 12.2.
ADOP ON MULTI-NODE
In a multi-node environment, one application tier node will be designated as the primary node. This is the node where the Admin Server is located, and will usually also be the node that runs Oracle HTTP Server. All other application tier nodes are designated as secondary nodes.
adop commands are invoked by a user on the primary node. Internally, adop uses Secure Shell (ssh) to automatically execute required patching actions on all secondary nodes. You must set up passwordless ssh connectivity from the primary node to all secondary nodes.
If a node unexpectedly becomes inaccessible via ssh, it will be abandoned by adop, and the appropriate further actions taken. Consider a scenario where the adop phase=prepare command is run in a system with ten application tier nodes. The command is successful on nine nodes, but fails on the tenth. In such a case, adop will identify the services enabled on nodes 1-9. If they are sufficient for Oracle E-Business Suite to continue to run normally, adop will mark node 10 as abandoned and then proceed with its patching actions. If they are not sufficient, adop will proceed no further.

R12.2 adop patching and Cloning issue and solution

No comments :
Prerequisites before starting patching activity.
1. Check Patch top size ,filesystem free space  , it should be minimum ~ 26.5- 27 GB approx. free space, otherwise Prepare phase will fail
2. Check context_file and remove all custom entry below CUSTOM TOP
3. Check inventory which should point correctly
4. In case of DMZ instance(APDROD & APDTST)  download all patch on both internal and external (DMZ) node under PATCH_TOP (Double check patch on both nodes before apply phase)
Issue:
1. If prepare/apply phase/Cutover fails, check log under $ADOP_LOG_HOME/current_session_id
Find the issue and fix then trigger the adop cycle prepare/apply/cutover etc.
2. If patch is applied in internal node but failing in external (DMZ) node, THEN Crosscheck patch is downloaded in external node under PATCH_TOP. Check log in external node also for any issue. Download patch on both node and triggered apply phase.
3. If node is abandon during adop_phase, please check log for issue
Run fs_clone and start the prepare/apply phase
4. If node is abandon during Cutover and filesystem got interchanged in primary node but not in another node, check log for issue.
This is absolutely not recommended and will lead to ADOP corruption if not handled based on the scenario.
Take backup of ad_adop_session table before updating ad_adop_session table (strongly recommended)
Manual cutover after mocking values in ADOP tables
Update ad_adop_session table set abandon flag=NULL
Run fs_clone with option force=yes
Run cutover manually by option allnodes=no

                       Cloning issue and solution
1. ADcfgclone is failed while creating FMW Home
Error:
==============
/d02/app/APDT122/fs2START: Creating FMW Home.
Running /d02/app/APDT122/fs2/EBSapps/comn/clone/FMW/pasteBinary.sh -javaHome /d02/app/APDT122/fs2/EBSapps/comn/util/jdk64 -al /d02/app/APDT122/fs2/EBSapps/comn/clone/FMW/FMW_Home.jar -tl /d02/app/APDT122/fs2/FMW_Home -invPtrLoc /etc/oraInst.loc -ldl /d02/app/APDT122/fs2/inst/apps/APDTST_apdbasrv02/admin/log/clone/fmwT2PApply -silent true -debug true -executeSysPrereqs false
Script Executed in 28420 milliseconds, returning status 255
Script failed, exit code 255
Solution:  Make sure APPLTMP location should have atleast 10GB free space
Export T2P_JAVA_OPTIONS="Djava.io.tmpdir=/d02/app/APDT122/fs_ne/inst/APDTST_apdbasrv02/temp"
and ran the adcfgclone.pl
2. Adcfgclone got complete but at the end it failed for autoconfig with the below error.
Error :
=====================
WARNING: [AutoConfig Error Report]
The following report lists errors AutoConfig encountered during each
phase of its execution.  Errors are grouped by directory and phase.
The report format is:
      <filename>  <phase>  <return code where appropriate>
               [PROFILE PHASE]
                AutoConfig could not successfully execute the following scripts:
Directory: /d02/app/APDT122/fs2/inst/apps/APDTST_apdbasrv02/admin/install
      adadmprf.sh             INSTE8_PRF
Solution:  work around
1. Take backup of ad_timestamps, ad_appl_tops
2. Remove the rows which correspond to current node (on which the script is failing)
           SQL> create table ad_timestamps_bkp as select * from ad_timestamps;
                     Table created.
             SQL> create table  ad_appl_tops_bkp as select * from  ad_appl_tops;
                      Table created.
          SQL>  select distinct substr(attribute, 1, instr(attribute, '*') - 1)
                         from ad_timestamps
                          where type in ('INSTANTIATED_CURRENT_VIEW_SNAPSHOT',                           'BACKFILLED_BUGS_IN_CURRENT_VIEW_SNAPSHOT');
          SQL> delete ad_timestamps where type in ('INSTANTIATED_CURRENT_VIEW_SNAPSHOT',
                     'BACKFILLED_BUGS_IN_CURRENT_VIEW_SNAPSHOT');
          SQL>  delete ad_appl_tops where APPLICATIONS_SYSTEM_NAME='APDROD';
3. Run the autoconfig , it will complete successfully.
4. DMZ URL is not working
Solution: please confirm the port in DMZ and post clone steps for DMZ
          ii. Modify the HTTP port in the $CONTEXT_FILE of the external node and run autoconfig
               iii . Check SSL setup in the $CONTEXT_FILE and run autoconfig
              Issue:
External URL not up. Due to http port using wrong port#8002.
Processes in Instance: EBS_web_APDTST_OHS2
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component                    | process-type       |     pid | status   |        uid |  memused |    uptime | ports
---------------------------------+--------------------+---------+----------+------------+----------+-----------+-----
EBS_web_APDTST                   | OHS                |   18624 | Alive    | 1412243724 |  1870960 |   0:24:01 | https:4445,https:10001,http:8002
Solution:
Manually modified port#8001 in httpd.conf since it is not changed by autoconfig.
[apapdtst@apdbadmz01 EBS_web_APDTST]$ pwd
/d02/app/APDT122/fs1/FMW_Home/webtier/instances/EBS_web_APDTST_OHS2/config/OHS/EBS_web_APDTST
[apapdtst@apdbadmz01 EBS_web_APDTST]$ grep "8001" *
httpd.conf:Listen 8001
[apapdtst@apdbadmz01 EBS_web_APDTST]$
Database Restore Issue:  
5. Database restore was failing because of space issue and not having apdficient space for mapping also.
Solution: As some of the mount point in APDTST has not enough space to restore all the datafiles from APDROD’s .
Remap mount points from source to target accordingly ,if any mount point still lacking space after mapping and adjusting all datafiles then triggered restore and move restored datafile to free mount point.
   ii. Once restore complete rename the datafiles from old to new location as below.
Rename datafile (ALTER DATABASE RENAME FILE '/old/location' TO '/new/location'; )

R12.2 DMZ issue unable to login and Solution

No comments :
Issue-1 
DMZ RUN file system config file having Patch file system entry which may be happened because of copy of patch file system config file to RUN fs config file.
Solution: Manually edited and modified RUN fs config file and made changes according to RUN fs
(For More clarification manually compared config file and setups to APDBAPROD DMZ setup config files)
Issue-2 
In CONTEXT_FILE of RUN fs webPort was set to 8002
Solution: corrected web port to 8001
Issue-3 
In CONTEXT_FILE of RUN fs httplistenparameter was set to 8002
Solution: corrected httplistenparameter to 8001
Issue-4
http port was reflecting wrong in http config file
Solution: corrected http port to 8001
Processes in Instance: EBS_web_APDBATST_OHS6
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component                    | process-type       |     pid | status   |        uid |  memused |    uptime | ports
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
EBS_web_APDBATST                   | OHS                |   20517 | Alive    | 1843739326 |  1805484 |   0:34:30 | https:4445,https:10001,http:8001
Issue-5-
mod_wl_ohs.conf file  having Patch fs entry which corrected as below according to correct RUN file setup for DMZ.
Solution:
Setup WebLogicCluster entry for DMZ
Issue-6-
In apps.conf file of RUN fs having Patch fs entry of apps.conf. oacorecluster URL was reflecting patch file entry
Solution:
Manually modified apps.config of RUN fs and added below entry
(Compared apps.config entry of APDBAPROD with current RUN fs apps.config for corrected modification and entry)
http://apdbadmz01.APDBA.com:7203/OA_HTML/media
http://apdbasrv02.APDBA.com:7201/OA_HTML/media
Note: Run autoconfig to reflect changes all changes

R12.2 SSO issues and solution

No comments :
Scenario #1 User will be able to login into EBS through SSO  
Ideally, any SSO user will be able to login into EBS if it meets all the below criteria -
a. User exists in both EBS FND_USER and OID (USER_NAME in FND_USER table matches with UID attribute in OID)
b. The profile option “Applications SSO Login Types” at Site level is set to “Both”.
c. Make sure “Local” is Not Set at user level as this will override the site level value.
d. The user_guid in FND_USER table corresponding to the user is NULL.
e. Profile Option Applications SSO User Auto Link is set to enabled
f. Make sure user is not end dated in EBS (END_DATE in FND_USER table)
Scenario #2  User is able to login into EBS through SSO  although “Applications SSO Login Types” is set to “Local” at user level
a. What happened here is the first time user logged in, the user_guid got synced in FND_USER with that in ldap and “Applications SSO Login Types” was set to “Both” at Site level.
b. However later someone might have updated the “Applications SSO Login Types” to “Local” for the user.
c. So, currently although the profile option “Applications SSO Login Types” at user level is set to “Local”, user is able to log in since user_guid in FND_USER  is mapped with orclguid in ldap.
Scenario #3     User may face issue while accessing EBS through SSO -    “Your Oracle EBS account has not been linked with SSO account”
Cause/Solution: 
This may happen when –
a. The profile option “Applications SSO Login Types” at user level is set to “Local”.
b. User_guid for that user is NULL in FND_USER table in EBS
Solution is to set the profile option to NULL at user level. After that, ask user to close the previous session and retry accessing EBS through SSO. This will allow the user to authenticate through ldap, thereby updating user_guid in FND_USER to orclguid in ldap and the user will be able to access EBS.
Scenario #4
APDDEV oracle is getting redirected to production url after SSO authentication and user is not able to access APDDEV through SSO. The same configuration is working fine for APDTST both being configured with same OAM/OID. 
Cause/Solution:
In brief, https://oracledev.apdba.com is getting redirected to SSO link https://oracleoamtest.apdba.com/oam as expected
However, after SSO authentication, it’s getting routed to https://oracle.apdba.com instead of https://oracledev.apdba.com
The accessgate port was incorrect in mod_wl_ohs.conf under $IAS_ORACLE_HOME/instances/EBS_web_<SID>_OHS<Active OHS number>/config/OHS/EBS_web_<SID>
Rectify the port information and bounce the EBS services. That resolved the issue.
[apdbadev@apdbasrv02 EBS_web_SUFDEV]$ diff mod_wl_ohs.conf.071316 mod_wl_ohs.conf
57c57
< WebLogicCluster apdbasrv02.apdba-blogspot.com:6896,orap02.apdba-blogspot.com:6803
> WebLogicCluster apdbasrv02.apdba-blogspot.com:6898
62c62
< WebLogicCluster apdbasrv02.apdba-blogspot.com:6896,orap02.apdba-blogspot.com:6803
> WebLogicCluster apdbasrv02.apdba-blogspot.com:6898
68c68
< WebLogicCluster apdbasrv02.apdba-blogspot.com:6896,orap02.apdba-blogspot.com:6803
> WebLogicCluster apdbasrv02.apdba-blogspot.com:6898
Scenario #5
OID/OAM issue: If OAM is configured with EBS and you see errors like below while opening https://oracleoamtest.apdba.com (although EBS non-SSO link https://oracletest.apdba.com/OA_HTML/AppsLocalLogin.jsp is working fine)
Cause/Solution:
Please check the following –
1. OAM and IDM services are up and running
2. Web OPMN services are up
cd $ORACLE_INSTANCE/bin
opmnctl status -l
3. Check if Access gate is deployed in EBS and services are up and running.
a. First check the port on which access gate is running.
b. Now check if services are running on that port or not.
OR
wget apdbasrv02.apdba.com:6802/accessgate/OAMLogin.jsp
c. You can also check the url from front end –
http://apdbasrv02.apdba.com:6802/accessgate/OAMLogin.jsp
d. If you see the services are not running,
Re-ran below script  to deploy accessgate again 
perl $AD_TOP/patch/115/bin/adProvisionEBS.pl  ebs-create-oaea_resources   -contextfile=$CONTEXT_FILE   -deployApps=accessgate   -SSOServerURL=https://oracleoamtest.apdba.com:443   -logfile=/tmp/deployeag_dep.log3
Next,  you need to bring up the oaea_server1 managed service from EBS weblogic console 
Go to http://apdbasrv02.apdba.com:7002/console and start the oaea_server1 managed service
Click on Yes.
This should resolve the issues.

R12.2 adop phases and parameters

No comments :
ADOP PHASES
1) prepare  - Starts a new patching cycle.
          Usage:  adop phase=prepare
 2) apply - Used to apply a patch to the patch file system (online mode)
         Usage:  adop phase= apply  patches = <>
    Optional parameters during apply phase
                --> input file : adop accepts parameters in a input file
              adop phase=apply input_file=
             Input file can contain the following parameter:
             workers=
              patches=:.drv, :.drv ...
             adop phase=apply input_file=input_file 
             patches
             phase
             patchtop
             merge
             defaultsfile
             abandon
             restart
             workers
Note : Always specify the full path to the input file
        --> restart  --  used to resume a failed patch
           adop phase=apply patches=<> restart=yes
       --> abandon  -- starts the failed patch from scratch
           adop phase=apply patches=<>  abandon=yes
       --> apply_mode 
             adop phase=apply patches=<>  apply_mode=downtime
         Use apply_mode=downtime to apply the patch in downtime mode ( in this case,patch is applied on run file system)
      --> apply=(yes/no)
        To run the patch test mode, specify apply = no
      --> analytics 
     adop phase=apply analytics=yes
            Specifying this option will cause adop to run the following scripts and generate the associated output files (reports):
   ADZDCMPED.sql - This script is used to display the differences between the run and patch editions, including new and changed objects.
   The output file location is: /u01/R122_EBS/fs_ne/EBSapps/log/adop////adzdcmped.out.
    ADZDSHOWED.sql - This script is used to display the editions in the system.
   The output file location is: /u01/R122_EBS/fs_ne/EBSapps/log/adop///adzdshowed.out.
    ADZDSHOWOBJS.sql - This script is used to display the summary of editioned objects per edition.
   The output file location is: /u01/R122_EBS/fs_ne/EBSapps/log/adop///adzdshowobjs.out
    ADZDSHOWSM.sql - This script is used to display the status report for the seed data manager.
   The output file location is: /u01/R122_EBS/fs_ne/EBSapps/log/adop///adzdshowsm.out
3) Finalize :  Performs any final steps required to make the system ready for cutover..     invalid objects are compiled in this phase
    Usage: adop phase=finalize
   finalize_mode=(full|quick)   
 4) Cutover  : A new run file system is prepared from the existing patch file system.
   adop phase=cutover
   Optional parameters during cutover phase:
          -->mtrestart - With this parameter, cutover will complete without restarting the application tier services
       adop phase=cutover mtrestart=no  
   -->cm_wait -  Can be used  to specify how long to wait for existing concurrent processes to finish running before shutting down the Internal Concurrent Manager.
           By default, adop will wait indefinitely for in-progress concurrent requests to finish. 
 5) Cleanup    
 cleanup_mode=(full|standard|quick)  [default: standard]
6) FS_CLONE  : This phase syncs the patch file system with the run file system.
    Note : Prepare phase internally runs fs_clone if it is not run in the previous patching cycle
    Optional parameters during fs_clone phase:
  i ) force - To start a failed fs_clone from scratch
 adop phase=fs_clone force=yes  [default: no]
    ii ) Patch File System Backup Count ==> s_fs_backup_count  [default: 0 : No backup taken]
 Denotes the number of backups of the patch file system that are to be preserved by adop. The variable is used during the fs_clone phase,
 where the existing patch file system is backed up before it is recreated from the run file system.
7) Abort - used to abort the current patching cylce.
   abort can be run only before the cutover phase
    adop phase=abort  

E-BUSINESS SUITE UPGRADE R11i TO R12.2.4

No comments :
Contents
E-BUSINESS SUITE UPGRADE R11I TO R12.2.4 1
Document Control 2
Change Record 2
Reviewers 2
Distribution 2
Contents 3
Points to Remember: 6
Segregation of Tasks 7
First Step: - DBA Team 7
Second Step: - Apps DBA Team 7
Third Step: - Functional Team 7
Fourth Step: - Apps DBA Team 7
11i - Pre-Upgrade Patches 8
Interactive Patches - OPM Functional Team 14
Init.ora updates 16
Build Staging Area 18
Installation Screenshots 21
Upgrade File 34
11.2.0.4 DB Patches 36
Apply Lessons Learnt from Previous Iterations 44
Apply Resolution from Sandbox Iteration 44
Apply Localization Patches - After Functional Configs 46
R12.2.0 Upgrade Patches 55
DB Init. ora Parameter changes 63
Execute Auto Config on DB Tier 64
Execute Rapidwiz on the Apps Tier 66
Post R12.2.0 Techstack Patches 72
Apply R12.2.4 Pre-Upgrade TechStack Patches 72
ORACLE_HOME=10.1.2.3 72
ORACLE_HOME=FMW_Webtier 72
ORACLE_HOME=FMW_ORACLE_COMMON 73
WebLogic Server 73
Additional DB Patches 75
DB Additional Patches for Conflicts 79
Steps to upgrade Oracle Applications to R12.2.4 82
AD and TXK Delta 6 Patches 85
R12.2.4 Upgrade 87
Post R12.2.4 Steps 89
Post R12.2.4 Patches 90
New Products Enabled 91
Custom Tops 96
Create Custom Tops 96
Copy Files 97
Create softlinks 97
Copy concurrent request logs and out files from 11i to R12.2.4 98
Copy Java files 99
Custom sftp programs 100
Datafix 101
GL_CODE_COMBINATIONS fix (/patch/erp/SCALE) 101
Appendix A - DB Components 102
DB components in EBSREF1 (11i) 102
DB components in EBSSTR1 (R12.2.4) 102
Appendix B - Tablespace Size Before and After Upgrade 103
Table space size before upgrade in EBSREF1: 103
Table space size before upgrade in EBSSTR1: 104
Appendix C - Product Tops - R11i & R12.2.4 105
R11i Product Tops 105
R12.2.4 Product Tops 110
Appendix D - Patch Timings 114
Appendix E - Object Counts - All and Invalids 117
Appendix F - Context Files 118
Context Files from R11i  - EBSREF1 118
Context Files from R12.2.4 - EBSSTR1 118
References 119
Oracle Support Notes 119
Oracle Support Service Requests 119
Open and Closed Issues 120
Open Issues 120
Closed Issues 120
Points to Remember:
1. This document was created with the following as the environment:
DB and Application servers are on OEL 6.6 on commodity servers (non Exa)
Rapid wiz install version is 12.2.0.49
DB character set is UTF8
DB is non-RAC
DB version is 11g R2 (11.2.0.4)
Shared APPL_TOP is not configured as of 03/11/15. The steps will be tested in Patch and migrated to Development. Steps will be added to the document upon completion of the task
Archive logging was not disabled
Daily nightly backups were not stopped
Gather schema statistics was not scheduled / completed after the DB upgrade
Database character set conversion exception report is being reviewed by APDBA teams as of 03/11/15. Once the decision on loss data has been made, the database will be converted from UTF8 to AL32UTF8
Please implement the recommendations at the end of each patch before applying the patches
Segregation of Tasks
First Step: - DBA Team
Perform platform migration (HP-UX to Exadata OEL 6.6)along with DB upgrade (11.2.0.4) and unicode conversion to UTF8
Apply All the DB patches required for R12.2.4 upgrade as under sections:
11.2.0.4 DB Patches
Additional DB Patches
DB Additional Patches for Conflicts
Init.ora updates
Handover the instance to Apps DBA Team
Second Step: - Apps DBA Team
Apply 11i Pre-upgrade patches as under sections:
11i - Pre-Upgrade Patches (Merged)
Interactive Patches - OPM Functional Team (Merged)
Hand over the instance to Functional Team 
Execute scripts as per OPM team's requirement 
Handover the instance to Functional Team
Third Step: - Functional Team
Functional team to complete all the pre-upgrade tasks
Handover the instance to Apps DBA Team
Fourth Step: - Apps DBA Team
Apply localization patches
Apply R12.2.0 pre-upgrade patches
Upgrade to R12.2.0
Execute Online Enablement Reports
Generate appsutil.zip file
Execute Autoconfig on all the DB Nodes
Apply Online Enablement Patch
Execute Online Enablement Reports
Apply TechStack Patches
Upgrade to R12.2.4
Perform  and apply all the post upgrade steps and patches
Change default passwords
Release the instance to users
11i - Pre-Upgrade Patches
Ensure the environment variables are set for the instance being upgraded, here it is "EBSSTR1" instance
Apply the following patches to R11i instance using adpatch tool. The patch location is
/patch/erp/SCALE/11ito1220patches/preupgrade/application
Apply Patch 12917904
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/12917904
$ adpatch
Apply all the three (3) c, d and g drivers
There are post patch functional steps to be completed.
Apply Patch 5750051
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/5750051
$ adpatch
Apply all the three (3) c, d and g drivers
Issue:
Backup of the table mtl_system_items_tl is mtl_system_items_tl_bkp
erpccdt2:applstr$ adident Header $INV_TOP/sql/b5750051.sql
/u07/home/ebsstr1/ebsstr1appl/inv/11.5.0/sql/b5750051.sql:
$Header b5750051.sql 115.0 2007/01/08 12:44:23 kjonnala noship $
Resolution:
Backed up the table mtl_system_items_tl as mtl_system_items_tl_bak using the SQL statement " create table mtl_system_items_tl_bak as select * from mtl_system_items_tl"
Successful patch installation checks
    The version of $INV_TOP/sql/b5750051.sql should be 115.0
Apply Patch 3689809
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/3689809
$ adpatch
Apply all the three (3) c, d and g drivers
Issue:
The following Oracle Forms objects did not generate successfully:
gme     forms/US        PMPARTDB.fmx
=====================
Please recompile all the GME PLLs and forms after applying this patch.
An error occurred while generating Oracle Forms files.
Continue as if it were successful [No] :
Resolution:
Type "Yes"  to complete the patch
Recommendation: 
We may not need the forms to be compiled, as users may not be using it.
Apply Patch 4969646
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/4969646
$ adpatch
Apply all the three (3) c, d and g drivers
Post Patch Step:
OPM_PK.J - 2433137 is installed
Please recompile all the GME PLLs and forms after applying this patch.
$ adadmin
Options - 
Apply Patch 4536771
Pre-req for patch 4969938
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/4536771
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 4969938
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/4969938
$ adpatch
Apply all the three (3) c, d and g drivers
Issue:
The following Oracle Forms objects did not generate successfully:
gme     forms/US        PMPARTDB.fmx
Resolution:
Type "Yes"  to complete the patch
Recommendation: 
We may not need the forms to be compiled.
Apply Patch 9476923
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/9476923
$ adpatch
Apply all the three (3) c, d and g drivers
Post Patch Step:
Please recompile all the GME PLLs and forms after applying this patch.

Apply Patch 4699061
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/4699061
$ adpatch
Apply all the three (3) c, d and g drivers
There are post patch functional steps to be completed as per the README.txt
Run $GMA_TOP/patch/115/sql/GMAR12VAL.sql as APPS user with the following parameter.
  ALL - For running the validation scripts for all modules.
  GMA - For running the validation scripts for GMA module.
  GMI - For running the validations scripts for GMI module.
  GMD - For running the validations scripts for GMD module.
  GR -  For running the validations scripts for GR module.
  GMF - For running the validations scripts for GMF module.
  Review any errors generated by the validation from the message logging screen.
Apply Patch 6696828
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/6696828
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 8466443
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/8466443
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 8466438
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/8466438
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 10259812
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/10259812
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 14082330
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/14082330
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 8439218
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/8439218
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 6349338
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/6349338
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 4939444
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/4939444
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 6351946
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/6351946
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 4563075
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/4563075
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 3582074
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/3582074
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 9456273
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/9456273
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 8584508
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/8584508
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 5259121
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/5259121
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 12790235
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/12790235
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 4350832
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/4350832
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 5233248
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/5233248
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 18824534
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/18824534
$ adpatch
Apply the u driver
Apply patch 14162315
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/14162315
$ adpatch
Apply the u driver
Interactive Patches - OPM Functional Team
Need to be interactive with the Manufacturing Functional team as this patch has scripts that needs to be executed multiple times.
Apply Patch 4582937
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/4582937
$ adpatch
Apply all the three (3) c, d and g drivers
Apply Patch 8487779
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/8487779
$ adpatch
Apply all the three (3) c, d and g drivers
OPM Functional team to perform steps as per 
 Oracle Process Manufacturing (OPM) Migration Reference Guide Release 11i to Release 12.1 (OPM_Migration_Reference_Guide_Release_11i_to_Release_12_1.pdf)
After applying the patch, inform the OPM team.
OPM team performs data cleaning from the front end (forms) and the team will request to execute the scripts as per the Document (OPM_Migration_Reference_Guide_Release_11i_to_Release_12_1.pdf). 
Upon execution of the script is complete, inform the OPM team.
OPM team performs data cleaning from the front end (forms) and the team will request to execute the scripts as per the Document (OPM_Migration_Reference_Guide_Release_11i_to_Release_12_1.pdf). 
Upon execution of the script is complete, inform the OPM team.
OPM team performs data cleaning from the front end (forms) and the team will request to execute the scripts as per the Document (OPM_Migration_Reference_Guide_Release_11i_to_Release_12_1.pdf). 
Upon execution of the script is complete, inform the OPM team.
OPM team performs data cleaning from the front end (forms) and the team will request to execute the scripts as per the Document (OPM_Migration_Reference_Guide_Release_11i_to_Release_12_1.pdf). 

Init.ora updates

These init.ora parameters are set:
Parameters that are highlighted in BOLD and RED are the parameters that were modified for upgrade.
ebsstr1.__oracle_base='/u01/app/oracle'        #ORACLE_BASE set from environment
*._b_tree_bitmap_plans=FALSE
*._fast_full_scan_enabled=FALSE
*._like_with_bind_as_equality=TRUE
*._optimizer_push_pred_cost_based=TRUE
*._sort_elimination_cost_ratio=5
*._system_trig_enabled=TRUE
*._trace_files_public=TRUE
*.aq_tm_processes=1
*.audit_file_dest='/u01/app/oracle/admin/ebsstr1/admin'
*.compatible='11.2.0.4'  <------------- Normally this value is set to 3 digits of the version for flexibility
*.control_files='+ASMDATA/ebsstr1/controlfile/control01.ctl','+ASMFLASH/ebsstr1/controlfile/control0
2.ctl'
*.cursor_sharing='exact'
*.db_block_checking='false'
*.db_block_checksum='true'
*.db_block_size=8192
*.db_cache_advice='ON'
*.db_cache_size=4096M
*.db_create_file_dest='+ASMDATA'
*.db_domain=''
*.db_files=1500
*.db_name='ebsstr1'
*.db_recovery_file_dest='+ASMFLASH'
*.db_recovery_file_dest_size=64424509440
*.db_writer_processes=8
*.diagnostic_dest='/u01/app/oracle'
*.disk_asynch_io=TRUE
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ebsstr1XDB)'
*.dml_locks=10000
*.filesystemio_options='SETALL'
*.java_pool_size=150M
*.job_queue_processes=30
*.large_pool_size=160M
*.local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST= ebsdbd1.APDBAidec.com)(PORT=1725))'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'
*.log_archive_max_processes=10
*.log_buffer=26214400
*.log_checkpoint_interval=100000
*.log_checkpoint_timeout=1200
*.log_checkpoints_to_alert=TRUE
*.max_dump_file_size='20480'
*.nls_length_semantics=CHAR   <------------- This is set after the upgrade as per Development team's request
*.o7_dictionary_accessibility=false
*.olap_page_pool_size=4194304
*.open_cursors=600
*.optimizer_secure_view_merging=FALSE
*.parallel_force_local=true
*.parallel_max_servers=24
*.parallel_min_servers=0
*.pga_aggregate_target=2G
*.processes=1500
*.recyclebin='off'
*.remote_login_passwordfile='EXCLUSIVE'
*.result_cache_max_size=10747904
*.sec_case_sensitive_logon=false
*.service_names='ebsstr1','ebs_patch','ebsstr1_patch'
*.session_cached_cursors=500
*.session_max_open_files=30
*.sessions=2282
*.sga_target=0
*.shared_pool_reserved_size=200M
*.shared_pool_size=2048M
*.skip_unusable_indexes=TRUE
*.streams_pool_size=64M
*.undo_management='AUTO'
*.undo_retention=43200
*.undo_tablespace='APPS_UNDOTS2'
       *.utl_file_dir='/usr/tmp'     <------------  (Make utl_file_dir on the DB tier and APPLPTMP on the Apps                                                                                                   tier point to the same directory structure (/usr/tmp)
*.workarea_size_policy='auto'
Build Staging Area
apdbaappd05:applstr$ pwd
/patch/erp/SCALE/11ito1220patches/upgrade/stage/LinuxStageR12.2/startCD/Disk1/rapidwiz/bin
apdbaappd05:applstr$ pwd
/patch/erp/SCALE/11ito1220patches/upgrade/stage/LinuxStageR12.2/startCD/Disk1/rapidwiz/bin
apdbaappd05:applstr$ sh buildStage.sh

                     Copyright (c) 2002, 2013 Oracle Corporation
                        Redwood Shores, California, USA
                       Oracle E-Business Suite Rapid Install
                                 Version 12.2.0
Press Enter to continue...
                      Build Stage Menu
   ------------------------------------------------------
   1.     Create new stage area
   2.     Copy patches to existing stage area
   3.     List files in TechPatches directory
   4.     Exit menu
   Enter your choice [4]: 1
            Rapid Install Platform Menu
   ------------------------------------------------------
   1.    Oracle Solaris SPARC (64-bit)
   2.    Linux x86 (64-bit)
   3.    IBM AIX on Power Systems (64-bit)
   4.    HP-UX Itanium
   5.    Exit Menu
   Enter your choice [5]: 2
Running command:
/patch/erp/SCALE/11ito1220patches/upgrade/stage/R12.2-Linux
Specify the directory containing the zipped installation media:
/patch/erp/SCALE/11ito1220patches/upgrade/stage/R12.2-Linux
WARNING: Some of the required zip files have not yet been downloaded.  Do you want to continue, and obtain them later? (Y)/N Y
Returning to Main Menu.
Choose option 1 to rebuild the stage area for this platform.
                      Build Stage Menu
   ------------------------------------------------------
   1.     Create new stage area
   2.     Copy patches to existing stage area
   3.     List files in TechPatches directory
   4.     Exit menu
   Enter your choice [4]: 4
Stage Builder exiting...
apdbaappd05:applstr$
Copy patches to the staging area:
apdbaappd05:applstr$ pwd
/patch/erp/SCALE/11ito1220patches/upgrade/stage/LinuxStageR12.2/startCD/Disk1/rapidwiz/bin
apdbaappd05:applstr$ sh buildStage.sh
                     Copyright (c) 2002, 2013 Oracle Corporation
                        Redwood Shores, California, USA
                       Oracle E-Business Suite Rapid Install
                                 Version 12.2.0
Press Enter to continue...
                      Build Stage Menu
   ------------------------------------------------------
   1.     Create new stage area
   2.     Copy patches to existing stage area
   3.     List files in TechPatches directory
   4.     Exit menu
   Enter your choice [4]: 2
            Rapid Install Platform Menu
   ------------------------------------------------------
   1.    Oracle Solaris SPARC (64-bit)
   2.    Linux x86 (64-bit)
   3.    IBM AIX on Power Systems (64-bit)
   4.    HP-UX Itanium
   5.    Exit Menu
   Enter your choice [5]: 2
Directory /patch/erp/SCALE/11ito1220patches/upgrade/stage/LinuxStageR12.2/TechPatches
Stage Builder will now stage the one-off patches for Linux_x64...
Press Enter to continue...
Copying latest one-off patches to stage area...
Running command:
/patch/erp/SCALE/11ito1220patches/upgrade/stage/LinuxStageR12.2/startCD/Disk1/rapidwiz/bin/../unzip/Linux_x64/unzip -o /patch/erp/SCALE/11ito1220patches/upgrade/stage/LinuxStageR12.2/startCD/Disk1/rapidwiz/bin/../Xpatches/Linux_x64.zip -d /patch/erp/SCALE/11ito1220patches/upgrade/stage/LinuxStageR12.2/startCD/Disk1/rapidwiz/bin/../../../../TechPatches
Press Enter to continue...
Finished copying additional patches.
Press Enter to continue...
                      Build Stage Menu
   ------------------------------------------------------
   1.     Create new stage area
   2.     Copy patches to existing stage area
   3.     List files in TechPatches directory
   4.     Exit menu
   Enter your choice [4]: 4
Stage Builder exiting...
Installation Screenshots
$ cd /patch/erp/SCALE/11ito1220patches/upgrade/stage/LinuxStageR12.2/startCD/Disk1/rapidwiz
apdbaappd05:applstr$ ./RapidWizVersion
Oracle E-Business Suite Rapid Install Wizard
Version 12.2.0.49
(c) Copyright 2000-2011 Oracle Corporation.  All rights reserved.
apdbaappd05:applstr$ ./rapidwiz
Click "Next" to continue
Click "Next" to continue
Click "Next" to continue
Click "Yes" to continue
Click "Next" to continue
Click "OK" to continue
Choose port pools for RUN and PATCH file systems (20 and 30) for Development environment, then change the "Database Port" to 1725 and Click "Next" to continue
Click "Next" to continue
SQL> select fnd_profile.value('GUEST_USER_PWD') from dual;
FND_PROFILE.VALUE('GUEST_USER_PWD')
--------------------------------------------------------------------------------
GUEST
SQL> select fnd_vault.get('FND','GUEST_USER_PWD') from dual;
FND_VAULT.GET('FND','GUEST_USER_PWD')
--------------------------------------------------------------------------------
GUEST/GUEST
SQL> select profile_option_name,profile_option_id,user_profile_option_name from fnd_profile_options_vl where user_profile_option_name like '%Password%';
PROFILE_OPTION_NAME
--------------------------------------------------------------------------------
PROFILE_OPTION_ID
-----------------
USER_PROFILE_OPTION_NAME
--------------------------------------------------------------------------------
SIGNON_PASSWORD_LENGTH
2027
Signon Password Length
SQL> select profile_option_value from fnd_profile_option_values where profile_option_id=2027;
PROFILE_OPTION_VALUE
--------------------------------------------------------------------------------
8
On the 11i environment perform the following step:
Connect in to the Forms based Applications as the SYSADMIN user and change the Password Length profile option to "5". Save the change and try the process again.
Click "Next" to continue
Click "Next" to continue
Enter "welcome1" for Weblogic and the apps password and Click "Next" to continue
The initial password for weblogic is set to welcome1, and can be changed after the upgrade is completed, for installation and upgrade to complete successfully.
Click "Next" to continue
Click "Next" to continue
Click "Next" to continue
Click "Yes" to continue

Upgrade File

   APPL_TOP environment file passes instantiated variables test:
      File = /u11/home/ebsstr1/fs1/EBSapps/appl/ebsstr1_apdbaappd05.env
   ADOVARS environment file passes instantiated variables test:
      File = /u11/home/ebsstr1/fs1/EBSapps/appl/admin/adovars.env
   APPSCONFIG passes instantiated variables test:
      File = /u11/home/ebsstr1/fs1/EBSapps/appl/admin/adconfig.txt
Click "Next" to continue
Click "Finish" to complete the R12.2.0 binaries
 Configuration file written to: /u11/home/ebsstr1/fs1/inst/apps/ebsstr1_apdbaappd05/conf_ebsstr1.txt
 Configuration file written to: /u11/home/ebsstr1/fs2/inst/apps/ebsstr1_apdbaappd05/conf_ebsstr1.txt
Second File System logfile - /u11/home/ebsstr1/fs2/inst/apps/ebsstr1_apdbaappd05/logs/02031557.log
First File System logfile - /u11/home/ebsstr1/fs1/inst/apps/ebsstr1_apdbaappd05/logs/02031557.log
 Other places to look for log files:
$ cd /tmp/MMddhhss/*.log
MM – 2 digit month
dd – 2 digit day
hh – 2 digit hour
ss – 2 digit second
11.2.0.4 DB Patches
Patch 4189542
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/4189542 $ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/4189542 $
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/4189542 $ opatch apply
 (Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/4189542 $
Patch – 4247037 – Has Post installation steps
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/4247037 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/4247037 $
Patch – 12949905
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/12949905 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/12949905 $
Patch – 16989137 – Has Post Install Steps
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/16989137 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/16989137 $
Patch – 17402822
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17402822 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17402822 $
Patch – 18118982
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18118982 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18118982 $
Patch – 17429475
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17429475 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17429475 $
Patch – 17629476 – Has post installation steps
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17629476 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17629476 $
Patch – 17912217
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17912217 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17912217 $
Patch – 17944018 – Has post installation step
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17944018 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17944018 $
Patch – 18419770
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18419770 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18419770 $
Patch – 18614015 has post install steps
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18614015 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18614015 $
Patch – 18665660
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18665660 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18665660 $
Patch – 18685209
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18685209 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/18685209 $
Patch – 19698358
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/19698358 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
Patch – 19393542
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/19393542 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
DB Patches screen contents attached
DB Post install steps document attached
Patch 17537119 – Checks all DB patches applied for R12.2.0
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17537119 $ sh checkDBpatch.sh
 +===============================================================+
 |    Copyright (c) 2005, 2014 Oracle and/or its affiliates.     |
 |                     All rights reserved.                      |
 |               EBS Technology Codelevel Checker                |
 +===============================================================+
Executing Technology Codelevel Checker version: 120.22
Enter ORACLE_HOME value : /u01/app/oracle/product/11.2.0.4/db_2
Is this a RAC environment [y/n] : n
Enter ORACLE_SID value : ebsstr1
Bugfix XML file version: 120.17
Proceeding with the checks...
Getting the database release ...
Setting database release to 11.2.0.4
 DB connectivity successful.
Created the table to store Technology Codelevel Checker results.
STARTED Pre-req Patch Testing : Fri Feb  6 12:55:14 EST 2015
Log file for this session : ./checkDBpatch_3248.log
Got the list of bug fixes to be applied and the ones to be rolled back.
Checking against the given ORACLE_HOME
Opatch is at the required version.
Found patch records in the inventory.
All the required one-offs are present in Oracle Database Home
Stored Technology Codelevel Checker results in the database successfully.
FINISHED Pre-req Patch Testing : Fri Feb  6 12:55:20 EST 2015
=========================================================
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17537119 $
Ensure Gather Schema Statistics job was submitted and completed successfully thru the Front end
Verify the same:
select min(last_analyzed) from dba_tables where num_rows > 0 and last_analyzed is not null;
Also,  We need to disable archive logging and also the nightly daily backup to improve performance
Apply Lessons Learnt from Previous Iterations
Apply Resolution from Sandbox Iteration
The scripts mentioned below are in /patch/erp/SCALE directory
1. Unlock Product based users
We had 4 users (products) that were locked from a list of 375, and they are:
GMA
IBA
OPM
QCO
The above product users where unlocked using the following SQL statements:
2. Initialize the the following sequences:
3. Drop the GMD Temp tables:
4. Steps performed as per OPM Location Issue Action Plan SR 3-9985560061:
Action Plan 
============== 
To sum up,the current solution is the trigger on the mtl_item_locations table will be ignored for the locations which is created by OPM migration program. the detail solution as follows(Please Note,the solution can only apply to the instance which has not upgraded to R12,that means the solution can only apply to the instance which is in PRE-MIGRATION phase and all of action plans below should be performed BEFORE step2.11 in the checklist file): 
i. Backup following plsql/sql script file: 
$INV_TOP/patch/115/sql/INVPOMGB.pls 
$GMF_TOP/patch/115/sql/gmfloctg.sql 
ii. compile the uploaded debug files INVPOMGB0108.pls and gmfloctg0108.sql (in /patch/erp/SCALE)
iii. confirm the debug files have been compiled successfully. 
a) please use following query statement to check the file version of INVPOMGB.pls 
select * from dba_source where name = 'INV_MIGRATE_PROCESS_ORG' and type = 'PACKAGE BODY' and line = 2 
the correct file version of file INVPOMGB.pls should be as follows: 
/* $Header: INVPOMGB.pls 115.0.115100.14 2015/01/08 07:40:22 shalchen noship $ */ 
b) please use following query statement to check the file version of gmfloctg.sql 
select text from dba_source where name = 'GMF_MTL_ITEM_LOCATIONS_BIUR_TG' and type = 'TRIGGER' and text like '%BUG20190441 %' 
you should get following result for the query above. 
/* BUG20190441 Shalchen 01/08/2015 */ 
iv. Try to perform step 2.11 in the checklist to migrate organization, warehouse and location and confirm whether the issue is working.
Apply Localization Patches - After Functional Configs
Actual Cutover time starts here - Users will not have access to 11i Instance
Execute adstpal.sh to stop the services
On the primary Application Server Tier:
Execute
$ biomgrall stop
Change permissions to the unzipped patches under as applmgr user
/patch/erp/SCALE/11ito1220patches/preupgrade/application/localizations
as follows:
$ chmod 777 1* 2* 3* 4* 5* 8* L* B* R*
$ find . -name backup -type d |xargs -i chmod 777 {}
Execute this script to move the ldt files that needs to be converted to UTF8 character set:
Patch 12638293
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/localizations/12638293
$ adpatch options=nogenerateportion
Apply c and d drivers only, as this instance is not planned to be used by functional users.
No issues c and d drivers.
Patch 11iCEBPFB (5623025) (apply c, d and g drivers)
$ cd ../11iCEBPFB
 $ adpatch
C Driver - No issues
D Driver
$ adpatch
G Driver (Need not be applied)
Issue 1:
The following Oracle Forms objects did not generate successfully:
rec     forms/US        RECLINRC.fmx
rec     forms/US        RECRCERC.fmx
An error occurred while generating Oracle Forms files.
Continue as if it were successful [No] :
Resolution 1:
Continue as if it is successful (Yes)
Patch 8629246
$ cd ../8629246
Apply u Driver:
$ adpatch options=nogenerateportion
Issue 1:
FAILED: file BSACPWCR_CCR.ldt on worker  1
Resolution 1:
Above issues are due to DB character set conversion. Hence, we can execute the above commands in advance of applying the patch.
Patch 8645900
$ cd ../8645900
Apply u Driver:
$ adpatch options=nogenerateportion
Resolutions:
Recommendation:
Above issues are due to DB character set conversion. Hence, we can execute the above commands in advance of applying the patch.
Patch 16546342
$ cd ../16546342
Apply u Driver:
$ adpatch options=nogenerateportion
Patch 16780638
$ cd ../16780638
Apply u Driver:
$ adpatch options=nogenerateportion
Patch 17003800
$ cd ../17003800
Apply u Driver
$ adpatch options=nogenerateportion
Patch 17834985
$ cd ../17834985
Apply u Driver
$ adpatch options=nogenerateportion
Patch 16032724
$ cd ../16032724
Apply u Driver 
$ adpatch options=nogenerateportion
Patch 17582878
$ cd ../17582878
Apply u Driver
$ adpatch options=nogenerateportion
Patch 19931118
$ cd ../19931118
Apply u Driver
$ adpatch options=nogenerateportion
Patch 17895809
$ cd ../17895809
Apply u Driver
$ adpatch options=nogenerateportion
Patch 18647065
cd ../18647065
Apply u driver
$ adpatch options=nogenerateportion
Patch 19246388
$ cd ../19246388
Apply u driver
$ adpatch options=nogenerateportion
Patch 19313950
$ cd ../19313950
Apply u driver
$ adpatch options=nogenerateportion
Patch 19825155
$ cd ../19825155
Apply u driver
$ adpatch options=nogenerateportion
Patch 20101285
$ cd ../20101285
Apply u driver
$ adpatch options=nogenerateportion
Patch 20108578
$ cd ../20108578
Apply u driver
$ adpatch options=nogenerateportion
Patch 3477311
$ cd ../3477311
Apply c and d drivers only
$ adpatch
C driver no issues
$ adpatch 
D driver no issues
Patch 4106817
$ cd ../4106817
Apply u driver
$ adpatch options=nogenerateportion
Patch 11iLAPFA
$ cd ../11iLAPFA
Apply c and d drivers only
$ adpatch
C driver no issue
$ adpatch
Issue 1:
ATTENTION: All workers either have failed or are waiting:
           FAILED: file LACOAPLKP001.ldt on worker  1.
Resolution 1:
Recommendation:
Issues listed above are due to DB character set conversion. Hence, we can execute the above commands in advance of applying the patch.
Patch BSCAIINST
$ cd ../BSCAIINST
Apply c and d drivers
$ adpatch
Patch 11iCEBPFA (5615810)
$ cd ../11iCEBPFA
Apply c and d drivers only
$ adpatch
Patch 11iCAIPFB (5616738)
$ cd ../11iCAIPFB
Apply c and d drivers only
C driver had no issues.
$ adpatch
D Driver
Issue 1: 
ATTENTION: All workers either have failed or are waiting:
           FAILED: file RECUPGR.con  on worker  1.
Resolution 1:
Since there are 5 rows which meet the condition 
ALTER TABLE REC_INVOICE_TYPES ADD CONSTRAINT REC_INVOICE_TYPES_C8 CHECK (contab_flag in ('S','N','R'));
Issue 2:
ATTENTION: All workers either have failed or are waiting:
           FAILED: file RECI006.con  on worker  1.
Alter Table rec.rec_invoice_parents_int add constraint rec_invoice_parents_int_fk1 foreign key (interface_invoice_id) references rec.rec_invoices_interface (interface_invoice_id)
ERROR at line 1:
ORA-02270: no matching unique or primary key for this column-list
Resolution 2:
SQL> select OWNER,CONSTRAINT_NAME,CONSTRAINT_TYPE, TABLE_NAME, SEARCH_CONDITION from dba_constraint where TABLE_NAME=upper('rec_invoices_interface');
OWNER
--------------------------------------------------------------------------------
CONSTRAINT_NAME                C TABLE_NAME
------------------------------ - ------------------------------
SEARCH_CONDITION
-------------------------------------------------------------------------------
REC
SYS_C0079386                   C REC_INVOICES_INTERFACE
"INTERFACE_INVOICE_ID" IS NOT NULL
As the constraint exits, skip the job.
Issue 3:
ATTENTION: All workers either have failed or are waiting:
           FAILED: file RECI013.con  on worker  1.
Alter Table rec.rec_returns add (constraint rec_returns_pk primary key( return_id ) USING INDEX TABLESPACE APPS_TS_TX_IDX)
ERROR at line 1:
ORA-02260: table can have only one primary key
Resolution 3:
Since it is already a primary key, we can skip the job.
Issue 4:
ATTENTION: All workers either have failed or are waiting:
           FAILED: file BSWTINST.syn on worker  1.
old   1: CREATE SYNONYM BS_PO_VENDOR_SITES_EXT FOR &&3..BS_PO_VENDOR_SITES_EXT
new   1: CREATE SYNONYM BS_PO_VENDOR_SITES_EXT FOR BS.BS_PO_VENDOR_SITES_EXT
CREATE SYNONYM BS_PO_VENDOR_SITES_EXT FOR BS.BS_PO_VENDOR_SITES_EXT
ERROR at line 1:
ORA-00955: name is already used by an existing object
Resolution 4:
Since the synonym already exits, we can skip the job.
Issue 5:
ATTENTION: All workers either have failed or are waiting:
           FAILED: file RECI051.ind  on worker  1.
CREATE UNIQUE INDEX rec_state_ship_vias_pk ON rec_state_ship_vias(state_id, ship_via_lookup_code) TABLESPACE APPS_TS_TX_IDX
ERROR at line 1:
ORA-00955: name is already used by an existing object
Resolution 5:
Since the unique index exits, skip the job.
Issue 6: 
ATTENTION: All workers either have failed or are waiting:
           FAILED: file RECI115.ind  on worker  1.
CREATE INDEX rec_invoices_r15 ON rec.rec_invoices (iss_withhold_invoice_id) TABLESPACE APPS_TS_TX_IDX ONLINE NOLOGGING
ERROR at line 1:
ORA-01408: such column list already indexed
Resolution 6:
Since the column is already indexed, skip the job.
Issue 7:
ATTENTION: All workers either have failed or are waiting:
           FAILED: file RECLBLKP.ldt on worker  1.
Resolution 7:
Convert the ldt file to UTF8 format
Recommendation:
Above issues are due to DB character set conversion. Hence, we can execute the above commands in advance of applying the patch.
Patch 11iCAIPFB (5616738)
$ cd ../11iCAIPFB
Apply c and d drivers only
$ adpatch
Gather Schema Stats
Login to Oracle Applications as SYSADMIN user and execute the concurrent job "Gather Schema Statistics"
R12.2.0 Upgrade Patches
Pre-Upgrade Changes:
Apply the following patches to R12 TechStack in pre-install mode on R12 binaries in apdbaappd05 server.
Source the environment file as follows:
$ source /u11/home/ebsstr1/fs1/EBSapps/appl/APPSebsstr1_apdbaappd05.env
Copy adgrants.sql from 18040523 to DB server and execute it.
From Primary Application (Admin) server apdbaappd05 
$ cd /patch/erp/SCALE/11ito1220patches/preupgrade/application/18040523/admin
$ scp adgrants.sql mpareek@edd01dbadm01:/tmp
On the Primary Database Server ebsdbd1 
$ cd $ORACLE_HOME/appsutil/admin
$ cp /tmp/adgrants.sql .
$ sqlplus /nolog @adgrants.sql apps
Follow the steps in this table to apply merged patches.
Upgrade Apps Run Rapid Install Use the Rapid Install wizard to lay down the file system and install the new
technology stack for your Release 12.2 Oracle E-Business Suite system. rapidwiz
Upgrade Apps 10117518, 18040523
Apply u_merged.drv /patch/erp/SCALE/PDH/patches/R122_patches/10117518_18040523-dest Apply this AD 12.2 Upgrade Driver using adpatch
Upgrade Apps 18007406 /patch/erp/SCALE/PDH/patches/R122_patches/18007406 adpatch preinstall=y
Upgrade Apps 18792770, 18951016, 18973713,
18995966, 19080116, 19391190
19503850, 19584199, 19601460
19730774, 19765736, 19807467
20018655, 20179510, 20226747
20280791, 20293834, 20366382
20526716
Apply u_merged.drv /patch/erp/SCALE/PDH/patches/R122_patches/pre-install-dest Merge and apply 
adpatch preinstall=y
Upgrade Apps 17268684 /patch/erp/SCALE/PDH/patches/R122_patches/17268684 1. Create <ORACLE_HOME>/appsutil/admin on the Database Tier.
2. Copy the file admin/ADZDDTFIX.sql from Patch#17268684:R12.AD.C to
<ORACLE_HOME>/appsutil/admin on the Database Tier.
3. As SYSTEM user, execute <ORACLE_HOME>/appsutil/admin/ADZDDTFIX.sql
4. Review the spooled file adzddtfix.out. If spooled file - adzddtfix.out has
any data, execute it as SYSDBA.
5. Re-execute script <ORACLE_HOME>/appsutil/admin/ADZDDTFIX.sql to check for any
pending TimeStamp Mismatch issues. $ mkdir /erp_admin/dba/str
$ cp /patch/erp/SCALE/PDH/patches/R122_patches/17268684/admin/ADZDDTFIX.sql /erp_admin/dba/str
$ sqlplus system/xxxxxx @ADZDDTFIX.sql
$ sqlplus system/xxxxx @adzddtfix.out
$ sqlplus system/xxxxxx @ADZDDTFIX.sql
Upgrade DB APPS_TS_TX_DATA - Tablespace checking Ensure that all critical tablespaces including
APPS_TS_TX_DATA have enough space (below the threshold) and
resize the data file as necessary.
Upgrade Apps 10124646 Enter batch size as 10000 & number of workers 36
cd $AU_TOP/patch/115/driver
admrgpch -d . -preinstall -master u10124646.drv (MOS Note 1320300.1)
(u_merged.drv) adpatch options=nocopyportion,nogenerateportion driver=u_merged.drv
Log location: $APPL_TOP/admin/<twotask_BALANCE>/log/<patch_log_name>
Issues
Total of 123510 jobs to be completed |start time - 11:00 pm EST on 17-Feb-2015
Issue 1:
FAILED: file iemsvrp.odf  on worker  1.
iemsvrp.odf fails (worker 9, 10)
ALTER SEQUENCE IEM.IEM_TAG_KEYS_S1 MINVALUE 10000
AD Worker error:
The following ORACLE error:
ORA-04007: MINVALUE cannot be made to exceed the current value
occurred while executing the SQL statement:
ALTER SEQUENCE IEM.IEM_TAG_KEYS_S1 MINVALUE 10000
AD Worker error:
Unable to compare or correct sequences
        because of the error above
Resolution 1:
To resolve the issue
SQL> select * from dba_sequences where sequence_name='IEM_TAG_KEYS_S1';
SEQUENCE_OWNER                 SEQUENCE_NAME                   MIN_VALUE   MAX_VALUE INCREMENT_BY C O CACHE_SIZE LAST_NUMBER
------------------------------ ------------------------------ ---------- ----------------------------------------------------------------------------
IEM                            IEM_TAG_KEYS_S1             10000          2000000000            1 N N         20       11028
Skip the job
Issue 2:
FAILED: file invite1.odf  on worker  1
during upgrade patch - ORA-04088: error during execution of trigger 'APPS.CAIBR_INV_CROSS_REFERENCES_T1
Resolution 2:
SQL> select trigger_name,status from dba_triggers where trigger_name = 'CAIBR_INV_CROSS_REFERENCES_T1';
TRIGGER_NAME                   STATUS
------------------------------ --------
CAIBR_INV_CROSS_REFERENCES_T1  ENABLED
SQL> alter trigger CAIBR_INV_CROSS_REFERENCES_T1 disable;
Trigger altered.
SQL> select trigger_name,status from dba_triggers where trigger_name = 'CAIBR_INV_CROSS_REFERENCES_T1';
TRIGGER_NAME                   STATUS
------------------------------ --------
CAIBR_INV_CROSS_REFERENCES_T1  DISABLED
Restart the failed worker
Issue 3:
FAILED: file pergpi.odf on worker 4
pergpi.odf script fails with APPS.HR_CERIDIAN_500_ALT_RATES_V object already exists
Resolution 3:
Copy the code from the worker log file to a sql script and change "CREATE" to "CREATE OR REPLACE" and also drop the synonym owned by APPS, then execute it to create the view successfully and skip the failed job
Issue 4:
Below workers fail: These jobs fails twice, Both times skip these jobs after applying the fix in resolution section
FND_IREP_CLASS_PARENT_ASSIGNS.xdf
FND_IREP_USES_TABLES.xdf
invite1.odf
FND_IREP_USES_MAPS.xdf
Resolution 4:
You would get an error ORA-00955: name is already used by an existing object  while running below scripts. Ignore these errors.
adjava -ms128m -mx256m -nojit oracle.apps.fnd.odf2.FndXdfCmp apps appss2015 apps appss2015 THIN "edd01dbadm01:1731:ebsstr1" table $XLA_TOP/patch/115/xdf/xla_tab_errors_gt.xdf $FND_TOP/patch/115/xdf/xsl
adjava -ms128m -mx256m -nojit oracle.apps.fnd.odf2.FndXdfCmp apps appss2015 apps appss2015 THIN "edd01dbadm01:1731:ebsstr1" table $FND_TOP/patch/115/xdf/FND_IREP_USES_MAPS.xdf $FND_TOP/patch/115/xdf/xsl
adjava -ms128m -mx256m -nojit oracle.apps.fnd.odf2.FndXdfCmp apps appss2015 apps appss2015 THIN "edd01dbadm01:1731:ebsstr1" table $FND_TOP/patch/115/xdf/FND_IREP_USES_TABLES.xdf $FND_TOP/patch/115/xdf/xsl
adjava -ms128m -mx256m -nojit oracle.apps.fnd.odf2.FndXdfCmp apps appss2015 apps appss2015 THIN "edd01dbadm01:1731:ebsstr1" table $FND_TOP/patch/115/xdf/FND_IREP_CLASS_PARENT_ASSIGNS.xdf $FND_TOP/patch/115/xdf/xsl
Check to make sure below objects created on the day of patch application.
SQL> select created, last_ddl_time from dba_objects where object_name='XLA_TAB_ERRORS_GT' and owner='XLA';
CREATED         LAST_DDL_TIME
--------------- ---------------
22-APR-15       22-APR-15
SQL> select created, last_ddl_time from dba_objects where object_name='FND_IREP_CLASS_PARENT_ASSIGNS' and owner='APPLSYS';
CREATED         LAST_DDL_TIME
--------------- ---------------
22-APR-15       22-APR-15
SQL> select created, last_ddl_time from dba_objects where object_name='FND_IREP_USES_TABLES' and owner='APPLSYS';
CREATED         LAST_DDL_TIME
--------------- ---------------
22-APR-15       22-APR-15
SQL> select created, last_ddl_time from dba_objects where object_name='FND_IREP_USES_MAPS' and owner='APPLSYS';
CREATED         LAST_DDL_TIME
--------------- ---------------
22-APR-15       22-APR-15
Skip the jobs
Issue 5: 
cnsyginb.pls runs for a long time (little over an hour) - need to investigate
Resolution 5:
Upon investigation, it was found that there was a /u11/home/ebsstr1/fs1/EBSapps/appl/admin/ebsstr1/out/p001ncpls.sql locking / preventing the completion, hence killed both the sessions in database
Issue 6: 
igiefupb.pls was in a stale state of "Assigned" using adctrl option 6, fixed the issue and the job completed
Observation: 
adobjcmp.sql runs for a long time as it compiles all the invalids, we can speed up the process by executing utlrp.sql on the DB server to reduce the invalid object compilation time
Issue 7: 
FAILED: file afgstusr.sql on worker 1
ERROR: The "GUEST_USER_PWD" in vault is not set correctly, the current value is "GUEST/GUEST" and failed FND user validation.
Resolution 7:
Wait Time - 21 hours
To fix the issue and restart the failed worker.
We changed the GUEST_USER_PWD to GUEST and the SIGNON_PASSWORD_LENGTH to 5 from 8
SQL> select fnd_profile.value('GUEST_USER_PWD') from dual; 
FND_PROFILE.VALUE('GUEST_USER_PWD') 
-------------------------------------------------------------------------------- 
GUEST 
SQL> select fnd_vault.get('FND','GUEST_USER_PWD') from dual; 
FND_VAULT.GET('FND','GUEST_USER_PWD') 
-------------------------------------------------------------------------------- 
GUEST/GUEST 
SQL> select profile_option_name,profile_option_id,user_profile_option_name from fnd_profile_options_vl where user_profile_option_name like '%Password%'; 
PROFILE_OPTION_NAME 
-------------------------------------------------------------------------------- 
PROFILE_OPTION_ID 
----------------- 
USER_PROFILE_OPTION_NAME 
-------------------------------------------------------------------------------- 
SIGNON_PASSWORD_LENGTH 
2027 
Signon Password Length 
SQL> select profile_option_value from fnd_profile_option_values where profile_option_id=2027; 
PROFILE_OPTION_VALUE 
-------------------------------------------------------------------------------- 
On the 11i environment perform the following step:
Connect in to the Forms based Applications as the SYSADMIN user and change the Password Length profile option to "5". Save the change and try the process again.
Issue 8:
A few jobs failed due to TEMP tablespace being full
Resolution 8: 
Added another 3 x 30 G temp datafile to TEMP tablespace and restarted the failed jobs.
Issue 9:
FAILED: file jtfassrp.sql on worker  1 with ORA-01403: no data found:
Resolution 8:
Execute the below 2 sql scripts in any order and retry the worker
Issue 10:  
glrbaup2.sql fails with trigger 'APPS.GL_JE_BATCHES_LA_AU' is invalid and failed
Resolution 10: 
Disable the trigger as suggested in SR-3-10019000031 
alter trigger GL_JE_BATCHES_LA_AU disable;
Issue 11:
appdstln.sql failed on multiple workers.
Resolution 11: 
Wait Time - 12 hours
Please follow the steps only when the jobs fail. Performing these steps earlier would not give any data to be updated
This has to be executed in the R12 instance where upgrade is in progress. 
1. To select the checks going to be upgraded: 
CREATE TABLE checks_tobe_upg AS 
SELECT DISTINCT c.*, asp.set_of_books_id ledger_id 
FROM ap_checks_all c , 
xla_upgrade_dates upg_date, 
AP_System_Parameters_All ASP 
WHERE c.Org_ID = ASP.Org_ID 
AND ASP.Set_Of_Books_ID = upg_date.Ledger_ID 
AND TRUNC(c.Check_Date) BETWEEN upg_date.start_date AND upg_date.end_date; 
2. To select the upgrading checks having no distributions upgraded: 
CREATE TABLE checks_no_aid AS 
SELECT aip.* 
FROM ap_invoice_payments_all aip 
WHERE aip.check_id IN 
(SELECT bk.check_id 
FROM checks_tobe_upg bk) 
AND NOT EXISTS 
(SELECT 1 
FROM ap_invoice_distributions_all aid 
WHERE aid.invoice_id = aip.invoice_id 
); 
3. To select the upgrading checks having no invoices upgraded: 
CREATE TABLE checks_no_ai AS 
SELECT aip.* 
FROM ap_invoice_payments_all aip 
WHERE aip.check_id IN 
(SELECT bk.check_id 
FROM checks_tobe_upg bk) 
AND NOT EXISTS 
(SELECT 1 
FROM ap_invoices_all ai 
WHERE ai.invoice_id = aip.invoice_id 
); 
4. Please Provide the result of the following queries in Excel with proper header: 
a) Select * from checks_no_aid; 
b) Select * from checks_no_ai; 
(i)update ap_checks_all ac 
set ac.check_date = '01-JAN-1900' 
where ac.check_id in 
(select a.check_id from checks_no_aid a); 
commit; 
(ii)And then re-run the APPDSTLN.SQL. 
(iii)Re-update the check_date after the upgrade. 
Restart the upgrade
Issue 12: 
Version of statistics table "APPLSYS"."FND_STATTAB" is too old
sqlplus -s APPS/***** @/u11/home/br11/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/adsqlwrapper.sql '/u11/home/br11/fs1/EBSapps/appl/cz/12.0.0/patch/115/sql/czhist.sql &un_cz' 
Connected.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
BEGIN FND_STATS.GATHER_COLUMN_STATS('CZ','CZ_DEVL_PROJECTS','DELETED_FLAG'); END;
ERROR at line 1:
ORA-20002: Version of statistics table "APPLSYS"."FND_STATTAB" is too old.
Please try upgrading it with dbms_stats.upgrade_stat_table
ORA-06512: at "APPS.FND_STATS", line 667
ORA-06512: at "APPS.FND_STATS", line 3236
ORA-06512: at line 1
Resolution  12:
Connect as SYSDBA
 SQL> create table applsys.FND_STATTAB_12202014 as select * from applsys.FND_STATTAB;
Table created.
SQL> EXECUTE DBMS_STATS.UPGRADE_STAT_TABLE('APPLSYS','FND_STATTAB');
PL/SQL procedure successfully completed.

DB Init. ora Parameter changes

Make utl_file_dir on the DB tier and APPLPTMP on the Apps tier point to the same directory structure (/usr/tmp)
This step can be performed before DB is handed-off for upgrade as part of the init.ora changes performed previously in this document
[ebsstr1@ebsdbd1 W]$ cp initebsstr1.ora.modified-02192015 initebsstr1.ora
[ebsstr1@ebsdbd1 W]$ pwd
/u01/app/oracle/product/11.2.0.4/db_2/dbs
[ebsstr1@ebsdbd1 W]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Feb 20 22:38:56 2015
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup pfile='/u01/app/oracle/product/11.2.0.4/db_2/dbs/initebsstr1.ora';
ORACLE instance started.
Total System Global Area 6881644544 bytes
Fixed Size                  2266184 bytes
Variable Size            2550139832 bytes
Database Buffers         4294967296 bytes
Redo Buffers               34271232 bytes
Database mounted.
Database opened.
SQL>
SQL> !more initebsstr1.ora-asmspfile
SPFILE='+ASMDATA/EBSSTR1/ebsstr1spfile.ora'
SQL> create spfile='+ASMDATA/EBSSTR1/ebsstr1spfile.ora' from pfile;
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[ebsstr1@ebsdbd1 W]$ cp initebsstr1.ora-asmspfile initebsstr1.ora
[ebsstr1@ebsdbd1 W]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Feb 20 22:44:02 2015
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 6881644544 bytes
Fixed Size                  2266184 bytes
Variable Size            2550139832 bytes
Database Buffers         4294967296 bytes
Redo Buffers               34271232 bytes
Database mounted.
Database opened.
SQL> show parameter pfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +ASMDATA/ebsstr1/ebsstr1spfile
                                                .ora
SQL> show parameter utl
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
create_stored_outlines               string
utl_file_dir                         string      /usr/tmp
SQL>exit
Execute adconfig.sh on the DB tier:
$ cd /u01/app/oracle/product/11.2.0.4/db_2/appsutil/bin
Purge Old Apps tier information
Login as apps user
$ sqlplus apps/apps
SQL> exec fnd_conc_clone.setup_clean
On the DB tier node:
Install jre under $ORACLE_HOME/appsutil
===========================
cd /bio/ebs/str/db/11.2.0.4/appsutil
cat /tmp/jre-7u11-linux-x64.tar.gz | gzip -d | tar xf - &
mv jre1.7.0_11 jre
Create Context file
============
orastr@apdbadm01:/bio/ebs/str/db/11.2.0.4/appsutil/bin $ adbldxml.pl appsuser=apps appspass=appss2015
Starting context file generation for db tier..
Using JVM from /bio/ebs/str/db/11.2.0.4/appsutil/jre/bin/java to execute java programs..
The log file for this adbldxml session is located at:
/bio/ebs/str/db/11.2.0.4/appsutil/log/adbldxml_04231351.log
Enter Database Service Name: ebsstr1
Enter the value for Display Variable: apdbadm01:0.0
Context File  /bio/ebs/str/db/11.2.0.4/appsutil/ebsstr1_apdbadm01.xml
 already exists.
Overwriting Context File may cause loss of existing settings, hence
 backing it up as: /bio/ebs/str/db/11.2.0.4/appsutil/ebsstr1_apdbadm01.xml.bak
The context file has been created at:
/bio/ebs/str/db/11.2.0.4/appsutil/ebsstr1_apdbadm01.xml
vi /bio/ebs/str/db/11.2.0.4/appsutil/ebsstr1_apdbadm01.xml
update db port from 1521 to 1731 & save the file
Run Auto Config
===========
orastr@apdbadm01:/bio/ebs/str/db/11.2.0.4/appsutil/bin $ perl adconfig.pl
Enter the full file path to the Context file: /bio/ebs/str/db/11.2.0.4/appsutil/ebsstr1_apdbadm01.xml
Enter the APPS user password:
The log file for this session is located at: /bio/ebs/str/db/11.2.0.4/appsutil/log/ebsstr1_apdbadm01/04231358/adconfig.log
AutoConfig is configuring the Database environment...
AutoConfig will consider the custom templates if present.
        Using ORACLE_HOME location : /bio/ebs/str/db/11.2.0.4
        Classpath                   : :/bio/ebs/str/db/11.2.0.4/jdbc/lib/ojdbc6.jar:/bio/ebs/str/db/11.2.0.4/appsutil/java/xmlparserv2.jar:/bio/ebs/str/db/11.2.0.4/appsutil/java:/bio/ebs/str/db/11.2.0.4/jlib/netcfg.jar:/bio/ebs/str/db/11.2.0.4/jlib/ldapjclnt11.jar
        Using Context file          : /bio/ebs/str/db/11.2.0.4/appsutil/ebsstr1_apdbadm01.xml
Context Value Management will now update the Context file
        Updating Context file...COMPLETED
        Attempting upload of Context file and templates to database...COMPLETED
Updating rdbms version in Context file to db112
Updating rdbms type in Context file to 64 bits
Configuring templates from ORACLE_HOME ...
AutoConfig completed successfully.
orastr@apdbadm01:/bio/ebs/str/db/11.2.0.4/appsutil/bin $
Log Location: $ORACLE_HOME/appsutil/log/<CONTEXT_NAME>/mmddhhss/adconfig.log
Execute Rapidwiz on the Apps Tier
 /patch/erp/SCALE/11ito1220patches/upgrade/stage/LinuxStageR12.2/startCD/Disk1/rapidwiz

Click on "Next" to continue
Click on "Next" to continue
Click on "Next" to continue
Click on "Next" to continue
Enter Apps password as appss2015, Enter GUEST password as GUEST,  Enter Weblogic password as welcome1
Click on "Next" to continue
Click on "Next" to continue

Click on "Next" to continue
Click on "Yes" to continue
Click on "Next" to continue
Click on "Finish" to complete.
$ cd /tmp/mmddhhss/mmddhhss.log
There are two (2) log files created in the above log, that needs to be reviewed throughly. In-turn, inside these logs we can log files for WLS and Apps installation / Configuration
Post R12.2.0 Techstack Patches
Apply R12.2.4 Pre-Upgrade TechStack Patches
ORACLE_HOME=10.1.2.3
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
$ cd /patch/erp/SCALE/1220to1224patches/preupgrade/Tools_techstack/10.1.2.3-Patches-Linux
Patch 18186693
$ cd 18186693
$ opatch apply
Patch 18620223
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
$ cd ../18620223
$ opatch apply
Patch 19434967
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
$ cd ../19434967
$ opatch apply
ORACLE_HOME=FMW_Webtier
$ cd /patch/erp/SCALE/1220to1224patches/preupgrade/IAS_techstack/FMW-Webtier-11.1.1.6
$ export ORACLE_HOME=/u11/home/ebsstr1/fs1/FMW_Home/webtier
$ export PATH=$ORACLE_HOME/OPatch:$PATH
$ which opatch
/u11/home/ebsstr1/fs1/FMW_Home/webtier/OPatch/opatch
Patch 13055259
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
$ cd 13055259
$ opatch apply
Patch 17555224
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
$ cd ../17555224
$ opatch apply
Patch 17639414
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
$ cd ../17639414
$ opatch apply -jre $ORACLE_HOME/jdk/jre
Patch 19945419
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
$ cd ../19945419
$ opatch apply -jre $ORACLE_HOME/jdk/jre
ORACLE_HOME=FMW_ORACLE_COMMON
$ cd /patch/erp/SCALE/1220to1224patches/preupgrade/IAS_techstack/FMW-Oracle-Common-11.1.1.6
$ export ORACLE_HOME=/u11/home/ebsstr1/fs1/FMW_Home/oracle_common
$ export PATH=$ORACLE_HOME/OPatch:$PATH
$ which opatch
/u11/home/ebsstr1/fs1/FMW_Home/oracle_common/OPatch/opatch
Patch 13490778
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
$ cd 13490778
$ opatch apply
Patch 18989444
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
$ cd ../18989444
$ opatch apply
Patch 19462638 
$ cd ../19462638
$ opatch apply
Log file location: $ORACLE_HOME/.patch_storage/<patch_number>/Apply_<patch_number>_MM-dd-yyyy_hh-mm-ss.log
Where MM – 2 digit month
dd – 2 digit day
yyyy – 4 digit year
hh – 2 digit hour
  mm – 2 digit minute
ss – 2 digit second
WebLogic Server
$ cd /patch/erp/SCALE/1220to1224patches/preupgrade/IAS_techstack/WLS
Patch 17893334
$ cd $FMW_HOME/utils/bsu
$ mkdir cache_dir
$ cd cache_dir
$ unzip /patch/erp/SCALE/1220to1224patches/preupgrade/IAS_techstack/WLS/p17893334_1036_Generic.zip
$ export WL_HOME=$FMW_HOME/wlserver_10.3
$ cd  ../
$ bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=7FC9 -prod_dir=$WL_HOME
Output of the patch will be listed on the putty session from where the patch is being applied, please check to see that there are no errors
Patch 19600486
$ cd /u11/home/ebsstr1/fs1/FMW_Home/utils/bsu
$ cd cache_dir/
$ unzip /patch/erp/SCALE/1220to1224patches/preupgrade/IAS_techstack/WLS/p19600486_1036_Generic.zip
$ export WL_HOME=$FMW_HOME/wlserver_10.3
$cd ../
$ bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=Y5AP  -prod_dir=$WL_HOME
Output of the patch will be listed on the putty session from where the patch is being applied, please check to see that there are no errors
Additional DB Patches
Execute checkDBpatch.sh by unzipping the patch 17537119 (Download this patch each time, before executing the patch, as this patch is updated by Oracle on a weekly basis).
As per the output of checkDBpatch.sh the following list of patches are to be applied:
14046443
14255128
16299727
16359751
17250794
17401353
18260550
18282562
18331812
18331850
18440047
18689530
19291380
19472320
19487147
19896336
17875948
19731665 - This patch is not available for download for now, updated the SR 3-10319306751
19730032
$ cd /ora_nfs/patches/11.2.0.4-patches
$ cd patches/14046443 
$ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
patches/17250794 $ opatch apply (Has post patch steps)
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
patches/18260550 $  opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
/patches/18689530 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
patches/19291380 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
patches/19472320 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
patches/19896336 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
DB Additional Patches for Conflicts
$ cd /ora_nfs/patches/11.2.0.4-patches
patches/18604144 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
OPatch succeeded.
patches/20445490 $ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
OPatch succeeded.
 Code Checker output
oracle@ebsdbd1:/u01/app/oracle/product/11.2.0.4/db_2/patches/17537119 $ sh checkDBpatch.sh
 +===============================================================+
 |    Copyright (c) 2005, 2014 Oracle and/or its affiliates.     |
 |                     All rights reserved.                      |
 |               EBS Technology Codelevel Checker                |
 +==============================================================
Executing Technology Codelevel Checker version: 120.22
Enter ORACLE_HOME value : /u01/app/oracle/product/11.2.0.4/db_2
Is this a RAC environment [y/n] : n
Enter ORACLE_SID value : ebsstr1
Bugfix XML file version: 120.17
WARNING:  Bugfix XML file ( txk_R1220_DB_base_bugs.xml ) in current directory is more than 30 days old.
  Please check if a newer version is available in patch 17537119.
Proceeding with the checks...
Getting the database release ...
Setting database release to 11.2.0.4
 DB connectivity successful.
Table to store Technology Codelevel Checker results exists in the database.
STARTED Pre-req Patch Testing : Mon Feb 23 18:47:55 EST 2015
Log file for this session : ./checkDBpatch_20443.log
Got the list of bug fixes to be applied and the ones to be rolled back.
Checking against the given ORACLE_HOME
Opatch is at the required version.
Found patch records in the inventory.
All the required one-offs are present in Oracle Database Home
Stored Technology Codelevel Checker results in the database successfully.
FINISHED Pre-req Patch Testing : Mon Feb 23 18:47:59 EST 2015
Code Checker Logfile
Apply patch 20667380
$ opatch apply
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/db_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
 OPatch succeeded.
 Pre R12.2.4 Upgrade
Steps to upgrade Oracle Applications to R12.2.4
$ cd /patch/erp/SCALE/1220to1224patches/upgrade/application/R12.2-Patches
Source the environment file as follows:
$ . /u11/home/ebsstr1/fs1/EBSapps/appl/APPSebsstr1_apdbaappd05.env
Apply Patch 18824534
$ cd 18824534 
Apply the u driver
$ adpatch 
Patch Localtion: $APPL_TOP/admin/<TWO_TASK>/log
Execute the scripts provided by the patch, please follow the MOS Note 1531121.1 
Execute the following SQL Scripts: 
$AD_TOP/sql/ADZDPSUM.sql, as system user
$AD_TOP/sql/ADZDDBCC.sql as apps user 
$AD_TOP/sql/ADZDPMAN.sql as system user
$AD_TOP/sql/ADZDPAUT.sql as system user
Review the output of the script ADZDDBCC.sql and resolve the issues.
Changes before EBR patch in the Database to be performed by DB team
Apply Patch 13543062 
You would get a message that the patch is already applied. Ignore it and continue to apply patch. Enter batch size as 10000 and number of workers 36 for this patch
Ensure that BIO_ON_LOGON trigger is dropped before applying this patch
$ cd ../13543062 
Apply the u driver
$ adpatch options=hotpatch
Patch Localtion: $APPL_TOP/admin/<TWO_TASK>/log
If the patch fails again for types issues run below script again and check the exceptions, drop types, create synonyms and restart the failed workers
$AD_TOP/sql/ADZDDBCC.sql as apps user 
Useful scripts to check the status of the patch progress
sqlplus apps/appss2015 @$AD_TOP/sql/ADZDSHOWDDLS.sql
sqlplus apps/appss2015 @$AD_TOP/sql/ADZDSHOWLOG.sql
Output of ADZDSHOWDDLS.sql is displaced on the telnet session and also written to a ADZDSHOWDDLS.lst file in the present working directory
Output of this ADZDSHOWLOG.sql will not be listed on the telnet session, but creates a ADZDSHOWLOG.log file in the present working firectory
Post Patch step - 4247037
Perform the post patch step for the DB patch 4247037 on the DB server
$ORACLE_HOME/md/admin/catmgdidcode.sql
Maintain Snapshot 
On the Apps server
Using adadmin tool execute / maintain snapshot for Oracle Applications R12.2
Start Admin Server
On the Apps Tier 
Source the environment file as follows:
$ source /u11/home/ebsstr1/fs1/EBSapps/appl/APPSebsstr1_apdbaappd05.env
$ cd $ADMIN_SCRIPTS_HOME
$ ./adadminsrvctl.sh start 
Apply AD and TXK Delta 6 Patches
Execute adgrants.sql on the DB tier from ad delta 6 patch 19197270
$ cd $ORACLE_HOME/appsutil/admin
$ sqlplus / as sysdba @adgrants.sql apps
Apply patch 19197270
de $PATCH_TOP
$ unzip /patch/erp/SCALE/PDH/patches/R122_patches/p19197270_R12.AD.C_R12_LINUX.zip
adop phase=apply patches=19197270 hotpatch=yes
Log Location: $ADOP_LOG_HOME/<adop_session_id>/apply_yyyyMMdd_mmhhss.log
Apply patch 19330775
$ unzip /patch/erp/SCALE/PDH/patches/R122_patches/p19330775_R12.TXK.C_R12_GENERIC.zip
adop phase=apply patches=19330775 hotpatch=yes
Log Location: $ADOP_LOG_HOME/<adop_session_id>/apply_yyyyMMdd_mmhhss.log
Compile Invalid objects using utlrp.sql. Number of invalid objects should be 27000
Take a backup of the database & application binaries
R12.2.4 Upgrade
Source the environment file
$ source /u11/home/ebsstr1/EBSapps.env run
Stop the Admin server and Node Manager
$ cd $ADMIN_SCRIPTS_HOME
$ adadminsrvctl.sh stop
$ adnodemgrctl.sh stop
Refer to the scripts in /patch/erp/SCALE
Apply patch 17919161
$ adop phase=apply apply_mode=downtime patches=17919161 workers=24
Log Location: $ADOP_LOG_HOME/<adop_session_id>/apply_yyyyMMdd_mmhhss.log
There are 23683 jobs to complete.
Issue 1:
adop fails on afcmgr.odf
Resolution 1:
Do the below steps
Issue 2: 
Failed to execute SQL statement : 
select ad_zd_adop.is_icm_alive() from dual;
Resolution 2:
As per MOS Note 1926427.1,
SQL> @$FND_TOP/patch/115/sql/AFCPDIGB.pls
and restart adop
Issue 3: 
POS_SUPPLIER_SEARCH_INDEX.sql  will fail (as per Sandbox iteration)
Resolution 3: 
Edit the sql script and enter "exit" in the first line and after patch completes edit the sql script, remove "exit" and execute the script as apps user.
Post R12.2.4 Steps
Start Application services
$ cd $ADMIN_SCRIPTS_HOME
$ adstrtal.sh 
$ adop phase=cleanup
Log Location: $ADOP_LOG_HOME/<adop_session_id>/cleanup_yyyyMMdd_mmhhss.log
$ adop phase=fs_clone
Log Location: $ADOP_LOG_HOME/<adop_session_id>/fs_clone_yyyyMMdd_mmhhss.log
Post R12.2.4 Patches
Source the environment file
$ source /u11/home/ebsstr1/EBSapps.env run
Apply the following patches with a following work around commands mentioned below: (If fs_clone completes normally remove "hotpatch=yes"
R12.2.4 On-line help patches
Apply 17919162, 19290141
adop phase=apply patches=17919162,19290141 hotpatch=yes merge=yes workers=32
Log Location: $ADOP_LOG_HOME/<adop_session_id>/apply_yyyyMMdd_mmhhss.log
Apply patches 19767816, 19494816, 19807163, 19858552, 19891697, 18345006, 19487679, 20231593
adop phase=apply patches=19767816,19494816,19807163,19858552,19891697,18345006,19487679,20231593 hotpatch=yes
Log Location: $ADOP_LOG_HOME/<adop_session_id>/apply_yyyyMMdd_mmhhss.log
Apply patches 12940099, 13996808, 14227472, 17006749, 18762502, 18836250, 19326738, 19641340, 18399924, 17457141, 19003733
$ adop phase=apply patches=12940099,13996808,14227472,17006749,18762502,18836250,18198205,19326738,19641340,18399924,17457141,19003733 hotpatch=yes
Log Location: $ADOP_LOG_HOME/<adop_session_id>/apply_yyyyMMdd_mmhhss.log
Apply patches 20344709, 19768920, 20569362, 20300514, 19245084, 19549533, 19379838, 19418641, 19768920, 20784036, 20087557 and SLA HOT PATCH
$ adop phase=apply patches=20344709,19768920,20569362,20300514,19245084,19379838,19549533,19418641,19768920,20784036,20087557 hotpatch=yes
and SLA Hot Patch
1. Run adop with phase = apply hotpatch = yes.
2. Specify $XLA_TOP/patch/115/driver/xla5584908.drv when prompted for the unified driver.
Log Location: $ADOP_LOG_HOME/<adop_session_id>/apply_yyyyMMdd_mmhhss.log
Complete the patching cycle by executing the following commands:
adop phase=finalize
Log Location: $ADOP_LOG_HOME/<adop_session_id>/finalize_yyyyMMdd_mmhhss.log
adop phase=cutover
Log Location: $ADOP_LOG_HOME/<adop_session_id>/cutover_yyyyMMdd_mmhhss.log
adop phase=cleanup
Log Location: $ADOP_LOG_HOME/<adop_session_id>/cleanup_yyyyMMdd_mmhhss.log
adop phase=fs_clone
Log Location: $ADOP_LOG_HOME/<adop_session_id>/fs_clone_yyyyMMdd_mmhhss.log

New Products Enabled

New Product / Localization Licensing
Click on "Continue" to proceed further
Select the products and click "Next" and you will the following screen:
Click on "Submit" to proceed
Click "OK" to continue
Choose "Country-specific Functionalities"
Select the Countries and click "Next" to proceed
Click "Submit" to continue
Click "OK" to continue
The list of Products licensed:
Additional Product enablement and assigning privileges to responsibility.
Custom Tops
Create Custom Tops
There are 26 custom tops that needs to be created, with the DB objects owned by the BIO user and files on the file system in the corresponding / respective custom top directory structure
As per the MOS Note ID's mentioned above, in R12.2 custom tops are added by splicing them using adsplice tool. Hence, we need create three (3) files for each custom top added, with the file names similar to bio_xxprod.txt, bio_xxterr.txt and newprods-bio_xx.txt 
Unzip the file attached to this document to $APPL_TOP/admin
Execute adsplice individually for all the 26 custom tops starting with BIO first
$ cd $APPL_TOP/admin
$ adsplice
at the prompt for newprod.txt file enter the newprod-bio_xxx.txt
Do not generate environment file, as this can be done at the end of all the 26 custom tops.
The log files for custom top creation is attached below.
Since Product name and the base path are different than in 11i, this needs to be fixed by updating fnd_installation table by executing the following sql statements:
Example:
In 11i the product name is BIOAP and the base path is BIO_AP_TOP. In R12.2.x, the product name should be BIO_AP, as APDBA does not intend to change base path (BIO_AP_TOP)
Fix the above custom top product code / application short name in fnd_application table:
Copy Files
Copy custom top files from old 11i environment to new R12.2.4 environment
Login to erpwfdt1 server
Login to apdbaappd05 server
Create softlinks
Copy concurrent request logs and out files from 11i to R12.2.4
Log in to erpccdt1 or erpccdt2 and be applstr user
cd $APPLCSF
zip -9r /patch/erp/SCALE/EBSSTR1-CCR.zip log
zip -9r /patch/erp/SCALE/EBSSTR1-CCO.zip out
Log in to apdbaappd05 and be the applstr user
cd $APPLCSF
unzip -o /patch/erp/SCALE/EBSSTR1-CCR.zip
unzip -o /patch/erp/SCALE/EBSSTR1-CCO.zip
Update the fnd_concurrent_request table for PATH for the files brought over using the script:
select count(*) from  fnd_concurrent_requests where LOGFILE_NODE_NAME = 'ERPCCDT1';
select count(*) from  fnd_concurrent_requests where LOGFILE_NODE_NAME = 'ERPCCDT2';
select count(*) from  fnd_concurrent_requests where OUTFILE_NODE_NAME = 'ERPCCDT1';
select count(*) from  fnd_concurrent_requests where OUTFILE_NODE_NAME = 'ERPCCDT2';
R12.2 - APPLCSF = /u11/home/ebsstr1/fs_ne/inst/ebsstr1_apdbaappd05/logs/appl/conc/
R11i  - APPLCSF = /u07/home/ebsstr1/ebsstr1comn/admin/ebsstr1/log/
create table FND_CONCURRENT_REQUESTS_0311 as select * from FND_CONCURRENT_REQUESTS;
update FND_CONCURRENT_REQUESTS set LOGFILE_NODE_NAME='APDBAAPPD05' where LOGFILE_NODE_NAME='ERPCCDT1';
update FND_CONCURRENT_REQUESTS set LOGFILE_NODE_NAME='APDBAAPPD05' where LOGFILE_NODE_NAME='ERPCCDT2';
update FND_CONCURRENT_REQUESTS set OUTFILE_NODE_NAME='APDBAAPPD05' where OUTFILE_NODE_NAME='ERPCCDT1';
update FND_CONCURRENT_REQUESTS set OUTFILE_NODE_NAME='APDBAAPPD05' where OUTFILE_NODE_NAME='ERPCCDT2';

update apps.FND_CONCURRENT_REQUESTS
  set logfile_name = replace(LOGFILE_NAME, '/u07/home/ebsstr1/ebsstr1comn/admin/ebsstr1/log/','/u11/home/ebsstr1/fs_ne/inst/ebsstr1_apdbaappd05/logs/appl/conc/') where LOGFILE_NODE_NAME='APDBAAPPD05';

update apps.FND_CONCURRENT_REQUESTS
  set outfile_name = replace(OUTFILE_NAME, '/u07/home/ebsstr1/ebsstr1comn/admin/ebsstr1/log/','/u11/home/ebsstr1/fs_ne/inst/ebsstr1_apdbaappd05/logs/appl/conc/') where OUTFILE_NODE_NAME='APDBAAPPD05';
Copy Java files
Copy the directories "bio", "com" and "COM" from ebsref1 apps server (erpwfdt1) $JAVA_TOP to $JAVA_TOP in apdbaappd05 server.
After copying the java/jsp files, please execute ojspcompile.pl to compile the copied over java/jsp files.
$ cd $FND_TOP/patch/115/bin
$ ojspCompile.pl
After this, please take a 30 minute downtime to bounce the application services for EBSSTR1.

Custom sftp programs

Custom sftp programs connects to secureft server using dhldatat user. So password less authentication is required from the application server to secureft server.
For Example: in Sandbox environment, we have raised a ticket 606220  with UNIX team to have the RSA authentication between application server (bincdv-a10064) to secureft server
Test the connectivity:
bincdv-a10064:applmgr$ sftp dhldatat@secureft
Connecting to secureft...
*******************************************************************************
Warning
*******************************************************************************
You are accessing a restricted system. Use of this system is restricted
to authorized personnel and associated business partners only. Any and all use of this
system is subject to monitoring and logging. Unauthorized or improper use of this system may
result in administrative disciplinary action and civil and criminal penalties.
By continuing to access this system you are agreeing to the terms and conditions of use.
*******************************************************************************
Warning
*******************************************************************************
sftp>
Datafix

GL_CODE_COMBINATIONS fix (/patch/erp/SCALE)

Appendix A - DB Components
select comp_id, comp_name, version, status from dba_registry order by 1,2;

DB components in EBSREF1 (11i)

COMP_ID    COMP_NAME                                VERSION    STATUS
---------- ---------------------------------------- ---------- ----------
AMD        OLAP Catalog                             11.2.0.3.0 VALID
APS        OLAP Analytic Workspace                  11.2.0.3.0 VALID
CATALOG    Oracle Database Catalog Views            11.2.0.3.0 VALID
CATJAVA    Oracle Database Java Packages            11.2.0.3.0 VALID
CATPROC    Oracle Database Packages and Types       11.2.0.3.0 VALID
CONTEXT    Oracle Text                              11.2.0.3.0 VALID
EXF        Oracle Expression Filter                 11.2.0.3.0 VALID
JAVAVM     JServer JAVA Virtual Machine             11.2.0.3.0 VALID
ORDIM      Oracle Multimedia                        11.2.0.3.0 VALID
RAC        Oracle Real Application Clusters         11.2.0.3.0 VALID
RUL        Oracle Rules Manager                     11.2.0.3.0 VALID
SDO        Spatial                                  11.2.0.3.0 VALID
XDB        Oracle XML Database                      11.2.0.3.0 VALID
XML        Oracle XDK                               11.2.0.3.0 VALID
XOQ        Oracle OLAP API                          11.2.0.3.0 VALID

15 rows selected.
DB components in EBSSTR1 (R12.2.4)
COMP_ID    COMP_NAME                                VERSION    STATUS
---------- ---------------------------------------- ---------- ----------
AMD        OLAP Catalog                             11.2.0.4.0 VALID
APS        OLAP Analytic Workspace                  11.2.0.4.0 VALID
CATALOG    Oracle Database Catalog Views            11.2.0.4.0 VALID
CATJAVA    Oracle Database Java Packages            11.2.0.4.0 VALID
CATPROC    Oracle Database Packages and Types       11.2.0.4.0 VALID
CONTEXT    Oracle Text                              11.2.0.4.0 VALID
EXF        Oracle Expression Filter                 11.2.0.4.0 VALID
JAVAVM     JServer JAVA Virtual Machine             11.2.0.4.0 VALID
ORDIM      Oracle Multimedia                        11.2.0.4.0 VALID
RAC        Oracle Real Application Clusters         11.2.0.4.0 INVALID
SDO        Spatial                                  11.2.0.4.0 VALID
XDB        Oracle XML Database                      11.2.0.4.0 VALID
XML        Oracle XDK                               11.2.0.4.0 VALID
XOQ        Oracle OLAP API                          11.2.0.4.0 VALID
14 rows selected.