DB upgrade 11.2.0.1 to11.2.0.4


  • To open the Database

            [root@oracle ~]# su – oracle
            [oracle@oracle ~]$ export ORACLE_SID=orcl
            [oracle@oracle ~]$ sqlplus / as sysdba

            SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 11 06:49:23 2015
            Copyright (c) 1982, 2009, Oracle.  All rights reserved.
            Connected to an idle instance.

            SQL> startup

            ORACLE instance started.
            Total System Global Area  835104768 bytes

            Fixed Size                      2217952 bytes
            Variable Size                 507512864 bytes
            Database Buffers          322961408 bytes
             Redo Buffers                  2412544 bytes

            Database mounted.
            Database opened.

  • Check kernel version uname

            [oracle@oracle ~]$ uname -a

             Linux oracle 2.6.32-200.13.1.el5uek #1 SMP Wed Jul 27 21:02:33 EDT 2011 x86_64 x86_64
            x86_64 GNU/Linux

  • Red Hat enterprise Linux Server Release

            [oracle@oracle ~]$ cat /etc/redhat-release

            Red Hat Enterprise Linux Server release 5.7 (Tikanga)

  •  check the listner status if not started you have to start the listner

            [oracle@oracle ~]$ lsnrctl status

            LSNRCTL for Linux: Version 11.2.0.1.0 – Production on 11-APR-2015 06:56:02
            Copyright (c) 1991, 2009, Oracle.  All rights reserved.
            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

            STATUS of the LISTENER
            ————————

            Alias                          LISTENER
            Version                     TNSLSNR for Linux: Version 11.2.0.1.0 – Production
            Start Date                 11-APR-2015 06:53:56
            Uptime                      0 days 0 hr. 2 min. 5 sec
            Trace Level               off
            Security                     ON: Local OS Authentication
            SNMP                        OFF

            Listener Parameter File   /u01/app/oracle/product/11.2.0/network/admin/listener.ora
            Listener Log File         /u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
            Listening Endpoints Summary…

            (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
            (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle)(PORT=1521)))

            Services Summary…
            Service “orcl” has 1 instance(s).
            Instance “orcl”, status READY, has 1 handler(s) for this service…
            Service “orclXDB” has 1 instance(s).
            Instance “orcl”, status READY, has 1 handler(s) for this service…
            The command completed successfully

            Create the directory for new dba

  • To create path for new oracle database software

            [oracle@oracle database]$ mkdir -p /u01/app/oracle/product/11.2.4

            ##unzip the 11.2.0.4 db files

            [oracle@oracle SAB Db-11gR2 64-bit]$ ll

            total 2297844

            -rwxrwxrwx 1 oracle oinstall 1239269270 Aug 21  2009 linux.x64_11gR2_database_1of2.zip
            -rwxrwxrwx 1 oracle oinstall 1111416131 Aug 21  2009 linux.x64_11gR2_database_2of2.zip

            [oracle@oracle u01]$ unzip linux.zseries64_11gR2_database_1of2.zip
            [oracle@oracle u01]$ unzip linux.zseries64_11gR2_database_2of2.zip

            [root@oracle ~]# xhost +

            access control disabled, clients can connect from any host

            [root@oracle ~]# su – oracle
            [oracle@oracle u01]$ cd /u01/database/
            [oracle@oracle database]$ ll

            total 44

            drwxrwxrwx 12 oracle oinstall 4096 Mar 26  2011 doc
            drwxrwxrwx  4 oracle oinstall 4096 Mar 28  2011 install
            drwxrwxrwx  2 oracle oinstall 4096 Mar 28  2011 response
            drwxrwxrwx  2 oracle oinstall 4096 Mar 28  2011 rpm
            -rwxrwxrwx  1 oracle oinstall 8560 Mar 28  2011 runInstaller
            drwxrwxrwx  2 oracle oinstall 4096 Mar 28  2011 sshsetup
            drwxrwxrwx 14 oracle oinstall 4096 Mar 28  2011 stage
            -rwxrwxrwx  1 oracle oinstall 5575 Dec 18  2010 welcome.html

            [oracle@oracle database]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.4/
            [oracle@oracle database]$./runInstaller

11

12

13

14

15

16

17

18

19

20

21

22

23

  • Run the root.sh script in root user

            [root@oracle ~]# /u01/app/oracle/product/11.2.4/root.sh

            Performing root user operation for Oracle 11g
            The following environment variable are set as:

            ORACLE_OWNER= oracle
            ORACLE_HOME=  /u01/app/oracle/product/11.2.4

            Enter the full pathname of the local bin directory: [usr/local/bin]:
            The contents of “dbhome” have not changed. No need to Overwrite.
            The file “oraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
            [n] :  y
            Copying oraenv to /usr/local/bin . . .

            The file ” coraenv” already exists in /usr/local/bin. Overwrute it? (y/n)
            [n] :  y
            Copying coraenv to /usr/local/bin . . .

            Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant
            when a database is created

            Finished running generic part of script.
            Now product-specific root actions will be performed.
            Finished product-specific root actions.

26

  • Run the database upgrade assistant utility.

            [oracle@oracle database]$ /u01/app/oracle/product/11.2.4/bin/dbua

111

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

  •   Check the updated database software version

            [oracle@oracle ~]$ cat /etc/oratab

            #
            # This file is used by ORACLE utilities.  It is created by root.sh
            # and updated by the Database Configuration Assistant when creating
            # a database.
            # 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.
            #
            #
            orcl:/u01/app/oracle/product/11.2.4:N

  •   Check the oracle DATABASE SOFTWARE old home path and new home path

            [oracle@oracle ~]$ cat /u01/app/oraInventory/ContentsXML/inventory.xml

            <?xml version=”1.0″ standalone=”yes” ?>
            <!– Copyright (c) 1999, 2013, Oracle and/or its affiliates.
            All rights reserved. –>
            <!– Do not modify the contents of this file by hand. –>

            <INVENTORY>
            <VERSION_INFO>
            <SAVED_WITH>12.1.0.1.0</SAVED_WITH>
            <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
            </VERSION_INFO>
            <HOME_LIST>

            <HOME NAME=”OraDb11g_home2″ LOC=”/u01/app/oracle/product/11.2.4″ TYPE=”O”
            IDX=”2″/>
            <HOME NAME=”OraDb11g_home1″ LOC=”/u01/app/oracle/product/11.2.0″ TYPE=”O”
            IDX=”1″REMOVED=”T”/>

            </HOME_LIST>
            <COMPOSITEHOME_LIST>
            </COMPOSITEHOME_LIST>
            </INVENTORY>

  • copy the tnsnames.ora file from old software location to new software location

            [oracle@oracle ~]$ cp /u01/app/oracle/product/11.2.0/network/admin/tnsnames.ora
            /u01/app/oracle/product/11.2.4/network/admin/

  • check if the database is runing

            [oracle@oracle ~]$ ps -ef |grep pmon

            oracle 20383 17881 0 15:32 pts/6 00:00:00 grep pmon
            oracle 23491         1 0 13:46         ? 00:00:01 ora_pmon_orcl

  • Restart the listener

            [oracle@oracle ~]$ lsnrctl stop

            LSNRCTL for Linux: Version 11.2.0.4.0 – Production on 18-APR-2015 15:32:29
            Copyright (c) 1991, 2013, Oracle.  All rights reserved.
            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
            The command completed successfully

            [oracle@oracle ~]$ lsnrctl start

            LSNRCTL for Linux: Version 11.2.0.4.0 – Production on 18-APR-2015 15:33:04
            Copyright (c) 1991, 2013, Oracle.  All rights reserved.
            Starting /u01/app/oracle/product/11.2.4/bin/tnslsnr: please wait…
            TNSLSNR for Linux: Version 11.2.0.4.0 – Production
            System parameter file is /u01/app/oracle/product/11.2.4/network/admin/listener.ora
            Log messages written to /u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
            Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
            Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle)(PORT=1521)))

            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
            STATUS of the LISTENER
            ————————

            Alias                          LISTENER
            Version                     TNSLSNR for Linux: Version 11.2.0.4.0 – Production
            Start Date                 18-APR-2015 15:33:04
            Uptime                      0 days 0 hr. 0 min. 0 sec
            Trace Level               off
            Security                    ON: Local OS Authentication
            SNMP                       OFF

            Listener Parameter File   /u01/app/oracle/product/11.2.4/network/admin/listener.ora
            Listener Log File         /u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml

            Listening Endpoints Summary…

            (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
            (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle)(PORT=1521)))

            The listener supports no services
            The command completed successfully

  • check the status of the listner

            [oracle@oracle ~]$ lsnrctl status

            LSNRCTL for Linux: Version 11.2.0.4.0 – Production on 18-APR-2015 15:34:01
            Copyright (c) 1991, 2013, Oracle.  All rights reserved.
            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

            STATUS of the LISTENER
            ————————

            Alias                       LISTENER
            Version                   TNSLSNR for Linux: Version 11.2.0.4.0 – Production
            Start Date               18-APR-2015 15:33:04
            Uptime                   0 days 0 hr. 0 min. 57 sec
            Trace Level             off
            Security                  ON: Local OS Authentication
            SNMP                      OFF

            Listener Parameter File   /u01/app/oracle/product/11.2.4/network/admin/listener.ora
            Listener Log File         /u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
            Listening Endpoints Summary…

            (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
            (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle)(PORT=1521)))

            Services Summary…
            Service “orcl” has 1 instance(s).
            Instance “orcl”, status READY, has 1 handler(s) for this service…
            Service “orclXDB” has 1 instance(s).
            Instance “orcl”, status READY, has 1 handler(s) for this service…
            The command completed successfully

  •  Check the dbconsole status

            [oracle@oracle ~]$ export ORACLE_UNQNAME=orcl
            [oracle@oracle ~]$ emctl status dbconsole

            Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
            Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
            https://oracle:1158/em/console/aboutApplication
            Oracle Enterprise Manager 11g is running.
            ——————————————————————
            Logs are generated in directory /u01/app/oracle/product/11.2.4/oracle_orcl/sysman/log

  • Finally deinstall the old oracle database software…

            [oracle@oracle u01]$ cd /u01/app/oracle/product/11.2.0/deinstall
            [oracle@oracle deinstall]$ ll

            total 92

            -rwxrwxrwx 1 oracle oinstall  9780 May 10  2011 bootstrap.pl
            -rwxrwxrwx 1 oracle oinstall  9653 Apr 16 08:23 deinstall
            -rwxrwxrwx 1 oracle oinstall 18841 Jan 29  2013 deinstall.pl
            -rwxrwxrwx 1 oracle oinstall  3466 Aug 18  2010 deinstall.xml
            drwxrwxrwx 2 oracle oinstall  4096 Apr 16 08:05 jlib
            -rwxrwxrwx 1 oracle oinstall   409 Aug 18  2010 readme.txt
            drwxrwxrwx 2 oracle oinstall  4096 Apr 16 08:05 response
            -rwxrwxrwx 1 oracle oinstall 32343 Dec 16  2009 sshUserSetup.sh

            [oracle@oracle deinstall]$ ./deinstall
            [oracle@oracle deinstall]$ ./deinstall

            Checking for required files and bootstrapping …
            Please wait …
            Location of logs /tmp/deinstall2015-04-18_03-41-19PM/logs/
            ############ ORACLE DEINSTALL & DECONFIG TOOL START ############
            #############CHECK OPERATION START #############
            ## [START] Install check configuration ##
            Checking for existence of the             Oracle home location /u01/app/oracle/product/11.2.0
            Oracle Home type selected for deinstall is: Oracle Single Instance Database
            Oracle Base selected for deinstall is: /u01/app/oracle
            Checking for existence of central inventory location /u01/app/oraInventory
            Checking for sufficient temp space availability on node(s) : ‘oracle’

            ## [END] Install check configuration ##
            Network Configuration check config START
            Network de-configuration trace file location: /tmp/deinstall2015-04-18_03-41-19PM
            /logs/netdc_check2015-04-18_03-47-24-PM.log
            Specify all Single Instance listeners that are to be de-configured [LISTENER]:
            Network Configuration check config END
            Database Check Configuration START

            Database de-configuration trace file location: /tmp/deinstall2015-04-18_03-41-19PM
            /logs/databasedc_check2015-04-18_04-05-10-PM.log
            Use comma as separator when specifying list of values as input
            Specify the list of database names that are configured in this Oracle home [orcl]:
            ###### For Database ‘orcl’ ######
            Single Instance Database
            The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/orcl
            Storage type used by the Database: FS

            Database file location: /u01/app/oracle/oradata/orcl,/u01/app/oracle
            /flash_recovery_area/orcl
            Fast recovery area location: /u01/app/oracle/flash_recovery_area/ORCL
            database spfile location: /u01/app/oracle/product/11.2.0/dbs/spfileorcl.ora

            The details of database(s) orcl have been discovered automatically. Do you still want to
            modify the details of orcl database(s)? [n]:
            Database Check Configuration END
            Enterprise Manager Configuration Assistant START
            EMCA de-configuration trace file location: /tmp/deinstall2015-04-18_03-41-19PM
            /logs/emcadc_check2015-04-18_04-05-22-PM.log

            Checking configuration for database orcl
            Enterprise Manager Configuration Assistant END
            Oracle Configuration Manager check START
            OCM check log file location : /tmp/deinstall2015-04-18_03-41-19PM/logs//ocm_check971.log
            Oracle Configuration Manager check END

            ########## CHECK OPERATION END ##########
            ########## CHECK OPERATION SUMMARY ##########

            Oracle Home selected for deinstall is: /u01/app/oracle/product/11.2.0
            Inventory Location where the Oracle home registered is: /u01/app/oraInventory
            Following Single Instance listener(s) will be de-configured: LISTENER
            The following databases were selected for de-configuration : orcl
            Database unique name : orcl
            Storage used : FS

            Will update the Enterprise Manager configuration for the following database(s): orcl
            No Enterprise Manager ASM targets to update
            No Enterprise Manager listener targets to migrate
            Checking the config status for CCR
            Oracle Home exists with CCR directory, but CCR is not configured
            CCR check is finished

            Do you want to continue (y – yes, n – no)? [n]: y

            A log of this session will be written to: ‘/tmp/deinstall2015-04-18_03-41-19PM
            /logs/deinstall_deconfig2015-04-18_03-47-16-PM.out’

            Any error messages from this session will be written to:
            ‘/tmp/deinstall2015-04-18_03-41-19PM/logs/deinstall_deconfig2015-04-18_03-47-16-PM.err’

            ########## CLEAN OPERATION START ##########

            Enterprise Manager Configuration Assistant START
            EMCA de-configuration trace file location: /tmp/deinstall2015-04-18_03-41-19PM
            /logs/emcadc_clean2015-04-18_04-05-22-PM.log

            Updating Enterprise Manager Database Control configuration for database orcl
            Updating Enterprise Manager ASM targets (if any)
            Updating Enterprise Manager listener targets (if any)

            Enterprise Manager Configuration Assistant END

            Database de-configuration trace file location: /tmp/deinstall2015-04-18_03-41-19PM
            /logs/databasedc_clean2015-04-18_04-05-52-PM.log

            Database Clean Configuration START orcl
            This operation may take few minutes.
            Database Clean Configuration END orcl
            Network Configuration clean config START
            Network de-configuration trace file location: /tmp/deinstall2015-04-18_03-41-19PM
            /logs/netdc_clean2015-04-18_04-07-47-PM.log

            De-configuring Single Instance listener(s): LISTENER
            De-configuring listener: LISTENER

            Stopping listener: LISTENER
            Listener stopped successfully.
            Deleting listener: LISTENER
            Listener deleted successfully.
            Listener de-configured successfully.
            De-configuring backup files…
            Backup files de-configured successfully.
            The network configuration has been cleaned up successfully.

            Network Configuration clean config END
            Oracle Configuration Manager clean START
            OCM clean log file location : /tmp/deinstall2015-04-18_03-41-19PM/logs//ocm_clean971.log
            Oracle Configuration Manager clean END
            Setting the force flag to false
            Setting the force flag to cleanup the Oracle Base

            Oracle Universal Installer clean START
            Detach Oracle home ‘/u01/app/oracle/product/11.2.0’ from the central inventory on the
            local node : Done

            Delete directory ‘/u01/app/oracle/product/11.2.0’ on the local node : Done
            Delete directory ‘/u01/app/oraInventory’ on the local node : Done
            Delete directory ‘/u01/app/oracle’ on the local node : Done

            Oracle Universal Installer cleanup was successful.
            Oracle Universal Installer clean END

            ## [START] Oracle install clean ##

            Clean install operation removing temporary directory
            ‘/tmp/deinstall2015-04-18_03-41-19PM’ on node ‘oracle’
            ## [END] Oracle install clean ##

            ########## CLEAN OPERATION END ##########
            ########## CLEAN OPERATION SUMMARY ##########

            Updated Enterprise Manager configuration for database orcl
            Successfully de-configured the following database instances : orcl
            Following Single Instance listener(s) were de-configured successfully: LISTENER
            Cleaning the config for CCR
            As CCR is not configured, so skipping the cleaning of CCR configuration
            CCR clean is finished

            Successfully detached Oracle home ‘/u01/app/oracle/product/11.2.0’ from the central
            inventory on the local node.
            Successfully deleted directory ‘/u01/app/oracle/product/11.2.0’ on the local node.
            Successfully deleted directory ‘/u01/app/oraInventory’ on the local node.
            Successfully deleted directory ‘/u01/app/oracle’ on the local node.

            Oracle Universal Installer cleanup was successful.

            Run ‘rm -rf /etc/oraInst.loc’ as root on node(s) ‘oracle’ at the end of the session.
            Run ‘rm -rf /opt/ORCLfmap’ as root on node(s) ‘oracle’ at the end of the session.
            Run ‘rm -rf /etc/oratab’ as root on node(s) ‘oracle’ at the end of the session.

            Oracle deinstall tool successfully cleaned up temporary directories.
            #######################################################################
            ############# ORACLE DEINSTALL & DECONFIG TOOL END #############

            [oracle@oracle deinstall]$

 

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *