Upgrade DB 10.2.0.4 12.1.0
Upgrade DB 10.2.0.4 12.1.0
Upgrade DB 10.2.0.4 12.1.0
*
** DOCUMENT FOR ORACLE DATABASE UPGRADE FROM 10.2.0.4 TO 12.1.0.2 : PREPARED BY HCL D
A TEAM **
*********************************************************************************************
*
#############################################################################################
#######################################
Note 1: As the steps include setting up environment & changing path variables, the task of upgrade should be done i
session
where settings mentioned in the document were done.
It is better to comment the enteries for calling env variables in .profile file and call the env file manually.
This is nullify the any profile related issue.
Note 2: The upgrade consists of two broad steps, first upgrade from 10.2.0.4 to 10.2.0.5 & second upgrade from 10.
.0.5 to 12.1.0.2
Note 3: Install the 12.1.0.X DB in a location different from 10.2.0.X e.g. <ORACLE_BASE>/db/tech_st/12.1.0
#############################################################################################
#######################################
05. Oracle Database (RDBMS) on Unix AIX, HP-UX, Linux, Solaris and MS Windows Operating Systems Installat
on and Configuration Requirements Quick Reference (12.1)
(Doc ID 1587357.1)
08. Kernel setup for Solaris 10 and Solaris 11 using project files
(Doc ID 429191.1)
09. Quick Reference to Patch Numbers for Database PSU, SPU(CPU), Bundle Patches and Patchsets
(Doc ID 1454618.1)
10. Oracle Recommended Patches -- Oracle Database
(Doc ID 756671.1)
11. Bug 22191659 - Combo of 12.1.0.2.160119 OJVM PSU and 12.1.0.2.160119 DB PSU (Jan 2016)
(Doc ID 22191659.8)
12. Readme for Patch 22191659 - Combo of OJVM Component 12.1.0.2.160119 DB PSU + DB PSU 12.1.0.2.1601
9 (Jan2016)
13. Readme for Patch 21948354 - Database Patch Set Update 12.1.0.2.160119
14. Readme for Patch 22139226 - Oracle JavaVM Component 12.1.0.2.160119 Database PSU
15. https://docs.oracle.com/database/121/SSDBI/app_manual.htm#SSDBI7871
18. How to Install 11.2 / 12.1 Database/Client Software in Silent Mode with/without Using Response File
(Doc ID 885643.1)
19. Master Note For Oracle Database 12c Release 1 (12.1) Database/Client Installation/Upgrade/Migration Standalo
e Environment (Non-RAC)
(Doc ID 1520299.1)
21. Actions For DST Updates When Upgrading To Or Applying The 12.1.0.2 Patchset
(Doc ID 1665676.1)
22. Applying the DSTv18 update for the Oracle Database (Doc ID 1448706.1)
22. https://docs.oracle.com/database/121/LADBI/app_nonint.htm#LADBI7831
26. R12: On a cloned target the logon screen reports 'HTTP error 500 Internal server error'
(Doc ID 1335176.1)
29. AutoConfig is Failing with status 4 for a New Database with NLS Environment Error ORA-12705
(Doc ID 1612017.1)
31. Interoperability Notes Oracle EBS Release 12.0 or 12.1 with Oracle Database 12c Release 1 (12.1.0.1)
(Doc ID 1930134.1)
=================
OS Requirements :
=================
01. Solaris 10 Update 11 is the minimum supported OS Version. To check the OS version use command
>>>> cat /etc/release
03. Oracle software requires a minimum of 2048 MB of RAM for successful installation. Recommended: 2 GB of R
M or more
>>>> prtconf | grep -i mem
04. The 'umask' setting for the OS user owning DB has to be 022 or 0022. Check the value using following comman
:
>>>> umask
#### to set umask to 0022
>>>> umask 0022
05. Both resource control and /etc/system/ parameters should be set. The kernel parameters required are:
Resource Control Minimum Value
---------------- -------------
project.max-sem-ids 100
process.max-sem-nsems 256
project.max-shm-memory This value varies according to the RAM size. The value for this parameter should be great
r than sum of all SGA sizes.
For 1 GB to 16 GB RAM : Half the size of physical memory; For Greater than 16 GB : At least 8 GB
project.max-shm-ids 100
tcp_smallest_anon_port 9000
tcp_largest_anon_port 65500
udp_smallest_anon_port 9000
udp_largest_anon_port 65500
#### Use the following command to find projid infomation for OS User used to upgrade oracle
>>>> id -p
---- command will list out uid(username), gid(groupname), projid(projectname)
>>>> projects -l
>>>> more /etc/project
#### Use the following command to change the setting for project.max-shm-memory
>>>> prctl -n project.max-shm-memory -v <value>gb -r -i project <projectname>
---- setting for project.max-shm-memory to 6 GB for the project default without a system reboot (setting will be disc
rded on reboot)
---- prctl -n project.max-shm-memory -v 6gb -r -i project default
---- setting for project.max-shm-memory to 6 GB for the project default with a system reboot (setting will be preserv
d on reboot)
>>>> projmod -sK "project.max-shm-memory=(privileged,<Value>G,deny)" <projectname>
---- projmod -sK "project.max-shm-memory=(privileged,6G,deny)" default
#### Use following command to change soft STACK (stack size) shell limit
>>>> ulimit -Ss <value>
#### Use following command to change hard STACK (stack size) shell limit
>>>> ulimit -Hs <value>
#### Use following command to change soft NOFILES (open files) shell limit
>>>> ulimit -Sn <value>
#### Use following command to change hard NOFILES (open files) shell limit
>>>> ulimit -Hn <value>
#### Use following command to change soft MAXUPRC or MAXPROC (max user processes) shell limit
>>>> ulimit -Su <value>
#### Use following command to change hard MAXUPRC or MAXPROC (max user processes) shell limit
>>>> ulimit -Hu <value>
=============================
Steps To Perform The Upgrade:
=============================
-------------------------------------
Upgrade steps 10.2.0.4 ---> 10.2.0.5:
-------------------------------------
02. Source the environment variable present in $RDBMS_ORACLE_HOME. Run the following commands:
>>>> PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
>>>> echo $PATH
>>>> export PATH
03. Run the script utlu102i_2.sql after connecting in sysdba role. Save its output in temporary text file.
04. Check the table spaces (Low free space in tablespaces can adversely affect the upgrade)
05. Make the instance down. Take a backup of instance. Keep the instance down.
06. Backup the response file template (patchset.rsp) provided in theresponsedirectory where the patch set archive fil
was unpacked
07. Edit the values for all fields labelled as <Value Required> as described by the comments and examples in the res
onse file template
08. Run the installer for Oracle Database 10G Patch Set Noninteractively from patch p8202632_10205_SOLARIS6
09. After the installation, run the $ORACLE_HOME/root.sh script as the root user
#### Enter the full pathname of the local bin directory: [/usr/local/bin]:<Full Path of RDBMS_ORACLE_HOME>/
in
#### The file "dbhome" already exists in <Full Path of RDBMS_ORACLE_HOME>/bin. Overwrite it? (y/n) [n]: y
#### The file "oraenv" already exists in <Full Path of RDBMS_ORACLE_HOME>/bin. Overwrite it? (y/n) [n]: y
#### The file "coraenv" already exists in <Full Path of RDBMS_ORACLE_HOME>/bin. Overwrite it? (y/n) [n]: y
10. If prompted, run $ORACLE_HOME/install/changePerm.sh and specify the patched server Oracle home location
12. Enter the following command to upgrade Oracle Database using Oracle Database Upgrade Assistant in nonintera
tive mode
#### dbua -silent -dbname $ORACLE_SID -oracleHome $ORACLE_HOME -sysDBAUserName UserName -sysD
APassword password -recompile_invalid_objects true
>>>> dbua -silent -dbname $ORACLE_SID -oracleHome $ORACLE_HOME -sysDBAUserName SYS -sysDBAPa
sword manager -recompile_invalid_objects true
14. Apply the DSTv18 update for the Oracle Database 10.2.0.5
#### Check for following queries in TOAD using SYSTEM user
SQL> SELECT version FROM v$timezone_file;
SQL> select c.owner || '.' || c.table_name || '(' || c.column_name || ') -'
|| c.data_type || ' ' col
from dba_tab_cols c, dba_objects o
where c.data_type like '%LOCAL TIME ZONE'
and c.owner=o.owner
and c.table_name = o.object_name
and o.object_type = 'TABLE'
order by col
#### The above query should not return any rows
---- If rows are returned check for Oracle Doc ID 1448706.1
#### Move utltzuv18.sql to RDBMS_ORACLE_HOME/rdbms/admin
#### utltzuv18.sql needs to be executed using sqlplus from the server's RDBMS_ORACLE_HOME
SQL> @?/rdbms/admin/utltzuv18.sql;
SQL> select * from dba_scheduler_jobs;
SQL> select * from sys.sys_tzuv2_temptab;
---- If the above query returns no row simply apply the RDBMS DSTv18 patch
---- Proceed to apply DSTv18 patch if SYS.SCHEDULER$_% related rows returned
---- If the above query returns row other than mentioned, check for Oracle Doc ID 1448706.1
---- Shutdown any running services before applying the DSTv18 patch
#### Make the db down to install the DSTv18 update patch
#### Use following command to apply opatch
>>>> opatch apply -invPtrLoc $ORACLE_HOME/oraInst.loc
#### Bounce the db twice
SQL> SELECT version FROM v$timezone_file;
15. Bounce the db completely and start the apps if required. Close the telnet/ssh session.
---------------------------------------------
Upgrade from 10.2.0.4 to 10.2.0.5 is complete
---------------------------------------------
-------------------------------------
Upgrade steps 10.2.0.5 ---> 12.1.0.2:
-------------------------------------
16. Move the patches p21419221_121020_SOLARIS64 and p21948354_121020_SOLARIS64 to db node and unzip
them.
#### Move following zip files only
---- p21419221_121020_SOLARIS64_1of10.zip --Oracle Database (includes Oracle Database, Oracle RAC, and De
nstall)
---- p21419221_121020_SOLARIS64_2of10.zip --Oracle Database (includes Oracle Database, Oracle RAC, and De
nstall)
---- p21419221_121020_SOLARIS64_9of10.zip --Oracle Examples
---- p22191659_121020_SOLARIS64.zip
17. Source the environment variable present in $RDBMS_ORACLE_HOME. Run the following commands:
>>>> PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
>>>> echo $PATH
>>>> export PATH
18. Move the utility preupgrade_12.1.0.2.0_12_lf.zip to db server. Unzip the zip file. Connect as sysdba.
First run the script utluppkg.sql. Then run the script preupgrd.sql. Save its output in temporary text file.
23. Backup the response file templates (db_install.rsp and demos_install.rsp) provided in response directories of dat
base and examples
where the patch set archive file was unpacked
24. Edit the values for all fields labelled as <Value Required> as described by the comments and examples in the res
onse file templates
25. Open a new session without sourcing any environment file and set the following
>>>> ORACLE_BASE=<Base_Dir_Oracle>
---- ORACLE_BASE=/sstrng01/HCLTRNG
>>>> ORACLE_HOME=<ORACLE_BASE>/db/tech_st/12.1.0
---- ORACLE_HOME=/sstrng01/HCLTRNG/db/tech_st/12.1.0
>>>> ORACLE_SID=<ORACLE_SID>
---- ORACLE_SID=HCLTRNG
>>>> ORACLE_HOME_NAME=<Name_of_Oracle_Home>
---- ORACLE_HOME_NAME=HCLTRNG_DB__sstrng01_HCLTRNG_db_tech_st_12_1_0
>>>> export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_HOME_NAME
26. Run the installer for Oracle Database 12C Patch Set installation in noninteractive mode after making the db dow
27. If prompted run the root.sh script and orainstRoot.sh as the root user
#### sh root.sh -bindir /sstrng01/HCLTRNG/db/tech_st/12.1.0/bin -stdout
---- If orainstRoot.sh is not executed, Oracle Examples may not install
#### sh orainstRoot.sh
28. Run the installer to Install Oracle Database Examples in an new Oracle Database 12c Oracle in noninteractive m
de
---- ./runInstaller -showProgress -waitforcompletion -silent -noconfig -responseFile <patch-to-response_file>
32. If the SYS.ENABLED$INDEXES table exists, use SQL*Plus to connect to the database as SYSDBA (USE OL
_RDBMS_ORACLE_HOME)
SQL> drop table sys.enabled$indexes;
33. Remove the MGDSYS schema by running $ORACLE_HOME/md/admin/catnomgdidcode.sql script (USE OLD
RDBMS_ORACLE_HOME)
#### sqlplus "/ as sysdba" @?/md/admin/catnomgdidcode.sql
Note: Ensure that the oratab file contains an entry for the database to be upgraded (may not be required, not done in
arlier upgrades)
34. Enter the following command to upgrade Oracle Database using Oracle Database Upgrade Assistant in nonintera
tive mode from <DSTN_RDBMS_ORACLE_HOME>/bin
---- Environment releating to old db should be sourced
#### ./dbua -silent -dbname <sid_of_source_db> -oracleHome <home_directory_of_source_db> -oracleBase <base
directory_of_new_db> -sysDBAUserName UserName -sysDBAPassword password -autoextendFiles -recompile_in
alid_objects true -listeners <ListenerName>
---- ./dbua -silent -sid HCLTRNG -oracleHome /sstrng01/HCLTRNG/db/tech_st/10.2.0 -oracleBase /sstrng01/HCL
RNG -sysDBAUserName SYS -sysDBAPassword manager -autoextendFiles -recompile_invalid_objects true -listen
rs HCLTRNG
#### Check the latest log in <ORACLE_BASE>/cfgtoollogs/dbua/logs/silent.log
35. Navigate to <DSTN_RDBMS_ORACLE_HOME>/oracore/zoneinfo and create the link for latest timezone versi
n there is a requirement for a specific version
>>>> ln -s timezone_18.dat timezone.dat
>>>> ln -s timezlrg_18.dat timezlrg.dat
36. Invoke the SQL Plus, if sqlplus doesn't start and gives SP2-0642 error, comply with below
---- SP2-0642: SQL*Plus internal error state 2165, context 4294967295:0:0
#### Open a new putty session in which no env file was sourced
#### Set the following variables
>>>> ORACLE_BASE=<Base_Dir_Oracle>
---- ORACLE_BASE=/sstrng01/HCLTRNG
>>>> ORACLE_HOME=<ORACLE_BASE>/db/tech_st/12.1.0
---- ORACLE_HOME=/sstrng01/HCLTRNG/db/tech_st/12.1.0
>>>> ORACLE_SID=<ORACLE_SID>
---- ORACLE_SID=HCLTRNG
>>>> PATH=<ORACLE_BASE>/db/tech_st/12.1.0/bin:$PATH
---- PATH=/sstrng01/HCLTRNG/db/tech_st/12.1.0/bin:$PATH
>>>> PATH=<ORACLE_BASE>/db/tech_st/12.1.0/OPatch:$PATH
---- PATH=/sstrng01/HCLTRNG/db/tech_st/12.1.0/OPatch:$PATH
>>>> export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
37. Start the db listener, if listener doesn't start and gives TNS-01151 error, comply with below
---- TNS-01151: Missing listener name, HCLTRNG, in LISTENER.ORA
#### Open a putty session in which variables for SP2-0642 were set
#### SQL Plus should connect properly before listeners are started
#### Set the following variable
>>>> TNS_ADMIN=<ORACLE_BASE>/db/tech_st/12.1.0/network/admin/<CONTEXT_NAME>
---- TNS_ADMIN=/sstrng01/HCLTRNG/db/tech_st/12.1.0/network/admin/HCLTRNG_trng
>>>> export TNS_ADMIN
#### copy <SRC_RDBMS_ORACLE_HOME>/network/admin/<CONTEXT_NAME> to <DSTN_RDBMS_ORA
LE_HOME>/network/admin/<CONTEXT_NAME>
#### Modify the files for entries of 10.2.0 to 12.1.0 in <DSTN_RDBMS_ORACLE_HOME>/network/admin/<CO
TEXT_NAME>
>>>> lsnrctl start <ListenerName>
---- lsnrctl start HCLTRNG
39. Add the following to the sqlnet_ifile.ora (which is not overwritten by autoconfig):
sqlnet_ifile.ora is present in <NEW_RDBMS_ORACLE_HOME>/network/admin/<CONTEXT_NAME>
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8 (if the initialization parameter SEC_CASE_SENSITIVE
LOGON is set to FALSE)
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 10 (if SEC_CASE_SENSITIVE_LOGON is set to TRUE)
40. In Application tier, login as the APPLMGR user, run the environment (UNIX) for the current APPL_TOP.
#### Source the apps environment file from <APPL_TOP>/APPS<CONTEXT_NAME>.env
#### Run AutoConfig on the APPL_TOP
#### Run the admkappsutil.pl utility to create the file appsutil.zip in the <INST_TOP>/admin/out directory.
>>>> perl <AD_TOP>/bin/admkappsutil.pl
>>>> Copy or FTP the appsutil.zip file created in apps tier to the <NEW_RDBMS ORACLE_HOME>
>>>> Uncompress appsutil.zip under the <NEW_RDBMS_ORACLE_HOME> using overwrite option (unzip -o <fi
ename.zip>)
41. After creating the appsutil directory and before running AutoConfig, copy orai18n.jar from $ORACLE_HOME/
lib to $ORACLE_HOME/jdk/jre/lib/ext
Note: Make sure that you have at least 1.5 GB of free default temporary tablespace.
52. Apply Patch 21948354 under Patch 22191659 - Combo of OJVM Component 12.1.0.2.160119 DB PSU + DB P
U 12.1.0.2.160119 (Jan2016)
---- Database Patch Set Update 12.1.0.2.160119
#### Shut down all instances and listeners associated with the Oracle home that you are updating
#### Navigate to directory containing the patch file (etc, files directory)
#### Check to discover conflicts if any
>>>> opatch prereq CheckConflictAgainstOHWithDetail -ph ./
---- check the readme file for Patch 21948354 for any reported conflicts
#### Apply the patch using command
>>>> opatch apply
>>>> opatch lsinventory -all
#### Load Modified SQL Files into the Database
>>>> sqlplus /nolog
SQL> Connect / as sysdba
SQL> startup;
SQL> quit;
>>>> cd $ORACLE_HOME/OPatch
>>>> ./datapatch -verbose
#### Check the log files in $ORACLE_BASE/cfgtoollogs/sqlpatch/21948354/<unique patch ID> for errors
#### If the Oracle Recovery Manager is being used, the catalog needs to be upgraded
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
---- check the readme file for Patch 21948354 for any errors
53. Apply Patch 22139226 under Patch 22191659 - Combo of OJVM Component 12.1.0.2.160119 DB PSU + DB P
U 12.1.0.2.160119 (Jan2016)
---- OJVM Patch Set Update 12.1.0.2.160119
#### Shut down all instances and listeners associated with the Oracle home that you are updating
#### Navigate to directory containing the patch file (etc, files directory)
#### Check to discover conflicts if any
>>>> opatch prereq CheckConflictAgainstOHWithDetail -ph ./
---- check the readme file for Patch 22139226 for any reported conflicts
#### Apply the patch using command
>>>> opatch apply
>>>> opatch lsinventory -all
#### Load Modified SQL Files into the Database
>>>> sqlplus /nolog
SQL> Connect / as sysdba
SQL> startup upgrade;
SQL> quit;
>>>> cd $ORACLE_HOME/OPatch
>>>> ./datapatch -verbose
>>>> sqlplus /nolog
SQL> Connect / as sysdba
SQL> shutdown;
SQL> startup;
#### Check the log files in $ORACLE_BASE/cfgtoollogs/sqlpatch/22139226/<unique patch ID> for errors
#### After installing the SQL portion of the patch, some packages could become INVALID, run utlrp.sql to get the
back into a VALID state
>>>> cd $ORACLE_HOME/rdbms/admin
>>>> sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
---- check the readme file for Patch 22139226 for any errors
SQL> shutdown;
64. Regenerate jar files using adadmin - select YES when prompted to force generation of jar files
#### Compile apps schema for any invalids
---- 2 invalids after this step
Stop all middle tier services and stop database services as well OS services. Then restart all those services.
---------------------------------------------
Upgrade from 10.2.0.5 to 12.1.0.2 is complete
---------------------------------------------