09 October, 2016

Upgrade 11.1.0.7 to 11.2.0.2 on R12.1.1

Following are the steps to upgrade 11.1.0.7 to 11.2.0.2 on R12.1.1

About Oracle Database Release Numbers
Oracle Database Upgrade Guide describes moving between different releases of Oracle Database. Starting with Oracle9i Release 2 (9.2), maintenance releases of Oracle Database are denoted by a change to the second digit of a release number. In earlier releases, the third digit indicated a particular maintenance release.
Figure 1–2 illustrates each part of a release number and what it represents.
1
Presently the database version is 11.1.0.72

The Upgrade process is divided into pre-upgrade, Upgrade and Post Upgrade.

1.Pre-Upgrade

Step-1
Check for oratab entry in /etc/oratab
3

Install 11gR2(11.2.0.2) Software only in new location
Create new location
mkdir –p /u01/oracle/RACDB/db/tech_st/11.2.0
Parallely Run Gather Dictionary Stats
45

Once we finish above. Let’s start installing 11.2.0.2 Oracle Software in new location /u01/oracle/RACDB/tech_st/db/11.2.0/
*Note: Don’t set DB environment during the installation of 11.2.0.2 Software.*
Download
p10098816_112020_Linux-x86-64_1of7.zip
p10098816_112020_Linux-x86-64_2of7.zip
unzip both the files in same location
Install 11gR2 Pre-req patches using YUM
yum install oracle-rdbms-server-11gR2-preinstall
6
Execute runinstaller
7

891011121314151617181920
Now go to /tmp/CVU_11.2.0.2
And execute ./runfixup.sh
212223242526

Now take a count of Invalid Objects
SQL> select OWNER,OBJECT_NAME,OBJECT_TYPE from dba_objects where STATUS=’INVALID’;

27
I will execute utlrp.sql or below package to compile invalid objects
exec utl_recomp.recomp_parallel(10);
28

29
From the above Screenshot we are going to apply
  • 11g Release 2 interoperability patch for Release 12.1 (9062910)
  • 12.1 TXK Delta 3 patch (8919489)
  • 9868229
  • 10163753
  • 11071569
Put Application under Maintenance using adadmin and start applying the above patches
Apply patch 6400501 (conditional)
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.

Update application tier context file with new database listener port number (conditional)
The new 11.2.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 11.2.0 configuration:
Variable NameValue
s_dbhostNew database hostname
s_dbdomainNew database domain name
s_db_serv_sidNew database SID
s_dbportNew database listener port
s_apps_jdbc_connect_descriptorNULL

Database Installation:
Prepare to create the 11.2.0 Oracle home
The 11.2.0 Oracle home must be installed on the database server node in a different directory than the current Oracle home Read Chapters 1 and 2 of the Oracle Database Installation Guide 11g Release 2 (11.2) for your platform. also read Chapter 1 and the “System Considerations and Requirements” section of Chapter 3 of the Oracle Database Upgrade Guide 11g Release 2 (11.2). Make sure you thoroughly understand the installation and upgrade processes. Perform any step that is relevant for your environment.

Attention: For HP Itanium and HP PA RISC platforms using the NFS file system, choose a disk to install the 11g Oracle home separate from the database files. The mount options of the disk containing the database files must include forcedirectio. The 11g Oracle home (or any other binaries) must not include the forcedirectio mount option.
Install Oracle Database 11g Products from the 11g Examples CD
On the database server node, as the owner of the Oracle RDBMS file system and database instance, perform the tasks in section 4, “Download Oracle Database Examples” in the Oracle Database Examples CD Installation Guide.
In the Installation Types window, use the Product Languages button to select any languages other than American English that are used by your Applications database instance.
After the installation, make sure that:
The ORACLE_BASE environment variable must be set accordingly.
The ORACLE_HOME environment variable points to the new 11.2.0 Oracle home.
The PATH environment variable includes $ORACLE_HOME/bin and the directory where the new perl executable is located (usually $ORACLE_HOME/perl/bin).
The LD_LIBRARY_PATH environment variable includes $ORACLE_HOME/lib.
The PERL5LIB environment variable points to the directories where the new perl libraries are located (usually $ORACLE_HOME/perl/lib/[perl version] and $ORACLE_HOME/perl/lib/site_perl/[perl version])
ExamplesCD: p10098816_112020_Linux-x86-64_6of7.zip
Download and apply above examples CD on 11202 Database Software:
3031323334
The ORACLE_BASE environment variable must be set accordingly.
The ORACLE_HOME environment variable points to the new 11.2.0 Oracle home.
The PATH environment variable includes $ORACLE_HOME/bin and the directory where the new perl executable is located (usually $ORACLE_HOME/perl/bin).
The LD_LIBRARY_PATH environment variable includes $ORACLE_HOME/lib.
The PERL5LIB environment variable points to the directories where the new perl libraries are located (usually $ORACLE_HOME/perl/lib/[perl version] and $ORACLE_HOME/perl/lib/site_perl/[perl version])

export ORACLE_BASE=/u01/oracle/RACDB/
export ORACLE_HOME=/u01/oracle/RACDB/db/tech_st/11.2.0
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=/u01/oracle/RACDB/db/tech_st/11.2.0/lib

Create nls/data/9idata directory

On the database server node, as the owner of the Oracle RDBMS file system and database instance, run the $ORACLE_HOME/nls/data/old/cr9idata.pl script to create the $ORACLE_HOME/nls/data/9idata directory.
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 11g Oracle home.
mkdir -p $ORACLE_HOME/nls/data/9idata
run the $ORACLE_HOME/nls/data/old/cr9idata.pl
[oracle@r12-rac1 ~]$ cd $ORACLE_HOME
[oracle@r12-rac1 11.2.0]$ cd nls/data/old/
[oracle@r12-rac1 old]$ perl cr9idata.pl
Directory /u01/oracle/RACDB/db/tech_st/11.2.0/nls/data/9idata already exist. Overwriting…
Copying files to /u01/oracle/RACDB/db/tech_st/11.2.0/nls/data/9idata…
Copy finished.
Please reset environment variable ORA_NLS10 to /u01/oracle/RACDB/db/tech_st/11.2.0/nls/data/9idata!
[oracle@r12-rac1 old]$ export ORA_NLS10=/u01/oracle/RACDB/db/tech_st/11.2.0/nls/data/9idata
35
Apply additional 11.2.0.2 RDBMS patches
Apply the following patches:
For all UNIX/Linux platforms:
Run utlu112i.sql on existing 11.1.0.7 oracle database
11.1.0.7—/u01/oracle/RACDB/db/tech_st/11.1.0
11.2.0.2—/u01/oracle/RACDB/db/tech_st/11.2.0
Copy utlu112i.sql from 11.2.0 Orace Home
cd /u01/oracle/RACDB/db/tech_st/11.2.0/rdbms/admin
cp utlu112i.sql $HOME
SQL> @utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 11-12-2013 21:14:59
Script Version: 11.2.0.2.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: RACDB
--> version: 11.1.0.7.0
--> compatible: 11.1.0
--> blocksize: 8192
--> platform: Linux x86 64-bit
--> timezone file: V10
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 11003 MB
--> CTXD tablespace is adequate for the upgrade.
.... minimum required size: 16 MB
--> ODM tablespace is adequate for the upgrade.
.... minimum required size: 10 MB
--> APPS_UNDOTS1 tablespace is adequate for the upgrade.
.... minimum required size: 853 MB
--> APPS_TS_TX_DATA tablespace is adequate for the upgrade.
.... minimum required size: 5254 MB
--> APPS_TS_QUEUES tablespace is adequate for the upgrade.
.... minimum required size: 79 MB
WARNING: --> SYSAUX tablespace is not large enough for the upgrade.
.... currently allocated size: 446 MB
.... minimum required size: 506 MB
.... increase current size by: 60 MB
.... tablespace is NOT AUTOEXTEND ENABLED.
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
--> If Target Oracle is 64-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
--> plsql_native_library_dir 11.2 OBSOLETE
--> plsql_native_library_subdir_ 11.2 OBSOLETE
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Real Application Clusters [upgrade] INVALID
--> OLAP Analytic Workspace [upgrade] VALID
--> OLAP Catalog [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] VALID
--> Data Mining [upgrade] VALID
--> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 11.1.0.7.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Your recycle bin contains 1724 object(s).
.... It is REQUIRED that the recycle bin is empty prior to upgrading
.... your database. The command:
 PURGE DBA_RECYCLEBIN
.... must be executed immediately prior to executing your upgrade.
WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
.... USER APPS has dependent objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
EXECUTE dbms_stats.gather_dictionary_stats;
**********************************************************************
Oracle recommends removing all hidden parameters prior to upgrading.
To view existing hidden parameters execute the following command
while connected AS SYSDBA:
SELECT name,description from SYS.V$PARAMETER WHERE name LIKE '\_%' ESCAPE '\'
Changes will need to be made in the init.ora or spfile.
**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.
To view existing non-default events execute the following commands
while connected AS SYSDBA:
 Events:
 SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
 WHERE UPPER(name) ='EVENT' AND isdefault='FALSE'
Trace Events:
 SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2 WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'
Changes will need to be made in the init.ora or spfile.
**********************************************************************
The DMSYS schema exists in the database. Prior to performing an
upgrade Oracle recommends that the DMSYS schema, and its associated
objects be removed from the database.
Refer to the Oracle Data Mining Administration Guide for the
instructions on how to perform this task.
**********************************************************************

1
WARNING: –> SYSAUX tablespace is not large enough for the upgrade.
…. currently allocated size: 446 MB
…. minimum required size: 506 MB
…. increase current size by: 60 MB
…. tablespace is NOT AUTOEXTEND ENABLED.
1
SOLUTION:
 ALTER DATABASE DATAFILE'/u01/oracle/RACDB/db/apps_st/data/sysaux02.dbf' RESIZE 1G;
2 Comment the below parameters in init.ora file
 --> plsql_native_library_dir     11.2       OBSOLETE
--> plsql_native_library_subdir_ 11.2       OBSOLETE
36
3
WARNING: –> Your recycle bin contains 1724 object(s).
…. It is REQUIRED that the recycle bin is empty prior to upgrading
…. your database.  The command:
PURGE DBA_RECYCLEBIN
SOLUTION:
37

Find and Comment all hidden parameters prior to upgrading.
SELECT name,description from SYS.V$PARAMETER WHERE name LIKE ‘\_%’ ESCAPE ‘\’



383940

2.Upgrade
Shutdown the 11.1.0.7 DATABASE open a new terminal

Set the new environment
export ORACLE_BASE=/u01/oracle/RACDB/
export ORACLE_HOME=/u01/oracle/RACDB/db/tech_st/11.2.0
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PERL5LIB=$ORACLE_HOME/perl/lib/5.10.0:$ORACLE_HOME/perl/lib/site_perl/5.10.0

export ORA_NLS10=/u01/oracle/RACDB/db/tech_st/11.2.0/nls/data/9idata
run dbua
424344454647484950
Simultaneously Check for count of invalids, it will be reducing.
51

52
So we are done with the upgrade.
53
POST Upgrade

1.Copy $APPL_TOP/admin/adgrants.sql (adgrants_nt.sql for Windows) 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:
  1. $ 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.
In this case i have copied the adgrants.sql in /tmp
54

2.Re-create grants and synonyms using adadmin and then compile apps schema this will help us in reducing the no.of invalids.
After Upgrade the no.of invalids
55

After running recreate grants and synonyms and compile apps schema the invalid count is
56
This is really good as we dont have any invalids before or after Upgrade. Even if there are any invalids it should be same when compared to before upgrade. If we get any invalids then we should raise an SR and work on it.
3.When we applied 11.2.0.2 additional patches there were some post patch steps, that has to be taken care.
a)  4247037
Post install steps:
cd $ORACLE_HOME/md/admin
connect to the database using sqlplus / as sysdba
sqlplus> @catmgdidcode
b) 9858539
Post install steps:
Run following files as sysdba
cd $ORACLE_HOME/rdbms/admin
@catnomtt.sql
@catnomta.sql
@dbmsmeta.sql
@dbmsmeti.sql
@dbmsmetu.sql
@dbmsmetb.sql
@dbmsmetd.sql
@dbmsmet2.sql
@catmeta.sql
@prvtmeta.plb
@prvtmeti.plb
@prvtmetu.plb
@prvtmetb.plb
@prvtmetd.plb
@prvtmet2.plb
@catmet2.sql
— recompile dbms_metadata_int to enable the diffing code
alter package dbms_metadata_int compile plsql_ccflags = ‘ku$xml_enabled:true’;
— recompile dbms_metadata_util to enable the xmlschema load code
alter package dbms_metadata_util compile plsql_ccflags = ‘ku$xml_enabled:true’;
5.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
6.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’);
7.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;
  1. 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.
On the applciation side run admkappsutil.pl to generate admkappsutil.zip file
copy this admkappsutil.zip to new 11.2.0.2 Oracle Home and unzip then run autoconfig this makes our new oracle home autoconfig enabled.
See Using AutoConfig to Manage System Configurations with Oracle E-Business Suite Release 12 on My Oracle Support for instructions on how to implement and run AutoConfig. Section 3.2 explains how to generate a context file on the database tier.
Shut down all processes, including the database and the listener, and restart them to load the new environment settings.
Attention: For Windows customers, after creating the XML context file, ensure that the variable s_dlsnname has the proper listener service name.

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.
  1. Apply post-upgrade ECX patch
If you are on E-Business Suite Release 12.0, apply ECX Patch 9922442. If you are on E-Business Suite Release 12.1, apply Patch 9151516.
  1. 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;
11.  Restart Applications server processes
Remove the Maintenance mode and 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 11.2 Oracle home. Users may return to the system.
57


Now check the DB version from frontend…..
5859

We are able to successfully upgrade the database from 11.1.0.7 to 11.2.0.2

No comments:

Post a Comment

OEM Agent Installation

./agentDeploy.sh AGENT_BASE_DIR=/u001/oracle/product/agent13c OMS_HOST=oem-dev.xxx.com EM_UPLOAD_PORT=1159 AGENT_REGISTRATION_PASSWORD=*****...