Database Upgrade to 11gR2 11.2.0.3 to 11.2.0.4 using Manual Method
Minor upgrade from 11.2.0.3 to 11.2.0.4
Summary
1) Pre-check
Summary
1) Pre-check
- Download Oracle 11.2.0.4 software from Oracle Download
- Check VNC for GUI installation and install 11.2.0.4 binary
- CVU pre upgrade check, ssh connectivity check between node
- Oracle Home backup and Database backup
- Check invalid object,component,
- Backup of parameter and control file
- generate AWR if case perfomrnace issue , We can compare
- stale statistic for dictionary and Database
- Before upgrade run the preupgrade tool to check the pre-requisites before proceeding upgrade which is available in new home. Fix as per output result.
2) create New folder (11.2.0.4) in Oracle Base with correct permission
3) Extract (Downloaded Oracle software-11.2.0.4) zip file disk 1 and disk 2
3) Extract (Downloaded Oracle software-11.2.0.4) zip file disk 1 and disk 2
4) unset all oracle related path and install Oracle Home 11.2.0.4 on new folder on both node through GUI and health check of both RAC RDBMS HOME
4) Stop database on both node
5) start database with new home in upgrade mode
5) run cutupgrd.sql
6) Again shutdown database and start in normal mode
7) check Oracle registry,utlu112s.sql,catuppst,utlrpt and other post implementation steps
8) upgrade oracle home through srvctl and check remote connectivity
9)Healtch of database and inform application team
5) run the pre-upgrade information tool to check result of up grade
3) Stop application4) Stop database on both node
5) start database with new home in upgrade mode
5) run cutupgrd.sql
6) Again shutdown database and start in normal mode
7) check Oracle registry,utlu112s.sql,catuppst,utlrpt and other post implementation steps
8) upgrade oracle home through srvctl and check remote connectivity
9)Healtch of database and inform application team
Check for root
access
1) Before starting migration .make sure you have full Rman backup available and check backup log for successful completion
Backup location-/var/opt/oracle/DBA/logs
-rw-r--r-- 1 testdatabase oinstall 10621 Sep 23 19:47 rman_testdatabase_arch_backup.20160923194607.log
-rw-r--r-- 1 testdatabase oinstall 64536 Sep 23 21:09 rman_testdatabase_full_backup.20160923200001.log
-rw-r--r-- 1 testdatabase oinstall 7285 Sep 23 23:47 rman_testdatabase_arch_backup.20160923234605.log
-rw-rw-r-- 1 oracrs oinstall 2726590 Sep 23 23:47 rman_backup.log
Node1[/var/opt/oracle/DBA/logs]$
Downloaded Oracle Software for 11.2.0.4 RAC
[node1:root:/backup/upgrade:] ls -ltr
total 9960192
drwxrwxrwx 8 oracrs oinstall 4096 Oct 09 2013 grid
-rwxrwxrwx 1 oracrs oinstall 1170882875 Aug 30 11:29 p13390677_112040_AIX64-5L_2of7.zip
-rwxrwxrwx 1 oracrs oinstall 1801653734 Aug 30 11:30 p13390677_112040_AIX64-5L_1of7.zip
-rwxrwxrwx 1 oracrs oinstall 2127071138 Aug 30 11:30 p13390677_112040_AIX64-5L_3of7.zip
1) Before starting migration .make sure you have full Rman backup available and check backup log for successful completion
Backup location-/var/opt/oracle/DBA/logs
-rw-r--r-- 1 testdatabase oinstall 10621 Sep 23 19:47 rman_testdatabase_arch_backup.20160923194607.log
-rw-r--r-- 1 testdatabase oinstall 64536 Sep 23 21:09 rman_testdatabase_full_backup.20160923200001.log
-rw-r--r-- 1 testdatabase oinstall 7285 Sep 23 23:47 rman_testdatabase_arch_backup.20160923234605.log
-rw-rw-r-- 1 oracrs oinstall 2726590 Sep 23 23:47 rman_backup.log
Node1[/var/opt/oracle/DBA/logs]$
Downloaded Oracle Software for 11.2.0.4 RAC
[node1:root:/backup/upgrade:] ls -ltr
total 9960192
drwxrwxrwx 8 oracrs oinstall 4096 Oct 09 2013 grid
-rwxrwxrwx 1 oracrs oinstall 1170882875 Aug 30 11:29 p13390677_112040_AIX64-5L_2of7.zip
-rwxrwxrwx 1 oracrs oinstall 1801653734 Aug 30 11:30 p13390677_112040_AIX64-5L_1of7.zip
-rwxrwxrwx 1 oracrs oinstall 2127071138 Aug 30 11:30 p13390677_112040_AIX64-5L_3of7.zip
Change software
owner for disk1 and disk2 to instance owner
[node1:root:/backup/upgrade:]
chown testdatabase:oinstall p13390677_112040_AIX64-5L_1of7.zip
[node1:root:/backup/upgrade:] chown testdatabase:oinstall p13390677_112040_AIX64-5L_2of7.zip
[node1:root:/backup/upgrade:]
total 35080
-rw-r--r-- 1 testdatabase dba 2851 May 15 2009 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase1
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase1.ora
-rw-r--r-- 1 testdatabase asmadmin 1020 Jun 11 2013 dsierror.log
-rw-r----- 1 testdatabase asmadmin 17940480 Oct 18 2015 snapcf_testdatabase1.f
-rw-rw---- 1 testdatabase asmadmin 1544 Sep 24 00:36 hc_testdatabase1.dat
node1[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ pwd
/u01/oracle/testdatabase/product/11.2.0.3/dbs
node1[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
2) unzip 1 and 2 using instance owner and create folder on both node
node1[/u01/oracle/testdatabase/product]$ mkdir 11.2.0.4
node1[/u01/oracle/testdatabase/product]$ ls -ltr
total 8
drwxr-xr-x 79 testdatabase dba 4096 Aug 18 15:55 11.2.0.3
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 01:03 11.2.0.4
node1[/u01/oracle/testdatabase/product]$
[node1:root:/home/root:] cd /u01/oracle/testdatabase/product
[node1:root:/u01/oracle/testdatabase/product:] ls -ltr
total 8
drwxr-xr-x 79 testdatabase dba 4096 Aug 18 15:55 11.2.0.3
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 01:03 11.2.0.4
[node1:root:/u01/oracle/testdatabase/product:] chown testdatabase:dba 11.2.0.4
[node1:root:/u01/oracle/testdatabase/product:] ls -ltr
total 8[node2:root:/u01/oracle/testdatabase/product:] ls -ltr
total 8
drwxr-xr-x 79 testdatabase dba 4096 Sep 24 00:24 11.2.0.3
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 01:09 11.2.0.4
[node2:root:/u01/oracle/testdatabase/product:]
drwxr-xr-x 79 testdatabase dba 4096 Aug 18 15:55 11.2.0.3
drwxr-xr-x 2 testdatabase dba 256 Sep 24 01:03 11.2.0.4
[node1:root:/u01/oracle/testdatabase/product:]
[node2:root:/u01/oracle/testdatabase/product:] ps -ef|grep pmon
root 30277668 14287024 0 01:13:17 pts/2 0:00 grep pmon
oracrs 30671086 1 0 Sep 05 - 3:52 asm_pmon_+ASM2
testdatabase 31916192 1 0 Sep 05 - 5:17 ora_pmon_testdatabase2
[node1:root:/backup/upgrade:] chown testdatabase:oinstall p13390677_112040_AIX64-5L_2of7.zip
[node1:root:/backup/upgrade:]
total 35080
-rw-r--r-- 1 testdatabase dba 2851 May 15 2009 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase1
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase1.ora
-rw-r--r-- 1 testdatabase asmadmin 1020 Jun 11 2013 dsierror.log
-rw-r----- 1 testdatabase asmadmin 17940480 Oct 18 2015 snapcf_testdatabase1.f
-rw-rw---- 1 testdatabase asmadmin 1544 Sep 24 00:36 hc_testdatabase1.dat
node1[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ pwd
/u01/oracle/testdatabase/product/11.2.0.3/dbs
node1[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
2) unzip 1 and 2 using instance owner and create folder on both node
node1[/u01/oracle/testdatabase/product]$ mkdir 11.2.0.4
node1[/u01/oracle/testdatabase/product]$ ls -ltr
total 8
drwxr-xr-x 79 testdatabase dba 4096 Aug 18 15:55 11.2.0.3
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 01:03 11.2.0.4
node1[/u01/oracle/testdatabase/product]$
[node1:root:/home/root:] cd /u01/oracle/testdatabase/product
[node1:root:/u01/oracle/testdatabase/product:] ls -ltr
total 8
drwxr-xr-x 79 testdatabase dba 4096 Aug 18 15:55 11.2.0.3
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 01:03 11.2.0.4
[node1:root:/u01/oracle/testdatabase/product:] chown testdatabase:dba 11.2.0.4
[node1:root:/u01/oracle/testdatabase/product:] ls -ltr
total 8[node2:root:/u01/oracle/testdatabase/product:] ls -ltr
total 8
drwxr-xr-x 79 testdatabase dba 4096 Sep 24 00:24 11.2.0.3
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 01:09 11.2.0.4
[node2:root:/u01/oracle/testdatabase/product:]
drwxr-xr-x 79 testdatabase dba 4096 Aug 18 15:55 11.2.0.3
drwxr-xr-x 2 testdatabase dba 256 Sep 24 01:03 11.2.0.4
[node1:root:/u01/oracle/testdatabase/product:]
[node2:root:/u01/oracle/testdatabase/product:] ps -ef|grep pmon
root 30277668 14287024 0 01:13:17 pts/2 0:00 grep pmon
oracrs 30671086 1 0 Sep 05 - 3:52 asm_pmon_+ASM2
testdatabase 31916192 1 0 Sep 05 - 5:17 ora_pmon_testdatabase2
[node2:root:/u01/oracle/testdatabase/product:] ps -ef|grep tns
oracrs 5374024 1 0 Aug 01 - 0:08 /u02/oracle/11.2.0.3/grid/bin/tnslsnr listener_adm -inherit
oracrs 15269996 1 0 Sep 05 - 0:54 /u02/oracle/11.2.0.4/bin/tnslsnr LISTENER_SCAN1 -inherit
oracrs 21561432 1 0 Sep 05 - 1:15 /u02/oracle/11.2.0.4/bin/tnslsnr LISTENER -inherit
root 31064186 14287024 0 01:13:25 pts/2 0:00 grep tns
[node2:root:/u01/oracle/testdatabase/product:]
Check status of database
oracrs 5374024 1 0 Aug 01 - 0:08 /u02/oracle/11.2.0.3/grid/bin/tnslsnr listener_adm -inherit
oracrs 15269996 1 0 Sep 05 - 0:54 /u02/oracle/11.2.0.4/bin/tnslsnr LISTENER_SCAN1 -inherit
oracrs 21561432 1 0 Sep 05 - 1:15 /u02/oracle/11.2.0.4/bin/tnslsnr LISTENER -inherit
root 31064186 14287024 0 01:13:25 pts/2 0:00 grep tns
[node2:root:/u01/oracle/testdatabase/product:]
Check status of database
srvctl config database -d testdatabase -a
node1[/u02/oracle/11.2.0.3/grid]$ srvctl config database -d testdatabase -a
PRCD-1027 : Failed to retrieve database testdatabase
PRCD-1229 : An attempt to access configuration of database testdatabase was rejected because its version 11.2.0.3.0 differs from the program version 11.2.0.4.0. Instead run the program from /u01/oracle/testdatabase/product/11.2.0.3.
node1[/u02/oracle/11.2.0.3/grid]$
Database upgrade
-------------------
node1[/u02/oracle/11.2.0.3/grid]$ srvctl config database -d testdatabase -a
PRCD-1027 : Failed to retrieve database testdatabase
PRCD-1229 : An attempt to access configuration of database testdatabase was rejected because its version 11.2.0.3.0 differs from the program version 11.2.0.4.0. Instead run the program from /u01/oracle/testdatabase/product/11.2.0.3.
node1[/u02/oracle/11.2.0.3/grid]$
Database upgrade
-------------------
Backup of spfile
SQL>
SQL> create pfile='/backup/upgrade/ch11332/testdatabase1.ora' from spfile;
File created.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +TESTDATABASE_DATA1/testdatabase/spfil
etestdatabase.ora
SQL>
rwxr-xr-x 2 testdatabase dba 16384 May 10 2013 bin
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node2_testdatabase
drwxr-xr-x 8 testdatabase dba 4096 May 10 2013 install
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node1_testdatabase1
drwxr-xr-x 4 testdatabase dba 12288 May 16 2013 lib
-rw-r--r-- 1 testdatabase oinstall 125 Jun 07 2013 testdatabase1_node1.env
-rw-r--r-- 1 testdatabase oinstall 13226 Jun 16 2015 README.txt
drwxr----- 3 testdatabase oinstall 256 Oct 13 2015 node1_testdatabase
drwxr-xr-x 2 testdatabase dba 256 Sep 05 01:58 dbs
node1[/u01/oracle/testdatabase/product/11.2.0.3]$
and
drwxr-xr-x 2 testdatabase dba 20480 May 10 2013 bin
drwxr-xr-x 5 testdatabase dba 256 May 10 2013 log
drwxr-xr-x 3 testdatabase oinstall 256 May 10 2013 node1_testdatabase
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node2.retail2u.trcg.co.uk_testdatabase2
drwxr-xr-x 4 testdatabase dba 16384 May 16 2013 lib
-rw-r--r-- 1 testdatabase oinstall 126 Jun 03 2013 testdatabase2_node2.env
drwxr-xr-x 3 testdatabase oinstall 256 Jun 25 2013 node2_testdatabase
-rw-r--r-- 1 testdatabase oinstall 13226 Jun 16 2015 README.txt
drwxr-xr-x 2 testdatabase dba 256 Sep 05 02:15 dbs
drwxr-x--- 8 testdatabase oinstall 4096 Sep 24 00:24 .patch_storage
[node2:root:/u01/oracle/testdatabase/product/11.2.0.3:]
To check OCR backup
node1[/home/oracrs]$ . oraenv
ORACLE_SID = [+ASM1] ?
The Oracle base remains unchanged with value /u02/oracle/PRD
node1[/home/oracrs]$ ocrconfig -showbackup
node1 2016/09/23 22:28:42 /u02/oracle/11.2.0.4/cdata/blaze-cluster/backup00.ocr
node1 2016/09/23 18:28:41 /u02/oracle/11.2.0.4/cdata/blaze-cluster/backup01.ocr
node1 2016/09/23 14:28:38 /u02/oracle/11.2.0.4/cdata/blaze-cluster/backup02.ocr
node1 2016/09/22 14:28:33 /u02/oracle/11.2.0.4/cdata/blaze-cluster/day.ocr
node1 2016/09/16 10:28:08 /u02/oracle/11.2.0.4/cdata/blaze-cluster/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
node1[/home/oracrs]$
SQL> create pfile='/backup/upgrade/ch11332/testdatabase1.ora' from spfile;
File created.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +TESTDATABASE_DATA1/testdatabase/spfil
etestdatabase.ora
SQL>
rwxr-xr-x 2 testdatabase dba 16384 May 10 2013 bin
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node2_testdatabase
drwxr-xr-x 8 testdatabase dba 4096 May 10 2013 install
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node1_testdatabase1
drwxr-xr-x 4 testdatabase dba 12288 May 16 2013 lib
-rw-r--r-- 1 testdatabase oinstall 125 Jun 07 2013 testdatabase1_node1.env
-rw-r--r-- 1 testdatabase oinstall 13226 Jun 16 2015 README.txt
drwxr----- 3 testdatabase oinstall 256 Oct 13 2015 node1_testdatabase
drwxr-xr-x 2 testdatabase dba 256 Sep 05 01:58 dbs
node1[/u01/oracle/testdatabase/product/11.2.0.3]$
and
drwxr-xr-x 2 testdatabase dba 20480 May 10 2013 bin
drwxr-xr-x 5 testdatabase dba 256 May 10 2013 log
drwxr-xr-x 3 testdatabase oinstall 256 May 10 2013 node1_testdatabase
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node2.retail2u.trcg.co.uk_testdatabase2
drwxr-xr-x 4 testdatabase dba 16384 May 16 2013 lib
-rw-r--r-- 1 testdatabase oinstall 126 Jun 03 2013 testdatabase2_node2.env
drwxr-xr-x 3 testdatabase oinstall 256 Jun 25 2013 node2_testdatabase
-rw-r--r-- 1 testdatabase oinstall 13226 Jun 16 2015 README.txt
drwxr-xr-x 2 testdatabase dba 256 Sep 05 02:15 dbs
drwxr-x--- 8 testdatabase oinstall 4096 Sep 24 00:24 .patch_storage
[node2:root:/u01/oracle/testdatabase/product/11.2.0.3:]
To check OCR backup
node1[/home/oracrs]$ . oraenv
ORACLE_SID = [+ASM1] ?
The Oracle base remains unchanged with value /u02/oracle/PRD
node1[/home/oracrs]$ ocrconfig -showbackup
node1 2016/09/23 22:28:42 /u02/oracle/11.2.0.4/cdata/blaze-cluster/backup00.ocr
node1 2016/09/23 18:28:41 /u02/oracle/11.2.0.4/cdata/blaze-cluster/backup01.ocr
node1 2016/09/23 14:28:38 /u02/oracle/11.2.0.4/cdata/blaze-cluster/backup02.ocr
node1 2016/09/22 14:28:33 /u02/oracle/11.2.0.4/cdata/blaze-cluster/day.ocr
node1 2016/09/16 10:28:08 /u02/oracle/11.2.0.4/cdata/blaze-cluster/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
node1[/home/oracrs]$
To check VNC for
GUI installation
node1[/home/testdatabase]$
vncserver
New 'X' desktop is node1:4
Starting applications specified in /home/testdatabase/.vnc/xstartup
Log file is /home/testdatabase/.vnc/node1:4.log
node1[/home/testdatabase]$
SPFILE='+TESTDATABASE_DATA1/testdatabase/spfiletestdatabase.ora'
~
node1[/backup/upgrade/ch11332]$ pwd
/backup/upgrade/ch11332
node1[/backup/upgrade/ch11332]$
scp
frogatt[/oracle/CH9553]$ chmod 775 11204_home.tar utlu112i_11204_009.sql check_schema_stale_stats.sql
frogatt[/oracle/CH9553]$
scp utlu112i_11204_009.sql check_schema_stale_stats.sql
New 'X' desktop is node1:4
Starting applications specified in /home/testdatabase/.vnc/xstartup
Log file is /home/testdatabase/.vnc/node1:4.log
node1[/home/testdatabase]$
SPFILE='+TESTDATABASE_DATA1/testdatabase/spfiletestdatabase.ora'
~
node1[/backup/upgrade/ch11332]$ pwd
/backup/upgrade/ch11332
node1[/backup/upgrade/ch11332]$
scp
frogatt[/oracle/CH9553]$ chmod 775 11204_home.tar utlu112i_11204_009.sql check_schema_stale_stats.sql
frogatt[/oracle/CH9553]$
scp utlu112i_11204_009.sql check_schema_stale_stats.sql
username@10.160.45.73:/backup/upgrade/ch11332/
Before upgrade run the preupgrade tool to check the pre-requisites before proceeding upgrade which is available in new home. Fix as per output result
SQL> @utlu112i_11204_009.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 09-24-2016 00:54:39
Script Version: 11.2.0.4.0 Build: 009
.
**********************************************************************
Database:
**********************************************************************
--> name: TESTDATABASE
--> version: 11.2.0.3.0
--> compatible: 11.2.0.0.0
--> blocksize: 8192
--> platform: AIX-Based Systems (64-bit)
--> timezone file: V14
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 971 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 3130 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
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]
**********************************************************************
-- No obsolete parameters found. No changes are required
.
**********************************************************************
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] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] VALID
--> OLAP Catalog [upgrade] VALID
--> EM Repository [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] VALID
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
--> Oracle Application Express [upgrade] VALID
... APEX will only be upgraded if the version of APEX in
... the target Oracle home is higher than the current one.
--> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
<Note: Section can be empty if no such warnings are found.>
**********************************************************************
WARNING: --> The "cluster_database" parameter is currently "TRUE"
.... and must be set to "FALSE" prior to running a manual upgrade.
WARNING: --> Your recycle bin is turned on and currently contains no objects.
.... Because it is REQUIRED that the recycle bin be empty prior to upgrading
.... and your recycle bin is turned on, you may need to execute the command:
PURGE DBA_RECYCLEBIN
.... prior to executing your upgrade to confirm the recycle bin is empty.
WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
.... USER APEX_030200 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;
**********************************************************************
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
SQL>
Take backup of pfile from spfile
SQL> create pfile='/home/testdatabase/backup/inittestdatabase.ora' from memory;
File created.
SQL>
SQL> alter database backup controlfile to trace as '/home/testdatabase/backup/control1.trc';
Database altered.
SQL> set head on feed on pagesize 200 linesize 200
SQL> SELECT MIN(snap_id),
2 max(snap_id) ,
3 cast(min(begin_time) as date) "Min Begin Time",
4 CAST(MAX(begin_time) AS DATE) "Max Begin Time",
5 COUNT(*)
6 FROM sys.wrm$_snapshot_details a
7 WHERE NOT EXISTS
8 (SELECT *
9 FROM sys.wrm$_snapshot b
10 WHERE b.snap_id = a.snap_id
11 AND a.dbid = b.dbid
and a.instance_number = b.instance_number
12 13 );
MIN(SNAP_ID) MAX(SNAP_ID) Min Begin Max Begin COUNT(*)
------------ ------------ --------- --------- ----------
1 29528 10-MAY-13 24-AUG-16 5064710
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
PL/SQL procedure successfully completed.
SQL> purge DBA_RECYCLEBIN;
DBA Recyclebin purged.
SQL> truncate table SYS.AUD$;
Table truncated.
**********************************************************************
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
node1[/home/username]$ sudo su - testdatabase
node1[/home/testdatabase]$
node1[/home/testdatabase]$ echo $ORACLE_HOME
/u01/oracle/testdatabase/product/11.2.0.3
node1[/home/testdatabase]$ vi .profile
node1[/home/testdatabase]$ id
uid=212(testdatabase) gid=207(oinstall) groups=1(staff),203(dba),206(gprd),220(controlm),212(asmdba)
node1[/home/testdatabase]$ exit
node1[/home/username]$ sudo su - testdatabase
node1[/home/testdatabase]$
node1[/home/testdatabase]$ echo $ORACLE_HOME
/u01/oracle/testdatabase/product/11.2.0.4
node1[/home/testdatabase]$
Implementation
1. Shutdown database and setting new environment variable (11.2.0.4) home.Set Appropriate ENV variables like ORACLE_HOME, PATH, ORACLE_SID
Before upgrade run the preupgrade tool to check the pre-requisites before proceeding upgrade which is available in new home. Fix as per output result
SQL> @utlu112i_11204_009.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 09-24-2016 00:54:39
Script Version: 11.2.0.4.0 Build: 009
.
**********************************************************************
Database:
**********************************************************************
--> name: TESTDATABASE
--> version: 11.2.0.3.0
--> compatible: 11.2.0.0.0
--> blocksize: 8192
--> platform: AIX-Based Systems (64-bit)
--> timezone file: V14
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 971 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 3130 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
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]
**********************************************************************
-- No obsolete parameters found. No changes are required
.
**********************************************************************
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] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] VALID
--> OLAP Catalog [upgrade] VALID
--> EM Repository [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] VALID
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
--> Oracle Application Express [upgrade] VALID
... APEX will only be upgraded if the version of APEX in
... the target Oracle home is higher than the current one.
--> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
<Note: Section can be empty if no such warnings are found.>
**********************************************************************
WARNING: --> The "cluster_database" parameter is currently "TRUE"
.... and must be set to "FALSE" prior to running a manual upgrade.
WARNING: --> Your recycle bin is turned on and currently contains no objects.
.... Because it is REQUIRED that the recycle bin be empty prior to upgrading
.... and your recycle bin is turned on, you may need to execute the command:
PURGE DBA_RECYCLEBIN
.... prior to executing your upgrade to confirm the recycle bin is empty.
WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
.... USER APEX_030200 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;
**********************************************************************
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
SQL>
Take backup of pfile from spfile
SQL> create pfile='/home/testdatabase/backup/inittestdatabase.ora' from memory;
File created.
SQL>
SQL> alter database backup controlfile to trace as '/home/testdatabase/backup/control1.trc';
Database altered.
SQL> set head on feed on pagesize 200 linesize 200
SQL> SELECT MIN(snap_id),
2 max(snap_id) ,
3 cast(min(begin_time) as date) "Min Begin Time",
4 CAST(MAX(begin_time) AS DATE) "Max Begin Time",
5 COUNT(*)
6 FROM sys.wrm$_snapshot_details a
7 WHERE NOT EXISTS
8 (SELECT *
9 FROM sys.wrm$_snapshot b
10 WHERE b.snap_id = a.snap_id
11 AND a.dbid = b.dbid
and a.instance_number = b.instance_number
12 13 );
MIN(SNAP_ID) MAX(SNAP_ID) Min Begin Max Begin COUNT(*)
------------ ------------ --------- --------- ----------
1 29528 10-MAY-13 24-AUG-16 5064710
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
PL/SQL procedure successfully completed.
SQL> purge DBA_RECYCLEBIN;
DBA Recyclebin purged.
SQL> truncate table SYS.AUD$;
Table truncated.
**********************************************************************
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
node1[/home/username]$ sudo su - testdatabase
node1[/home/testdatabase]$
node1[/home/testdatabase]$ echo $ORACLE_HOME
/u01/oracle/testdatabase/product/11.2.0.3
node1[/home/testdatabase]$ vi .profile
node1[/home/testdatabase]$ id
uid=212(testdatabase) gid=207(oinstall) groups=1(staff),203(dba),206(gprd),220(controlm),212(asmdba)
node1[/home/testdatabase]$ exit
node1[/home/username]$ sudo su - testdatabase
node1[/home/testdatabase]$
node1[/home/testdatabase]$ echo $ORACLE_HOME
/u01/oracle/testdatabase/product/11.2.0.4
node1[/home/testdatabase]$
Implementation
1. Shutdown database and setting new environment variable (11.2.0.4) home.Set Appropriate ENV variables like ORACLE_HOME, PATH, ORACLE_SID
cd $ORACLE_HOME (new oracle home)
export ORACLE_SID=testdatabase
export ORACLE_HOME=/u05/oracle/FSPPT/product/11.2.0.4/
copy init.ora parameter file to 11.2.0.4 ORACLE_HOME
/backup/database_upgrade/CH10042/initfsprod.ora
2) Start the database using new oracle home in upgrade Mode.
it should be run from one node if it is RAC Database
and execute "catupgrd.sql"
export ORACLE_SID=testdatabase
export ORACLE_HOME=/backup/upgrade/ch11332/testdatabase1.ora
cd $ORACLE_HOME/rdbms/admin
$sqlplus "/as sysdba"
startup UPGRADE pfile=/backup/upgrade/ch11332/testdatabase1.ora
spool cat.log
@$ORACLE_HOME/rdbms/admin/catupgrd.sql
spool off
or
nohup sqlplus -S "/ as sysdba" @$ORACLE_HOME/rdbms/admin/catupgrd.sql &
node1[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ ls -ltr
total 35080
-rw-r--r-- 1 testdatabase dba 2851 May 15 2009 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase1
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase1.ora
-rw-r--r-- 1 testdatabase asmadmin 1020 Jun 11 2013 dsierror.log
-rw-r----- 1 testdatabase asmadmin 17940480 Oct 18 2015 snapcf_testdatabase1.f
-rw-rw---- 1 testdatabase asmadmin 1544 Sep 24 03:58 hc_testdatabase1.dat
node1[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
cd /u01/oracle/testdatabase/product/11.2.0.4/dbs
cp -p /u01/oracle/testdatabase/product/11.2.0.3/dbs/init.ora orapwtestdatabase1 inittestdatabase1.ora dsierror.log snapcf_testdatabase1.f hc_testdatabase1.dat /u01/oracle/testdatabase/product/11.2.0.4/dbs/
ls -ltr /u01/oracle/testdatabase/product/11.2.0.4/dbs
========
drwxr-xr-x 2 testdatabase dba 16384 May 10 2013 bin
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node2_testdatabase
drwxr-xr-x 8 testdatabase dba 4096 May 10 2013 install
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node1_testdatabase1
drwxr-xr-x 4 testdatabase dba 12288 May 16 2013 lib
-rw-r--r-- 1 testdatabase oinstall 125 Jun 07 2013 testdatabase1_node1.env
-rw-r--r-- 1 testdatabase oinstall 13226 Jun 16 2015 README.txt
drwxr----- 3 testdatabase oinstall 256 Oct 13 2015 node1_testdatabase
drwxr-xr-x 2 testdatabase dba 256 Sep 24 03:58 dbs
node1[/u01/oracle/testdatabase/product/11.2.0.3]$
ls -ltr /u01/oracle/testdatabase/product/11.2.0.4
cp testdatabase1_node1.env /u01/oracle/testdatabase/product/11.2.0.4/
on Second Node
==============
node2[/u01/oracle/testdatabase/product/11.2.0.4]$ cd ..
node2[/u01/oracle/testdatabase/product]$ ls -ltr
total 16
drwxr-xr-x 74 testdatabase dba 4096 Sep 24 02:53 11.2.0.4
drwxr-xr-x 79 testdatabase dba 4096 Sep 24 03:16 11.2.0.3
node2[/u01/oracle/testdatabase/product]$ cd 11.2.0.3
node2[/u01/oracle/testdatabase/product/11.2.0.3]$ cd dbs
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ ls -ltr
total 35080
-rw-r--r-- 1 testdatabase dba 2851 May 10 2013 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase2
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase2.ora
-rw-r----- 1 testdatabase asmadmin 17940480 Sep 23 23:47 snapcf_testdatabase2.f
-rw-rw---- 1 testdatabase asmadmin 1544 Sep 24 03:58 hc_testdatabase2.dat
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
ls -ltr /u01/oracle/testdatabase/product/11.2.0.4/dbs
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ cp -p init.ora orapwtestdatabase2 inittestdatabase2.ora snapcf_testdatabase2.f hc_testdatabase2.dat /u01/oracle/testdatabase/product/11.2.0.4/dbs/
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ /u01/oracle/testdatabase/product/11.2.0.4/dbs
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ ls -ltr
total 35080
-rw-r--r-- 1 testdatabase dba 2851 May 10 2013 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase2
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase2.ora
-rw-r----- 1 testdatabase asmadmin 17940480 Sep 23 23:47 snapcf_testdatabase2.f
-rw-rw---- 1 testdatabase asmadmin 1544 Sep 24 03:58 hc_testdatabase2.dat
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ ls -ltr /u01/oracle/testdatabase/product/11.2.0.4/dbs
total 35088
-rw-r--r-- 1 testdatabase dba 2851 May 10 2013 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase2
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase2.ora
-rw-r----- 1 testdatabase oinstall 17940480 Sep 23 23:47 snapcf_testdatabase2.f
-rw-r--r-- 1 testdatabase oinstall 2851 Sep 24 02:57 init.ora_bk
-rw-rw---- 1 testdatabase oinstall 1544 Sep 24 03:58 hc_testdatabase2.dat
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/dbs:] cd ..
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4:] cd ..
[node2:root:/u01/oracle/testdatabase/product:] cd 11
[node2:root:/u01/oracle/testdatabase/product:] cd 11.2.0.4
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4:] cd network
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network:] cd admin
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] ls -ltr
total 24
-rw-r--r-- 1 testdatabase oinstall 562 May 31 2013 tnsnames.ora
-rw-r--r-- 1 testdatabase oinstall 718 Jun 20 2013 listener.ora
-rw-r--r-- 1 testdatabase oinstall 381 Sep 24 03:00 shrept.lst
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 03:00 samples
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] /u01/oracle/testdatabase/product/11.2.0.3/network/admin
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] ls -ltr /u01/oracle/testdatabase/product/11.2.0.3/network/admin
total 24
-rw-r--r-- 1 testdatabase dba 205 May 10 2013 shrept.lst
drwxr-xr-x 2 testdatabase dba 256 May 10 2013 samples
drwxr-xr-x 2 testdatabase oinstall 256 May 31 2013 archive
-rw-r--r-- 1 testdatabase oinstall 562 May 31 2013 tnsnames.ora
-rw-r--r-- 1 root system 718 Jun 20 2013 listener.ora
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] chown root:system listener.ora
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] ls -ltr
total 24
-rw-r--r-- 1 testdatabase oinstall 562 May 31 2013 tnsnames.ora
-rw-r--r-- 1 root system 718 Jun 20 2013 listener.ora
-rw-r--r-- 1 testdatabase oinstall 381 Sep 24 03:00 shrept.lst
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 03:00 samples
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:]
drwxr-xr-x 8 testdatabase dba 4096 May 10 2013 install
drwxr-xr-x 2 testdatabase dba 20480 May 10 2013 bin
drwxr-xr-x 5 testdatabase dba 256 May 10 2013 log
drwxr-xr-x 3 testdatabase oinstall 256 May 10 2013 node1_testdatabase
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node2.retail2u.trcg.co.uk_testdatabase2
drwxr-xr-x 4 testdatabase dba 16384 May 16 2013 lib
-rw-r--r-- 1 testdatabase oinstall 126 Jun 03 2013 testdatabase2_node2.env
drwxr-xr-x 3 testdatabase oinstall 256 Jun 25 2013 node2_testdatabase
-rw-r--r-- 1 testdatabase oinstall 13226 Jun 16 2015 README.txt
drwxr-xr-x 2 testdatabase dba 256 Sep 24 03:58 dbs
node2[/u01/oracle/testdatabase/product/11.2.0.3]$
----------
-rw-r--r-- 1 testdatabase oinstall 54643086 May 10 2013 libclntsh.a
-rwxr-xr-x 1 testdatabase oinstall 70600591 May 10 2013 libttsh11.so
lrwxrwxrwx 1 testdatabase oinstall 12 May 10 2013 libclntsh.so.10.1 -> libclntsh.so
-rw-r--r-- 1 testdatabase oinstall 2246 May 10 2013 agtsh.exp
-rw-r--r-- 1 testdatabase oinstall 47338095 May 10 2013 libagtsh.a
lrwxrwxrwx 1 testdatabase oinstall 19 May 16 2013 libobk.a -> /usr/lib/libobk64.a
node2[/u01/oracle/testdatabase/product/11.2.0.3/lib]$
ln -s /usr/lib/libobk64.a libobk.a
-rwxr-xr-x 1 testdatabase oinstall 70243219 Sep 24 02:59 libttsh11.so
drwxr-xr-x 2 testdatabase oinstall 4096 Sep 24 02:59 stubs
lrwxrwxrwx 1 testdatabase oinstall 19 Sep 24 05:27 libobk.a -> /usr/lib/libobk64.a
node2[/u01/oracle/testdatabase/product/11.2.0.4/lib]$
ls -ltr /u01/oracle/testdatabase/product/11.2.0.3/lib
--------------
Step 5.Startup the upgraded database and follow post upgrade task.
srvctl upgrade database -d db-unique-name -o oraclehome
srvctl upgrade database -d testdatabase -o /u01/oracle/testdatabase/product/11.2.0.4
srvctl start database -d testdatabase
Note: Need to take database to ARCHIVE LOG MODE
Step 6. Run the postupgrade script utlu112s.sql to display the results of the upgrade and run catuppst.sql to finish the upgrade.
@$ORACLE_HOME/rdbms/admin/utlu112s.sql
SQL>
SQL> @$ORACLE_HOME/rdbms/admin/utlu112s.sql
.
Oracle Database 11.2 Post-Upgrade Status Tool 09-24-2016 05:34:53
.
Component Current Version Elapsed Time
Name Status Number HH:MM:SS
.
Oracle Server
. VALID 11.2.0.4.0 00:14:55
JServer JAVA Virtual Machine
. VALID 11.2.0.4.0 00:06:03
Oracle Real Application Clusters
. VALID 11.2.0.4.0 00:00:01
Oracle Workspace Manager
. VALID 11.2.0.4.0 00:00:40
OLAP Analytic Workspace
. VALID 11.2.0.4.0 00:00:18
OLAP Catalog
. VALID 11.2.0.4.0 00:00:50
Oracle OLAP API
. VALID 11.2.0.4.0 00:00:24
Oracle Enterprise Manager
. VALID 11.2.0.4.0 00:02:05
Oracle XDK
. VALID 11.2.0.4.0 00:00:52
Oracle Text
. VALID 11.2.0.4.0 00:00:31
Oracle XML Database
. VALID 11.2.0.4.0 00:03:18
Oracle Database Java Packages
. VALID 11.2.0.4.0 00:00:16
Oracle Multimedia
. VALID 11.2.0.4.0 00:03:05
Spatial
. VALID 11.2.0.4.0 00:02:36
Oracle Expression Filter
. VALID 11.2.0.4.0 00:00:14
Oracle Rules Manager
. VALID 11.2.0.4.0 00:00:09
Oracle Application Express
. VALID 3.2.1.00.12
Final Actions
. 00:00:02
Total Upgrade Time: 00:36:27
PL/SQL procedure successfully completed.
@$ORACLE_HOME/rdbms/admin/catuppst.sql
Finally run utlrp.sql to recompile any remaining stored PL/SQL and Java code and verify that all expected packages and classes are valid:
export ORACLE_HOME=/backup/upgrade/ch11332/testdatabase1.ora
cd $ORACLE_HOME/rdbms/admin
$sqlplus "/as sysdba"
startup UPGRADE pfile=/backup/upgrade/ch11332/testdatabase1.ora
spool cat.log
@$ORACLE_HOME/rdbms/admin/catupgrd.sql
spool off
or
nohup sqlplus -S "/ as sysdba" @$ORACLE_HOME/rdbms/admin/catupgrd.sql &
node1[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ ls -ltr
total 35080
-rw-r--r-- 1 testdatabase dba 2851 May 15 2009 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase1
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase1.ora
-rw-r--r-- 1 testdatabase asmadmin 1020 Jun 11 2013 dsierror.log
-rw-r----- 1 testdatabase asmadmin 17940480 Oct 18 2015 snapcf_testdatabase1.f
-rw-rw---- 1 testdatabase asmadmin 1544 Sep 24 03:58 hc_testdatabase1.dat
node1[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
cd /u01/oracle/testdatabase/product/11.2.0.4/dbs
cp -p /u01/oracle/testdatabase/product/11.2.0.3/dbs/init.ora orapwtestdatabase1 inittestdatabase1.ora dsierror.log snapcf_testdatabase1.f hc_testdatabase1.dat /u01/oracle/testdatabase/product/11.2.0.4/dbs/
ls -ltr /u01/oracle/testdatabase/product/11.2.0.4/dbs
========
drwxr-xr-x 2 testdatabase dba 16384 May 10 2013 bin
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node2_testdatabase
drwxr-xr-x 8 testdatabase dba 4096 May 10 2013 install
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node1_testdatabase1
drwxr-xr-x 4 testdatabase dba 12288 May 16 2013 lib
-rw-r--r-- 1 testdatabase oinstall 125 Jun 07 2013 testdatabase1_node1.env
-rw-r--r-- 1 testdatabase oinstall 13226 Jun 16 2015 README.txt
drwxr----- 3 testdatabase oinstall 256 Oct 13 2015 node1_testdatabase
drwxr-xr-x 2 testdatabase dba 256 Sep 24 03:58 dbs
node1[/u01/oracle/testdatabase/product/11.2.0.3]$
ls -ltr /u01/oracle/testdatabase/product/11.2.0.4
cp testdatabase1_node1.env /u01/oracle/testdatabase/product/11.2.0.4/
on Second Node
==============
node2[/u01/oracle/testdatabase/product/11.2.0.4]$ cd ..
node2[/u01/oracle/testdatabase/product]$ ls -ltr
total 16
drwxr-xr-x 74 testdatabase dba 4096 Sep 24 02:53 11.2.0.4
drwxr-xr-x 79 testdatabase dba 4096 Sep 24 03:16 11.2.0.3
node2[/u01/oracle/testdatabase/product]$ cd 11.2.0.3
node2[/u01/oracle/testdatabase/product/11.2.0.3]$ cd dbs
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ ls -ltr
total 35080
-rw-r--r-- 1 testdatabase dba 2851 May 10 2013 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase2
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase2.ora
-rw-r----- 1 testdatabase asmadmin 17940480 Sep 23 23:47 snapcf_testdatabase2.f
-rw-rw---- 1 testdatabase asmadmin 1544 Sep 24 03:58 hc_testdatabase2.dat
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
ls -ltr /u01/oracle/testdatabase/product/11.2.0.4/dbs
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ cp -p init.ora orapwtestdatabase2 inittestdatabase2.ora snapcf_testdatabase2.f hc_testdatabase2.dat /u01/oracle/testdatabase/product/11.2.0.4/dbs/
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ /u01/oracle/testdatabase/product/11.2.0.4/dbs
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ ls -ltr
total 35080
-rw-r--r-- 1 testdatabase dba 2851 May 10 2013 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase2
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase2.ora
-rw-r----- 1 testdatabase asmadmin 17940480 Sep 23 23:47 snapcf_testdatabase2.f
-rw-rw---- 1 testdatabase asmadmin 1544 Sep 24 03:58 hc_testdatabase2.dat
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$ ls -ltr /u01/oracle/testdatabase/product/11.2.0.4/dbs
total 35088
-rw-r--r-- 1 testdatabase dba 2851 May 10 2013 init.ora
-rw-r----- 1 testdatabase oinstall 1536 May 10 2013 orapwtestdatabase2
-rw-r----- 1 testdatabase oinstall 53 May 10 2013 inittestdatabase2.ora
-rw-r----- 1 testdatabase oinstall 17940480 Sep 23 23:47 snapcf_testdatabase2.f
-rw-r--r-- 1 testdatabase oinstall 2851 Sep 24 02:57 init.ora_bk
-rw-rw---- 1 testdatabase oinstall 1544 Sep 24 03:58 hc_testdatabase2.dat
node2[/u01/oracle/testdatabase/product/11.2.0.3/dbs]$
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/dbs:] cd ..
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4:] cd ..
[node2:root:/u01/oracle/testdatabase/product:] cd 11
[node2:root:/u01/oracle/testdatabase/product:] cd 11.2.0.4
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4:] cd network
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network:] cd admin
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] ls -ltr
total 24
-rw-r--r-- 1 testdatabase oinstall 562 May 31 2013 tnsnames.ora
-rw-r--r-- 1 testdatabase oinstall 718 Jun 20 2013 listener.ora
-rw-r--r-- 1 testdatabase oinstall 381 Sep 24 03:00 shrept.lst
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 03:00 samples
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] /u01/oracle/testdatabase/product/11.2.0.3/network/admin
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] ls -ltr /u01/oracle/testdatabase/product/11.2.0.3/network/admin
total 24
-rw-r--r-- 1 testdatabase dba 205 May 10 2013 shrept.lst
drwxr-xr-x 2 testdatabase dba 256 May 10 2013 samples
drwxr-xr-x 2 testdatabase oinstall 256 May 31 2013 archive
-rw-r--r-- 1 testdatabase oinstall 562 May 31 2013 tnsnames.ora
-rw-r--r-- 1 root system 718 Jun 20 2013 listener.ora
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] chown root:system listener.ora
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:] ls -ltr
total 24
-rw-r--r-- 1 testdatabase oinstall 562 May 31 2013 tnsnames.ora
-rw-r--r-- 1 root system 718 Jun 20 2013 listener.ora
-rw-r--r-- 1 testdatabase oinstall 381 Sep 24 03:00 shrept.lst
drwxr-xr-x 2 testdatabase oinstall 256 Sep 24 03:00 samples
[node2:root:/u01/oracle/testdatabase/product/11.2.0.4/network/admin:]
drwxr-xr-x 8 testdatabase dba 4096 May 10 2013 install
drwxr-xr-x 2 testdatabase dba 20480 May 10 2013 bin
drwxr-xr-x 5 testdatabase dba 256 May 10 2013 log
drwxr-xr-x 3 testdatabase oinstall 256 May 10 2013 node1_testdatabase
drwxr----- 3 testdatabase oinstall 256 May 10 2013 node2.retail2u.trcg.co.uk_testdatabase2
drwxr-xr-x 4 testdatabase dba 16384 May 16 2013 lib
-rw-r--r-- 1 testdatabase oinstall 126 Jun 03 2013 testdatabase2_node2.env
drwxr-xr-x 3 testdatabase oinstall 256 Jun 25 2013 node2_testdatabase
-rw-r--r-- 1 testdatabase oinstall 13226 Jun 16 2015 README.txt
drwxr-xr-x 2 testdatabase dba 256 Sep 24 03:58 dbs
node2[/u01/oracle/testdatabase/product/11.2.0.3]$
----------
-rw-r--r-- 1 testdatabase oinstall 54643086 May 10 2013 libclntsh.a
-rwxr-xr-x 1 testdatabase oinstall 70600591 May 10 2013 libttsh11.so
lrwxrwxrwx 1 testdatabase oinstall 12 May 10 2013 libclntsh.so.10.1 -> libclntsh.so
-rw-r--r-- 1 testdatabase oinstall 2246 May 10 2013 agtsh.exp
-rw-r--r-- 1 testdatabase oinstall 47338095 May 10 2013 libagtsh.a
lrwxrwxrwx 1 testdatabase oinstall 19 May 16 2013 libobk.a -> /usr/lib/libobk64.a
node2[/u01/oracle/testdatabase/product/11.2.0.3/lib]$
ln -s /usr/lib/libobk64.a libobk.a
-rwxr-xr-x 1 testdatabase oinstall 70243219 Sep 24 02:59 libttsh11.so
drwxr-xr-x 2 testdatabase oinstall 4096 Sep 24 02:59 stubs
lrwxrwxrwx 1 testdatabase oinstall 19 Sep 24 05:27 libobk.a -> /usr/lib/libobk64.a
node2[/u01/oracle/testdatabase/product/11.2.0.4/lib]$
ls -ltr /u01/oracle/testdatabase/product/11.2.0.3/lib
--------------
Step 5.Startup the upgraded database and follow post upgrade task.
srvctl upgrade database -d db-unique-name -o oraclehome
srvctl upgrade database -d testdatabase -o /u01/oracle/testdatabase/product/11.2.0.4
srvctl start database -d testdatabase
Note: Need to take database to ARCHIVE LOG MODE
Step 6. Run the postupgrade script utlu112s.sql to display the results of the upgrade and run catuppst.sql to finish the upgrade.
@$ORACLE_HOME/rdbms/admin/utlu112s.sql
SQL>
SQL> @$ORACLE_HOME/rdbms/admin/utlu112s.sql
.
Oracle Database 11.2 Post-Upgrade Status Tool 09-24-2016 05:34:53
.
Component Current Version Elapsed Time
Name Status Number HH:MM:SS
.
Oracle Server
. VALID 11.2.0.4.0 00:14:55
JServer JAVA Virtual Machine
. VALID 11.2.0.4.0 00:06:03
Oracle Real Application Clusters
. VALID 11.2.0.4.0 00:00:01
Oracle Workspace Manager
. VALID 11.2.0.4.0 00:00:40
OLAP Analytic Workspace
. VALID 11.2.0.4.0 00:00:18
OLAP Catalog
. VALID 11.2.0.4.0 00:00:50
Oracle OLAP API
. VALID 11.2.0.4.0 00:00:24
Oracle Enterprise Manager
. VALID 11.2.0.4.0 00:02:05
Oracle XDK
. VALID 11.2.0.4.0 00:00:52
Oracle Text
. VALID 11.2.0.4.0 00:00:31
Oracle XML Database
. VALID 11.2.0.4.0 00:03:18
Oracle Database Java Packages
. VALID 11.2.0.4.0 00:00:16
Oracle Multimedia
. VALID 11.2.0.4.0 00:03:05
Spatial
. VALID 11.2.0.4.0 00:02:36
Oracle Expression Filter
. VALID 11.2.0.4.0 00:00:14
Oracle Rules Manager
. VALID 11.2.0.4.0 00:00:09
Oracle Application Express
. VALID 3.2.1.00.12
Final Actions
. 00:00:02
Total Upgrade Time: 00:36:27
PL/SQL procedure successfully completed.
@$ORACLE_HOME/rdbms/admin/catuppst.sql
Finally run utlrp.sql to recompile any remaining stored PL/SQL and Java code and verify that all expected packages and classes are valid:
Recompile objects
@$ORACLE_HOME/rdbms/admin/utlrp.sql
or@?/rdbms/admin/utlrp.sql
connect catalog rmc_TESTDATABASE/TESTDATABASE_rmc@catalogdatabase;
7) upgrade Catalog and run two times
RMAN> connect catalog rmc_TESTDATABASE/TESTDATABASE_rmc@catalogdatabase;
connected to recovery catalog database
PL/SQL package RMC_TESTDATABASE.DBMS_RCVCAT version 11.02.00.03 in RCVCAT database is not current
PL/SQL package RMC_TESTDATABASE.DBMS_RCVMAN version 11.02.00.03 in RCVCAT database is not current
RMAN> connect target
connected to target database: TESTDATABASE (DBID=3696135459)
RMAN> upgrade catalog;
recovery catalog owner is RMC_TESTDATABASE
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> exit
RMAN> connect catalog rmc_TESTDATABASE/TESTDATABASE_rmc@catalogdatabase;
connected to recovery catalog database
PL/SQL package RMC_TESTDATABASE.DBMS_RCVCAT version 11.02.00.03 in RCVCAT database is not current
PL/SQL package RMC_TESTDATABASE.DBMS_RCVMAN version 11.02.00.03 in RCVCAT database is not current
RMAN> connect target
connected to target database: TESTDATABASE (DBID=3696135459)
RMAN> upgrade catalog;
recovery catalog owner is RMC_TESTDATABASE
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> upgrade catalog;
recovery catalog upgraded to version 11.02.00.04
DBMS_RCVMAN package upgraded to version 11.02.00.04
DBMS_RCVCAT package upgraded to version 11.02.00.04
RMAN>
RMAN> exit
Recovery Manager complete.
Database Health check
Recovery Manager complete.
node1[/home/testdatabase]$
node1[/home/testdatabase]$ srvctl status database -d testdatabase
node1[/home/username]$ sudo su - oracrs
node1[/home/oracrs]$ srvctl config database -d testdatabase -a
Database unique name: testdatabase
Database name: testdatabase
Oracle home: /u01/oracle/testdatabase/product/11.2.0.4
Oracle user: testdatabase
Spfile: +TESTDATABASE_DATA1/testdatabase/spfiletestdatabase.ora
Domain: world
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: testdatabase
Database instances: testdatabase2,testdatabase1
Disk Groups: TESTDATABASE_DATA1,TESTDATABASE_FRA1,TESTDATABASE_REDO1,TESTDATABASE_REDO2
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed
node1[/home/oracrs]$
No comments:
Post a Comment