Thursday, December 21, 2017

Database Upgrade from 11204 to 12102 Using DBUA

Hai, this article will illustrate you how to upgrade your oracle database from 11204 to 12102 on linux Platform using dbua.

Assumptions:
11g ORACLE_HOME:  /u01/app/oracle/product/11.2.0/dbhome_1
12c ORACLE_HOME:  /u01/app/oracle/product/12.1.0/dbhome_1


Assumptions:
Machine
IP Address
DB Name
SID
Listener
RAC1
192.168.1.11
DELL
DELL
DELL

[root@rac1 ~]#
[root@rac1 ~]# lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: EnterpriseEnterpriseServer
Description:    Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Release:        5.7
Codename:       Carthage
[root@rac1 ~]#
[root@rac1 ~]# arch
x86_64
[root@rac1 ~]#
[root@rac1 ~]# cat /etc/oratab
#



# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#

DELL:/u01/app/oracle/product/11.2.0/dbhome_1:N
[root@rac1 ~]#
[root@rac1 ~]# ps -ef | grep pmon
oracle   10403     1  0 08:36 ?        00:00:00 ora_pmon_DELL
root     10862  4501  0 08:41 pts/1    00:00:00 grep pmon
[root@rac1 ~]#

Oracle Database (DELL) details:
[root@rac1 ~]#
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ . dell.env
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Dec 21 12:30:50 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>


SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/11.2.0
                                                 /dbhome_1/dbs/spfileDELL.ora
SQL>
SQL> select NAME, OPEN_MODE, PLATFORM_NAME from v$database;

NAME      OPEN_MODE            PLATFORM_NAME
--------- -------------------- -------------------------------
DELL      READ WRITE           Linux x86 64-bit

SQL>

Components Validity Check
SQL>
SQL> col COMP_NAME for a38
SQL> col VERSION for a15
SQL> select COMP_NAME,VERSION,STATUS from dba_registry;

COMP_NAME                              VERSION         STATUS
-------------------------------------- --------------- -----------
OWB                                    11.2.0.4.0      VALID
Oracle Application Express             3.2.1.00.12     VALID
Oracle Enterprise Manager              11.2.0.4.0      VALID
OLAP Catalog                           11.2.0.4.0      VALID
Spatial                                11.2.0.4.0      VALID
Oracle Multimedia                      11.2.0.4.0      VALID
Oracle XML Database                    11.2.0.4.0      VALID
Oracle Text                            11.2.0.4.0      VALID
Oracle Expression Filter               11.2.0.4.0      VALID
Oracle Rules Manager                   11.2.0.4.0      VALID
Oracle Workspace Manager               11.2.0.4.0      VALID

COMP_NAME                              VERSION         STATUS
-------------------------------------- --------------- -----------
Oracle Database Catalog Views          11.2.0.4.0      VALID
Oracle Database Packages and Types     11.2.0.4.0      VALID
JServer JAVA Virtual Machine           11.2.0.4.0      VALID
Oracle XDK                             11.2.0.4.0      VALID
Oracle Database Java Packages          11.2.0.4.0      VALID
OLAP Analytic Workspace                11.2.0.4.0      VALID
Oracle OLAP API                        11.2.0.4.0      VALID

18 rows selected.

SQL>
SQL>
SQL> select INSTANCE_NAME, VERSION from v$instance;

INSTANCE_NAME    VERSION
---------------- ---------------
DELL             11.2.0.4.0

SQL>
SQL>
SQL>
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE    11.2.0.4.0      Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

SQL>
SQL>
SQL>
SQL> col PRODUCT for a20;
SQL> col version for a12;
SQL> col STATUS for a20;
SQL> select * from product_component_version;

PRODUCT              VERSION      STATUS
-------------------- ------------ --------------------
NLSRTL               11.2.0.4.0   Production
Oracle Database 11g  11.2.0.4.0   64bit Production
Enterprise Edition

PL/SQL               11.2.0.4.0   Production
TNS for Linux:       11.2.0.4.0   Production

SQL>
SQL> col platform_name format a35;
SQL> select platform_id, platform_name from v$database;

PLATFORM_ID PLATFORM_NAME
----------- -----------------------------------
         13 Linux x86 64-bit

SQL>
SQL>
SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      11.2.0.4.0
SQL>
SQL>

Archive Mode Status
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch
Oldest online log sequence     1
Current log sequence           2
SQL>

C – R – D Files
SQL> select name,controlfile_type,open_mode from v$database;

NAME      CONTROL OPEN_MODE
--------- ------- --------------------
DELL      CURRENT READ WRITE

SQL>SQL>
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/DELL/control01.ctl
/u01/app/oracle/DELL/control02.ctl

SQL>
SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/DELL/redo03.log
/u01/app/oracle/DELL/redo02.log
/u01/app/oracle/DELL/redo01.log


SQL>
SQL> col tablespace_name for a20
SQL> select tablespace_name,file_name from dba_data_files;

TABLESPACE_NAME      FILE_NAME
-------------------- ----------------------------------------
USERS                /u01/app/oracle/DELL/users01.dbf
UNDOTBS1             /u01/app/oracle/DELL/undotbs01.dbf
SYSAUX               /u01/app/oracle/DELL/sysaux01.dbf
SYSTEM               /u01/app/oracle/DELL/system01.dbf

SQL>
SQL>

SQL>
SQL> select name from v$tempfile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/DELL/temp01.dbf

SQL>
SQL>
SQL>
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cat 12102.env
export ORACLE_SID=DELL
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib/usr/lib; export LD_LIBRARY_PATH
[oracle@rac1 ~]$
[oracle@rac1 ~]$ . 12102.env
[oracle@rac1 ~]$

Linux Installation of Oracle Database 12C(12.1.0.2)
[root@rac1 ~]#
[root@rac1 ~]# xhost +
access control disabled, clients can connect from any host
[root@rac1 ~]#
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ cd /u01/sftwr_12102/database/
[oracle@rac1 database]$
[oracle@rac1 database]$ ls
install      response  runInstaller  stage
readme.html  rpm       sshsetup      welcome.html
[oracle@rac1 database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 27372 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 29996 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-12-21_12-46-12PM. Please wait ...[oracle@rac1 database]$ You can find the log of this install session at:
 /u01/app/oraInventory/logs/installActions2017-12-21_12-46-12PM.log








Upgrade Database using dbua

[root@rac1 ~]#
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ . 12102.env
[oracle@rac1 ~]$ dbua



















Thus we have successfully upgraded Oracle Database from 11204 to 12102 using DBUA.
This Article explains how to Upgrade ORACLE DATABASE in Linux Environment.

Thanks for Reading

Regards,
Mohammed Areefuddin


Suggested Topics :