ORACLE Upgradation 11.2.0.1.0 to 11.2.0.4.0 in Linux server

The below mentioned diagram will give the idea of upgrade patch release with component details.

C:\Users\sap.basis\Pictures\Screen Recording\Shot 2017-03-03 16;35;34.png

Major steps:

Step 1.       Download the software Oracle 11.2.0.4.0

Step 2.       Run Pre installation processes

Step 3.       Create Directory for new Home and change Environment Variable

Step 4.       Run the runinstaller file using Run as administrator from 11.2.0.4

Step 5.       Run DBUA.bat from 11.2.0.4 Oracle_home

Step 6.       Run Post installation processes

Details in Below


Step 1.  Download the software Oracle 11.2.0.4.0

             From oracle support or from SAP marketplace

  1. Before downloading Check Oracle & Kernel release by executing following commands:

Execute: cat /etc/oracle-release

           

           

  1. Check Linux Kernel Release:

Execute: uname –r

           

                 

  1. Check Server Bits 64 bits/ 32 Bits(x86)

Execute: uname –p

                     

Step 2. Run Pre installation CMD processes

  1.   Check Oracle Home by executing following commands:

Execute: cat /etc/oratab

 

  1. Check Oracle Inventory by executing following commands:

Execute: cat /u01/app/oracle/product/11.2.0/dbHome_1/oraInst.loc

  1.   Execute: cat/u01/app/oraInventory/ContentsXML/inventory.xml

  1. Command to find the database that already connected.

Execute: ps –ef | grep –I smon

  1. Check Oracle Environment:

Execute: oraenv

         

  1. Check Listener Status

Execute: lsnrctl status

         

  1. Go to SQL

Execute: sqlplus / as sysdba

         

  1. Check Instance name, Host name and Instance Status

Execute: SELECT instance_name, host_name, version, status FROM v$instance;

  1. Check Database Components and their versions

Execute: SELECT comp_name, version, status FROM dba_registry;

       

       Execute: exit

Step 3. Change the environment variable Path to 11.2.0.4(New Home)                

For (New Oracle Software)

  1. Create New Home

Execute: mkdir –p /u01/app/oracle/product/11.2.0/dbHome_2

  1. Check New Home in directory

Execute: ll /u01/app/oracle/product/11.2.0/

  1.  Change the Environment variable Path to New Home

Execute: export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbHome_2

Step 4. Run the runinstaller from 11.2.0.4

  1. Run runinstaller file by executing following commands

  1. Go to 112040 directory and Check it for file runinstaller location

Execute: cd /software/downloads/db_112040

   

  1.   Go to home 2 directory

Execute: export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbHome_2

  1.  Run runinstaller file

Execute: ./runInstaller

  1. Here we are deselecting the security updates. 

Depending upon your requirement select the check box and then click on Next

https://lh5.googleusercontent.com/OIxMbg0QBNGEJo8UuZ07kKQhHZ502qYyWOph7NTYenFEryFVHQFluRJAELsz3DcGGdltyD_7ObHQ7-XFFLYE1tQwLgSV7rWOJ1699bQhPr-44hAgLIcRU36hBu47OwIwZsKLsuWVFJw

  1. Select Skip Software updates and click on next

https://lh3.googleusercontent.com/WlJ-B7ZpYmCzntX6lAKK6s-kdT32sdAdIS5AmYLGySj_I6u2ujqi-be-uYTan2OKzdW6qbTYvsevzDKEwni4O3jkTDNp5NH8SxrkxGZnZwqLL38OUlwPjlkXr3h--DocEa0hXcf9o9o

  1. Click on yes

https://static.wixstatic.com/media/916743_51574f6191544e46bd95b3e6e072f7b7~mv2.png/v1/fill/w_718,h_241,al_c,lg_1/916743_51574f6191544e46bd95b3e6e072f7b7~mv2.png

  1. Note : Here we are installing the database software only because once the database software is installed we use Database upgrade assistant to

     Upgrade the database from 11.2.0.1.0 to 11.2.0.4.0

        https://lh3.googleusercontent.com/hRgae329iglKv5XHaaJOG6dX3Z8EhHbcXPsltKIXFa_2Ks26TmFJ8Y7nHdZBI5jF2VHKkQn-NgdR2ZIGQBfGoQPG2tylXNeLPZifq9BcSYxbmu2YtnOgEUhhYtST8oUGcoTSeHOB76k

  1. Select Single Instance Database Installation and click on Next

https://lh4.googleusercontent.com/QcsQnxynQH-a_gKLR0geIDCZhrdf44j5e6I_QxThvmGh-aw8efeHYkSuR6sdIkplTTMvXMolIiEKLrPdEiASsgdqGIIUq8JnnwNReMCW8yAp1KJutL49AYTWJFyKtwDjE7AV1KbOXhk

                   

  1. Select the Language then click on Next

https://static.wixstatic.com/media/916743_d83abcf3f78f4a419e951316ce7830ab~mv2.png/v1/fill/w_797,h_596,al_c/916743_d83abcf3f78f4a419e951316ce7830ab~mv2.png

  1. Select Enterprise Edition and click on Select Options

https://static.wixstatic.com/media/916743_c418781b0f294d63bff516151f64bb13~mv2.png/v1/fill/w_797,h_597,al_c/916743_c418781b0f294d63bff516151f64bb13~mv2.png

  1. Select only Oracle Partitioning if analytic calculations are not performed in your organization i.e. not have BI (Business Intelligence) Server.  

          Otherwise, no need to change

         

         

  1. Enter the Installation path and click on Next

                   

                   

  1. Click Next

     

      https://lh6.googleusercontent.com/i_7gRUeItNHMuHvlpdX_SAqkFIG4ouazx5cgEn7hDQk1tGk3hYIa-zwCrsNShL6_Htl3ac0QXetyGldNgMnVBIzb6IV1jpeZwITvaGnGvqcQ_ROKGxSfVwdCEyzJe-J6ScKUJy94208

     

      https://lh4.googleusercontent.com/4VsztooklIX9tGhVQgb1oMjKxkGoNCkIzGQmVDSxgJ7LvdzMqo7QFvwJ1DvbDSxxiqE6FHJ94CWxAF99LgAKAQYd516gTXJvNk3qnnBIwkGz7bvaMhNvGEKicp2fssGZwWWf-P4xhMY

  1. Verify the summary screen and then click on Install

                      https://lh6.googleusercontent.com/vudnIDhBpOHiBn3uuI5q1esrksbzULoBWytV2h7CME3tqNSI0BNNvhwCKi45orOSc-F548ENRNqPeo2U8ZLRYAK8KFWEWBNGHUqomEcfk7sjn1AC-grtsYOF4XdTZTvvbj7y4IV77KA

                     

                      https://lh3.googleusercontent.com/TSS20KEd2VBzEeFA1RcxsL9Oub0hUFNkJe3fz6JiOMxdQfvpo9L6fy6YPXNJW5xwRuy9Q0j2eRduhNeGR30eO8k8-LAHCgl8YcJc1F6cBv8REX_0lFj_84u_38JDXBLhWVyIo_bNmzc

                     https://lh4.googleusercontent.com/pXs7lKUhNznTl7XPXbx5iQmp19BbeJUZlMEzNRo-IxD-czGhYQ5iIrEsOQrbevZc1YW7ca8U1enRxJoOW-M8h23fzc9Mu9a-TDzjeqQdnYGXxJnxFhUs0G6w5vCPgac1asfsAZT6I4c

  1. New Oracle successfully installed.

     

     https://lh6.googleusercontent.com/Pcm-1AUuctVCkBx4-86nABPp5OqKgd--AuziAiD_lKb63j2XasBl_7MrI2Plq65a-EQL4eTQsft8I-r7rbf8Fi2MOClQxHZWUxyM0Zjpm_AqdYkVOEWT3JLasQJLeRKXZh1FY6d2ONs

  1. Now, Go to Linux Command Line, InstallActions.log file generated

     

     

Step 5.  Give Root permissions to New Home by executing following commands:

  1. Go to New Home Directory

Execute: cd /u01/app/oracle/product/11.2.0/dbHome_2

                     

  1. Check for root.sh file

              C:\Users\sap.basis\Pictures\Screen Recording\environment variable\Shot 2017-03-03 12;47;32.png

  1. Execute: ./root.sh

  1. Verify Environment variables are set to new home

  1. Press  y and then Enter

             

  1. Press Y and then Enter

  1. Root permissions successfully given to New Home

Step 5. Run DBUA.bat from 11.2.0.4 Oracle_home

                 e.g.    D:/u01/app/oracle/product/11.2.0.4/dbhome_2/bin

i.        Execute: /u01/app/oracle/product/11.2.0/dbHome_2/bin/dbua &

 

           

           

               

  1. Database Upgrade assistant is identifying the Oracle Database 11.2.0.1.0

             Kindly check the primary Instance which will be upgraded by executing this SQL command in cmd:

                                 SQL> SELECT INSTANCE_NAME, HOST_NAME, VERSION, STARTUP_TIME, STATUS, INSTANCE_ROLE FROM v$instance;

             Here our primary DB instance is orcl, so we select it.

             

             https://lh6.googleusercontent.com/ZBgJQCBfqhowJwN3Z7UAVdvYTIE0eL5X5M8W5FXpdGWnfXE189KXypCJSyDlS0wsQ3QSGa0fDv-9juy4xAB4h3Rx__l-6El4736y_44CSuH3VJjg23noEPQTnV-JkqSlhHiUPynNHqQ

             

             

  1. Click Next

              It is not compulsory to select Upgrade Timezone Version & Backup Database. You can deselect them.

             

             https://static.wixstatic.com/media/916743_292b335d4dcc492ab37a9c64cd005f08~mv2.png/v1/fill/w_751,h_529,al_c/916743_292b335d4dcc492ab37a9c64cd005f08~mv2.png

  1. Click Next

             

             https://lh5.googleusercontent.com/ovIBpD-KAadGzV4B0IHiX_oTV14ZhSHRxSdiI8TNXwuOZBNVlPdY8s38eIXVaU_QvdARLt4Bx-nvBiW3EhcSKcVaw8nzdOLtE_6ILZggn42p9Vyu-F0ieyYI5UH49-9FeJDqZBn4Sug

  1. Click Next

                   

                 https://static.wixstatic.com/media/916743_6e6f45e2f3e94b1abbb55fc6d5b14bd2~mv2.png/v1/fill/w_752,h_528,al_c/916743_6e6f45e2f3e94b1abbb55fc6d5b14bd2~mv2.png

  1. Keep the FRA Location as it is, you no need to change. Click Next

              https://static.wixstatic.com/media/916743_4261d551cbb74f09bbbc7bb76f2f809f~mv2.png/v1/fill/w_755,h_531,al_c/916743_4261d551cbb74f09bbbc7bb76f2f809f~mv2.png

           

  1. Click Next

              https://static.wixstatic.com/media/916743_036855e5a5b24c6b88064ac6b45d8f0d~mv2.png/v1/fill/w_751,h_527,al_c/916743_036855e5a5b24c6b88064ac6b45d8f0d~mv2.png

           

  1. Click Next

             https://static.wixstatic.com/media/916743_4a99a2007a6541f9a6842da3ba1254c5~mv2.png/v1/fill/w_752,h_527,al_c/916743_4a99a2007a6541f9a6842da3ba1254c5~mv2.png

           

  1. Carefully verify the summary screen and then click on Finish

             C:\Users\sap.basis\Desktop\vb vb.jpg

  1. Database Upgrade in Progress

            https://lh5.googleusercontent.com/IUFieoAJ1hRajT3jTc_kYlnLSOLxlzXTsaHSnGxRLbaanaDEtZ00vLEggEvIwWQiaA2qov90TIJ_Xi2UNikTk4Gd3rb-9lYtNshWSnaXUnbJxgV3XevxNYEdt0O5aoVMh_Zij9iwctQ

           

  1. OLAP features, we are not using that errors can be ignore

             

            https://lh4.googleusercontent.com/xXDPUEGBlFnkB8_ilRdxnXEbSxLVx2i4ZO78QlaVJpVEODNhkELLtjEeKIeCt7N-Rjr_0u0FBSJMWogOlTE6RiNTp3kigDnqB6xWZupwkqpx2sIwQJm2uSXV0p4SJrH0hvIzCxO_Uc4

  1. Database Upgrade completed successfully! Click OK to see the results

           

            https://lh4.googleusercontent.com/ESFYFd1gw9qQ4zwfX0B3GY-1YvjzAWpOsNeWqPxwTcOrL6N7sYPiC_AYnSWeXda9Be1KFHg9UMiAul3kElyVmlqf8waLhWM17If07Yqrlbb88ASJxOfe7rknR6jX9PGbOo0Qja-7-dI

           

           https://lh6.googleusercontent.com/u4dzOHUULdmNcJ_iuYvQNdyGUpgirbdb_l3bCmbulsJP8eW66tIQ3owyzLgJu8oXstkZXTGKrRSnwldMZM7RSfaV5hP2NUYIMwC4XQrIOpZ_PLZ35hzdTIS-AVGvb8Sj2imB_pDUogM

  1. Verify whether the upgrade is successful. Then click on close

           

           https://static.wixstatic.com/media/916743_1daf2e4d886b49249ac849f934f4d635~mv2.png/v1/fill/w_655,h_598,al_c/916743_1daf2e4d886b49249ac849f934f4d635~mv2.png

Step 6. Post installation processes

         Once Completed execute following commands:

  1. Execute: cat /etc/oratab

  1. Execute: cat /u01/app/oraInventory/ContentsXML/inventory.xml

  1. Copy the tnsname.ora & listener.ora from the 11.2.0.1.0 location to 11.2.0.4.0

              Installed location as shown below

                                                                                                          /u01/app/oracle/product/11.2.0/dbHome_2/network/admin/

           

 

                                                                                          /u01/app/oracle/product/11.2.0/dbHome_2/network/admin/

     

             

  1. Execute: ps –ef | grep –I smon

                     

  1. Execute:. oraenv and then press Enter and then write rex  and press Enter

  1. Execute: echo $ORACLE_HOME

  1. Restart Listener by executing the following commands:

Execute: lsnrctl stop

  1. Execute: lsnrctl start:

 

  1. Execute:  lsnrctl status

  1. Execute: emctl status dbconsole

  1. Checking Upgraded files using SQL

Execute: sqlplus / as sysdba

  1. SQL>  SELECT INSTANCE_NAME, HOST_NAME, VERSION, STARTUP_TIME,  STATUS, INSTANCE_ROLE FROM v$instance;

 

  1. SQL> SELECT comp_name, version, status FROM dba_registry;

 

  1. SQL> SELECT comp_name, version, status FROM dba_registry WHERE status <> ‘VALID’;

  1. Execute:

               SQL> SELECT

             2     to_char (action_time, ‘DD-MON-YYYY HH:SS AM’) upgrade_date,

             3     comments source_version, version target_version

             4     FROM dba_registry_history

             5     WHERE action = ‘Upgrade’;

                     

  1. Now, we delete old home i.e. dbhome_1;

  1. Go to Home 1 directory to find location of deinstall file

Execute: cd /u01/app/oracle/product/11.2.0/dbHome_1/deinstall

  1. Execute: pwd

  1. Execute: ll                                                                                                                                                

  1. Execute: ./deinstall

  1. Press Enter Key

 

  1. Press Enter Key

C:\Users\sap.basis\Pictures\Screen Recording\unistall home 1\Shot 2017-03-03 13;04;37.png

  1. Execute: Press Y and then Enter  

C:\Users\sap.basis\Pictures\Screen Recording\unistall home 1\Shot 2017-03-03 13;05;00.png

  1. Home 1 deinstall successfully

  1.    Execute:  lsnrctl status

                                                     If it give following error restart the listener

       

  1. Execute: lsnrctl start

     

         

   

 

  1. Execute:  C:\User\Basis>sqlplus / as sysdba

     

   

     

 

  1.    Execute:  SQL>SELECT name, open_mode FROM v$database;

 

  1. Execute:  SQL> SELECT INSTANCE_NAME, HOST_NAME, VERSION, STARTUP_TIME, STATUS, INSTANCE_ROLE FROM v$instance;

 

Database successfully upgraded to 11.2.0.4