Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member186190
Participant


This blog is step by step guide to upgrade Oracle  10g to Oracle 11g. We cannot do patch upgrade kind of things since 11g is not a patch set of Oracle. We have to install 11g home as a separate ORACLE_HOME in parallel to 10g Oracle Home and follow the steps to upgrade. For the SAP we have to download Oracle 11g from SAP service marketplace. Download the latest version from SMP.

Pre-requisites :




  • Existing data base should be highest patch level  (oracle 10g  10.2.0.5.0) (OPatch not mandatory)

  • Check the Memory , swap and Disk Space.

  • SYSAUX  and  SYSTEM table-space should have minimum 200 MB free space.

  • Check the oracle home directory's  OS  level permission.

  • Stop the SAP Instances and services(don't stop oracle services)

  • Need 5- to 7 GB free space on new oracle directory (where software going to install)


 

Installing the Oracle 11g Server Software

 

As of now Oracle 11.2.0.3 is Oracle database patch sets are full installations of the Oracle database software. For more information about identifying and installing the correct Oracle database software version, see SAP note 1431799.

Make sure that you have enough space for the Oracle inventory and that you have full access to the directories (inventory, installation location, temp directory). Otherwise, the Oracle Universal Installer cannot perform installation prerequisite checks.

Login to the system as <DBSID>ADM.

Start the Oracle Universal Installer (OUI) by double-clicking the file sapserver.cmd.

If a command prompt window appears, specify the drive letter of the local disk where you want to install the Oracle software, and the <DBSID>. The command prompt window only appears if you perform a new installation (under a different user), or if the ORACLE_HOME and <DBSID> are not set.

In the Oracle Universal Installer, enter the information as shown in the following table:

















































Window



Task



Download Software Updates



Select Skip software updates, and then Next.



Select Skip software updates, and then Next.Select Installation Option



Confirm the default selection Install database software only and then choose Next.



Grid Installation Options



Confirm the default selection Single instance database installation and then choose Next.



Select Product Languages



Confirm the default option English and then choose Next.



Select Database Edition



Confirm the default option Enterprise Edition and then choose Next.



Specify Installation Location



This window displays the value for ORACLE_BASE, which must be set in the environment to <drive_containing_oracle_home>:\oracle.


It also displays the value for ORACLE_HOME, which is\oracle\<DBSID>\1120<x> (where 1120<x> is the Oracle version number, for example, 11202 for Oracle 11.2.0.2, 11203 for Oracle 11.2.0.3, and so on).


Choose Next.



Perform Prerequisite Checks



This window checks if all the required system prerequisites for the installation of the database software have been met. If some of the checks are displayed as Failed, you can fix these problems and run the check again by choosing Check Again.


RECOMMENDATION


We strongly recommend you to make sure that there are no failed checks before starting the software installation.



Summary



Review the information displayed in this window and choose Finish or Install.



Install Product



This window shows the progress of the installation.


You can monitor the installation progress details in an additional window.



Finish



After the installation has finished successfully, choose Finish and close the Oracle Universal Installer.




Screen Shot of Installation:::




Installing Required Patches ( not necessary )


After the database software installation, you need to install all required Oracle database patches, which on Windows include one patch collections and one or more additional (generic) patches.


For Oracle 11.2.0.3, check SAP Note 1631931 for the patches to be installed.


You can download the patches from:http://service.sap.com/oracle-downloadOracle 11.2.0.<x>


Prerequisites


Use an up-to-date version of OPatch to install the patches. Check SAP Note 839182 for instructions on how to use OPatch.


Copying and Adapting the SQL*Net Files




  • After the database software installation, you must copy and modify the old SQL*Net files, that is, listener.ora, sqlnet.ora, and tnsnames.ora.(from old 10g oracle home)



  • Log on as user <dbsid>adm.



  • copy <old_Oracle_home>/database/init<SID>.sap to <new_Oracle_home>/database/ init<SID>.sap



  • copy <old_Oracle_home>/database/init<SID>.utl to <new_Oracle_home>/database/init<SID>.utl



  • Copy the SQL*Net parameter files from the directory <old_ORACLE_HOME>\network\admin to the directory <new_ORACLE_HOME>\network\admin.



  • Edit the TNSNAME.ora & listener.ora add the new oracle home path <new_ORACLE_HOME>\network\admin directory.


       Identify the parameter ORACLE_HOME that belongs to the database you want to upgrade (SID_NAME in section SID_LIST) 

  • If not available, add the following entry to the file listener.ora:ADR_BASE_<listener_name> = <full_path_to_saptrace_directory>


Note that this is the same value as set in the database profile parameter diagnostic_dest.


Since your database is still running in the old environment, do not start the listener with the new listener.ora file at this point.


Backing Up the Oracle Database


You must have a complete and usable database backup otherwise you might lose data


Procedure




  1. Create a complete database and operating system backup, and back up any archive logs from Oracle 10g.



  1. Check that the backup is usable. If for any reason you have problems during the upgrade you must be able to restore the database from this backup.


Changing the Environment for User <dbsid>adm


 

  • ORACLE_HOME( map to new oracle home)

  • TNS_ADMIN (if it exists)


EXAMPLE


Rrename ORACLE_HOME into ORACLE_HOME_before_upgrade, and TNS_ADMIN into TNS_ADMIN_before_upgrade.


Run the Pre-upgrade script…. one by one as below...


 


Note 1431793 - Oracle 11.2.0: Upgrade Scripts

=============================================

A detailled description and instructions how to use the scripts can be found in SAP note 1431793.

https://service.sap.com/sap/support/notes/1431793

 



create_restore_point.sql


pre_upgrade_checks.sql


pre_upgrade_status.sql


pre_upgrade_tasks.sql


utlu112i_sap.sql




Performing the Database Upgrade




  • To upgrade the database, use the Oracle Database Upgrade Assistant (DBUA).



  • StartAll ProgramsOracle - <NEW_ORACLE_HOME_NAME>Configuration and Migration ToolsDatabase Upgrade Assistant


Note:


     Note that if you use this method, you do not automatically run the SAP-specific DBUA upgrade scripts, and you have to run them after the upgrade      manually.




  • If not yet stopped, stop the SAP system.

  • Do not stop the database instance. The database instance must be running in the current (old) environment.

  • Change the registry entry of ORA_<DBSID>_AUTOSTART by entering the command: <new_Oracle_Home>\bin\oradim -edit –sid <dbsid> –startmode manual  Ignore the error message: Unable to start service, OS Error 1056.

  • Alternatively, use regedit.exe to change the registry key to value FALSE. The registry key is available at HKLM:\Sofware\Oracle\KEY_<DBSID>11203


DBUA steps:








































SCREEN



Input



DBUA: Welcome



Start DUBA from 11g  home >>Choose Next.



DBUA: Select Database



1.


Select the database that you want to upgrade.


2.


Choose Next.


The DBUA analyzes the database to be upgraded and performs pre-upgrade checks.


3.


If the DBUA warns you of issues that need to be fixed before the upgrade, you need to analyze and act on these warnings.


The most common warning or information messages are as follows:=W�Q& Database is using an old timezone file version


Upgrade of TSTZ data is done automatically if the DBUA was started using dbua.sap.ps1.


Database contains schemas with stale optimizer statistics


See SAP Note 1431793, section 4. Running the Pre-Upgrade Scripts.Database contains INVALID objects prior to upgrade


See SAP Note 1431793, section 4. Running the Pre-Upgrade Scripts.


If there is not enough space for the SYSTEM tablespace, increase the space.˘EóÈv°


If you are prompted to resize the rollback segment SYSTEM, choose Continue.


4.Choose Yes to continue with the upgrade.



DBUA: Upgrade Options



The following options are available:


Recompile invalid objects at the end of the upgrade


Leave this selection unchanged.


The option lets you choose whether the DBUA has to automatically recompile all PL/SQL modules after the upgrade. If the database server has multiple CPUs, the DBUA automatically proposes the number of parallel processes to be used for the recompilation.


Backup database


Since you have already performed the Oracle database backup [page 23], you do not need to select this option.


Choose Next.



DBUA: Move Database Files



Leave the default setting Do Not Move Database Files as Part of Upgrade and choose Next.



DBUA: Recovery and Diagnostic Location



1.Do not select Specify Flash Recovery Area.


2.If you opened the DBUA with the Start menu, in the Diagnostic Destination field you have to specify the location of the saptrace directory using the Browse button.


3.Choose Next.



DBUA: Management Options



Deselect Configure the Database with Enterprise Manager, if selected, and choose Next.



DBUA: Summary



Review the summary of changes to be made.


This includes the warnings that you ignored or did not fix, components to be upgraded, parameters to be added, removed, and changed after the upgrade.


Choose Back to make any final adjustments, if required. Otherwise, leave the default settings and choose Finish to start the upgrade.


The upgrade process itself runs for some time, depending mainly on the size of the database and the capacity of the hardware.


You can ignore the warning ORA-32004 obsolete or deprecated parameter(s) specified for RDBMS instance.


When the DBUA has completed successfully, the results of the




Screen shot of DBUA




If you started the DBUA from the Start menu, you must perform additional steps to perform the post-upgrade script (see below).


Additional Steps When Starting the DBUA from the Start Menu


If you started the DBUA from the Start menu, you have to check the upgraded database and perform the post-upgrade script manually.


To do this perform the following steps of SAP note 1431793:


“6.1 Checking the upgraded database ”


“6.2 Running post-upgrade scripts manually ”


 


 


Post-Upgrade Steps




  1. You set the user environment variables

  2. You create the Oracle TNSListener service 

  3. You change the registry value of Oracle Autostart 

  4. You check the start up type of the Oracle services

  5. You perform post-upgrade tasks 

  6. You delete the old Oracle software


After the Oracle database upgrade, you need to perform the steps described here.


 


You set the user environment variable.

 

       In the user environment and system environment <DBSID>adm, check the PATH variable and, if required, remove all parts referring to the old Oracle                 version. 

          When you modify the user environment, you must be logged on as the corresponding <DBSID>adm user.




  • In the user environment of <DBSID>adm, set the ORACLE_HOME variable to the correct value for Oracle 11g, for example to: <DRIVE>:\ORACLE\<DBSID>\11203.



  • Copy tnsnames.ora and sqlnet.ora from %ORACLE_HOME%\network\admin to \\<sapglobalhost>\sapmnt\<DBSID>\SYS\profile\oracle.


       (This information is required for all ABAP application servers you install on a separate host to find the correct location of these files.) 

          Set TNS_ADMIN on all ABAP application servers.




  • Log off and log on again to activate the environment changes in your user session.


 


Creating the Oracle TNSListener Service

  • Stop the old Oracle listener before you create the Oracle TNSListener Service.( from ms service or command prompt: LSNRCTL STOP


          Create New listener service use command prompt or run commad:


          <complete_path_to_new_Oracle_Home>\bin\lsnrctl start


          This will start the listener from the new Oracle home. As the listener service does not yet exist, you will get the following error message: Failed to           open service <Oracle<SID>11202TNSListener>, error 1060. Then the service will be created and started.


 





 

 

Changing the Registry Value of Oracle Autostart

Change the registry value of ORA_<DBSID>_AUTOSTART. Open a command prompt and enter the following command:<new_Oracle_Home>\bin\oradim -edit -sid <dbsid> -startmode manual


Ignore the error message: Unable to start service, OS Error 1056.


Alternatively, use regedit.exe to change the registry key to value FALSE. The registry key is available at HKLM:\Sofware\Oracle\KEY_<DBSID>11202


 


Checking the Start Up Type of the Oracle Services


 


        Start the Oracle services (Database and Listener), if not yet started. 

Also, if not yet started, start the Distributed Transaction Coordinator Service.


In a standard configuration, set the startup type of OracleService<DBSID> and Oracle<ORACLE_HOME_NAME>TNSListener to automatic to ensure that they are automatically restarted after booting.


Performing Post-Upgrade Tasks (Follow the SAP NOTE 1431793)

Example :Open a command prompt and change to the directory <new_oracle_home>\sap\ora_upgrade\post_ugprade.


From this directory start sqlplus.exe and enter the following commands:SQL>connect / as sysdbaSQL>@post_upgrade_status.sql


This provides an overview of the status of the upgraded database.


 


Run the below scripts one by one


 





  • Check the Oracle database parameters against SAP Note 1431798 and adjust them if necessary.


       You can find an automated script in SAP Note 1171650 to help you check whether your SAP system complies with the database parameter               recommendations at any given point in time. 


  • Update the Oracle database statistics with BRCONNECT as follows:


brconnect -u / -c -f stats -t all -f collect -p 4


Deleting the Old Oracle Software

  • Do not delete the old software, if it still has to be accessed by another database instance running with this version.

  • Before you delete the old Oracle software, you can perform a backup of your database

  • To deinstall the Oracle 10.2 software, you use the Oracle Universal Installer (OUI) from older home.

  • To delete a service, open a command prompt and enter:sc delete <service_name>


Above Details will help only for the standalone SAP on Oracle upgrade . And I did the upgraded as per  above mentioned steps .For  Cluster environment   download the standard document from sap. Database Upgrade Guide


 


 


Thanks


Yoonus


 


Visit.. WrongCodes


 



10 Comments
Labels in this area