You are on page 1of 18

CenturyLink Technologies

Oracle Database upgrade to 12C document


Interoperability Notes EBS 12.0 or 12.1 with RDBMS 12cR1 (12.1.0.1)
(Doc ID 1524398.1)

Present Version Details:


DB version: 11.2.0.4
EBS R12 version:12.1.3
Step1 apply application patches
Patch 8796558
Patch 16289505 - 12c Release 1 interoperability patch for Release 12.0.6
Patch 8796558
Patch 9239090 - Oracle E-Business Suite 12.1.3
Patch 12923944
Patch 13473483
Patch 16289505 - 12c Release 1 interoperability patch for Release 12.1
Patch 18843706 - apply only if you have applied a Recommended Patch Collection (RPC) patch
Patch 19558309

Also If you are on a UNIX/Linux platform, apply the 10.1.0.5 version of Patch 6400501 to the iAS 10.1.2
Applications tier Oracle home.

Note: For Linux x86-64 environments, download the Linux 32-bit version of the patch as the Applications tier
Oracle home is 32-bit
Step2: Shutdown the database and listener
$ Sqlplus ‘/as sysdba’
Sql> shut immediate
$ lsnrctl stop

Step3: Update application tier context file with new database listener port number (conditional)
The new 12.1.0 Oracle home uses its own database listener for the database instance, replacing the current
database listener. Use the Context Editor to update the following variables in the Applications context file on
each application tier server node to reflect the 12.1.0 configuration:

Variable Name Value


s_dbhost New database hostname
s_dbdomain New database domain name
s_dbport New database listener port
s_apps_jdbc_connect_descriptor NULL

NOTE:  Do not run AutoConfig on the application tier once the context file has been updated. Doing so will
cut off the entire application tier from the database instance until after the upgrade is complete. You will be
instructed to run AutoConfig on the application tier to configure the system for the new port number once the
upgrade is finished and the new database listener is in use.
It is assumed that the SID before and after upgrade are the same.

Step 4 Database Installation


Install Oracle Software 12C

Log in to the database server node as the owner of the Oracle RDBMS file system and database instance.
Ensure that environment settings, such as ORACLE_HOME, are set for the new Oracle home you are about to
create, and not for any existing Oracle homes on the database server node.

 Download and install into different $ORACLE_HOME location


 While installing 12C software in
Step3: Select “Install database software only”
Step6: Select “Enterprice Edition” – Vision Instance installed on EE
Step 5 Install Oracle Database 12c Products from the 12c Examples CD
  $ cd /mnt/software/DB12R1/ examples /install
$./runInstaller

Verify Installation
Install Screens:
Step 6: Create nls/data/9idata directory

On the database server node, as the owner of the Oracle RDBMS file system and database instance, run the
following command to create the $ORACLE_HOME/nls/data/9idata directory.

$ perl $ORACLE_HOME/nls/data/old/cr9idata.pl

After creating the directory, make sure that the ORA_NLS10 environment variable is set to the full path of the
9idata directory whenever you enable the 12c Oracle home.

export ORACLE_HOME=<New ORACLE_HOME Path>


export ORACLE_SID=PROD
export PATH=$ORACLE_HOME/bin:$PATH
export ORA_NLS10=/d01/oracle/PROD/db/tech_st/12c/nls/data/9idata
export PATH=$ORACLE_HOME/OPatch:$PATH

Step 7: Apply additional 12.1.0.2 RDBMS patches


Opatch - Apply additional 12.1.0.2 RDBMS patches – Database tier

Apply the following patches for environments without the In-Memory option enabled:

 Patch 6880880- the latest OPatch version for 12.1.0.


 Patch 19382851
 Patch 19393542
 Patch 19591608
 Patch 19627012
 Patch 19649152
 Patch 20204035
 Patch 22660003
 Patch 22731026
 Patch 23645516

Apply the following patches for environments with the In-Memory option enabled:

 Patch 6880880- the latest OPatch version for 12.1.0.


 Patch 20698050- Database patch for engineered systems and DB In-Memory 12.1.0.2.7 (or a later
version)
 Patch 19475484- Take the appropriate version of the patch based on the patch 20698050.
 Patch 22731026- Take the 12.1.0.2.7 (or later) version.

Step 8: Back up old TNS

Step 9: Database Upgrade


Shut down Applications server processes and database listener (old database listener)
Note: The Applications will be unavailable to users until all remaining tasks in this section are completed.

Attention: Make sure that you do not have the LOCAL_LISTENER initialization parameter set to ensure that
the database does not inadvertently point to a non-existent listener during upgrade.

Step 10: Drop SYS.ENABLED$INDEXES

If the SYS.ENABLED$INDEXES table exists, use SQL*Plus to connect to the database as SYSDBA and
running the following command to drop it:

SQL> drop table sys.enabled$indexes;

Step 11. Remove the MGDSYS schema (conditional)

If you are upgrading from an RDBMS version prior to 12c, on the old database server node, use SQL*Plus to
connect to the database as SYSDBA and run the $ORACLE_HOME/md/admin/catnomgdidcode.sql script.
This drops the MGDSYS schema.

$ sqlplus "/ as sysdba" @?/md/admin/catnomgdidcode.sql

Step 12: Prepare to upgrade


Execute the scripts preupgrd.sql and utluppkg.sql in new ORACLE_HOME

cd $ORACLE_HOME/rdbms/admin/

sqlplus '/ as sysdba'


SQL> spool utluppkg12c_info.log
SQL> @utluppkg.sql
SQL> spool off

SQL> spool upgrade12c_info.log


SQL> @ preupgrd.sql
SQL> spool off

And also execute the below scripts

exec utl_recomp.recomp_parallel(25);
exec DBMS_STATS.drop_stat_table('APPLSYS','FND_STATTAB');
exec DBMS_STATS.create_stat_table('APPLSYS','FND_STATTAB');
exec DBMS_STATS.upgrade_stat_table('APPLSYS','FND_STATTAB');
Step 13: Compile Invalid Objects

sqlplus '/as sysdba'


SQL> select count(1) from dba_objects where status='INVALID';
If it returns more than zero
SQL> @utlrp.sql

Optimizer Statistics:
$ sqlplus "/as sysdba"
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

Note: Do not shutdown source database

Step 14: Listeners Stop:


Stop Listeners – Source Database
$lsnrctl stop

Remove Local Listeners from Source Database


$sqlplus / as sysdba
SQL>create pfile from spfile;
$cd $ORACLE_HOME/dbs
$ls -lrt
$vi initPROD.ora
And remove line from pfile
local_listener='PROD'
Save and exit

oratab file edit it should be old oracle home path and additionally end must be N
$vi /etc/oratab
PROD: /u01/oraR12/PROD/db/tech_st/11.2.0:N
Save and exit

Step 15: Database Upgrade -12.1.0.2:


Set following values:
$export ORACLE_BASE=/u01/oraR12/PROD
$export ORACLE_SID=PROD
$export ORACLE_HOME=/u01/oraR12/PROD/db/tech_st/12102
$export LD_LIBRARY_PATH=$ORACLE_HOME/lib;
$export TNS_ADMIN=/u01/oraR12/PROD/db/tech_st/12102/network/admin/PROD_ebsdb
$export ORA_NLS10=$ORACLE_HOME/nls/data/9idata
$PERL5LIB=/u01/oraR12/PROD/db/tech_st/12102/perl/lib/5.10.0
:/u01/oraR12/PROD/db/tech_st/12102/perl/lib/site_perl/5.10.0:$ORACLE_HOME/appsutil/perl
$export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin
$export PATH=$ORACLE_HOME/perl: $ORACLE_HOME/perl/lib:$ORACLE_HOME/perl/bin:$PATH

Invoke dbua
$cd $ORACLE_HOME/bin
./dbua

Follow the screens:


After Upgrade:

Step16: After complete update restart the database and listener (new)
$sqlplus / as sysdba
SQL> shutdown immediate

$ lsnrctl stop

$sqlplus / as sysdba
SQL> startup
SQL> exit
$ lsnrctl start

Step 17: run adgrants.sql in db tier

Copy $APPL_TOP/admin/adgrants.sql from the administration server node to the database server node. Use
SQL*Plus to connect to the database as SYSDBA and run the script using the following command:

sqlplus "/ as sysdba" @adgrants.sql (or adgrants_nt.sql)


[APPS schema name]

Note: Verify the usage of adgrants.sql in the adgrants.sql script. Older versions of adgrants.sql require the
APPLSYS schema name parameter to be passed instead of APPS.

Step 18: Grant create procedure privilege on CTXSYS

Copy $AD_TOP/patch/115/sql/adctxprv.sql from the administration server node to the database server node.
Use SQL*Plus to connect to the database as APPS and run the script using the following command

$ sqlplus apps/[APPS password] @adctxprv.sql \


[SYSTEM password] CTXSYS

Step 19: Set CTXSYS parameter


Use SQL*Plus to connect to the database as SYSDBA and run the following command:

$ sqlplus "/ as sysdba"


SQL> exec ctxsys.ctx_adm.set_parameter('file_access_role', 'public');

Step 20: Validate Workflow ruleset

On the administration server node, use SQL*Plus to connect to the database as APPS and run the
$FND_TOP/patch/115/sql/wfaqupfix.sql script using the following command:

$ sqlplus [APPS user]/[APPS password] @wfaqupfix.sql\


[APPLSYS user] [APPS user]
Step 21: Gather statistics for SYS schema

Copy $APPL_TOP/admin/adstats.sql from the administration server node to the database server node. Note
that adstats.sql has to be run in restricted mode. Use SQL*Plus to connect to the database as SYSDBA and use
the following commands to run adstats.sql in restricted mode:

$ sqlplus "/ as sysdba"


SQL> alter system enable restricted session;
SQL> @adstats.sql
$ sqlplus "/ as sysdba"
SQL> alter system disable restricted session;
SQL> exit;

Note: Make sure that you have at least 1.5 GB of free default temporary tablespace.

Step 22: deregister the current database server (conditional)

If you plan to change the database port, host, SID, or database name parameter on the database server, you
must also update AutoConfig on the database tier and deregister the current database server node.

Use SQL*Plus to connect to the database as APPS and run the following command:

$ sqlplus apps/[APPS password]


SQL> exec fnd_conc_clone.setup_clean;

Step 23: Implement and run AutoConfig

Implement and run AutoConfig in the new Oracle home on the database server node. If the database listener of
the new Oracle home is defined differently than the old Oracle home, you must also run AutoConfig on each
application tier server node to update the system with the new listener.

Shut down all processes, including the database and the listener, and restart them to load the new environment
settings.

Attention: After creating the appsutil directory and before running AutoConfig, copy orai18n.jar from
$ORACLE_HOME/jlib to $ORACLE_HOME/jdk/jre/lib/ext

Attention: After creating the XML context file, ensure the variable s_jretop points to
$ORACLE_HOME/jdk/jre and is not altered to any other value.

Step 24: Create the new MGDSYS schema

If you upgraded from an RDBMS version prior to 12c, use SQL*Plus to connect to the database as SYSDBA
and run the $ORACLE_HOME/rdbms/admin/catmgd.sql script. This creates the new MGDSYS schema.

$ sqlplus "/ as sysdba" @?/rdbms/admin/catmgd.sql


Step 25: Apply post-upgrade WMS patch

If you upgraded from an RDBMS version prior to 12c, apply Patch 18039691 for Oracle E-Business Suite
Release 12.1

Step 26: Re-create custom database links


If the Oracle Net listener in the 12.1.0 Oracle home is defined differently than the one used by the old Oracle
home, you must re-create any custom self-referential database links that exist in the Applications database
instance.

To check for the existence of database links, use SQL*Plus on the database server node to connect to the
Applications database instance as APPS and run the following query

$ sqlplus apps/[apps password]


SQL> select db_link from all_db_links;

If you have custom self-referential database links in the database instance, use the following commands to
drop and re-create them

$ sqlplus apps/[apps password]


SQL> drop database link [custom database link];
SQL> create database link [custom database link] connect to
[user] identified by [password] using
'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=[hostname])
(PORT=[port number]))(CONNECT_DATA=(SID=[ORACLE_SID])))';

where [custom database link], [user], [password], [hostname], [port number], and [ORACLE_SID] reflect the
new Oracle Net listener for the database instance.

Step 27: Restart Applications server processes

Restart all the Application tier server processes that you shut down previously. Remember that the Oracle Net
listener for the database instance, as well as the database instance itself, need to be started in the 12.1 Oracle
home. Users may return to the system.

Step 28: Synchronize Workflow views

Log on to Oracle E-Business Suite with the "System Administrator" responsibility. Click Requests > Run >
Single Request and the OK button. Enter the following parameters:

 Request Name = Workflow Directory Services User/Role Validation


 Batch Size = 10000
 Fix dangling users = Yes
 Add missing user/role assignments = Yes
 Update WHO columns in WF tables = No

Click "OK" and "Submit".

You might also like