You are on page 1of 6

Oracle 10.2.0.2 Upgrade to 11.2.0.

1
Before beginning, make sure all aspects of the database to be upgraded can be recovered,
including the operating system.
If upgrading on a temporary or other system; start by performing a database refresh. Youll need
a control.sql file from the source system:
Alter database backup controlfile to trace;
This guide begins with a working 10.2.0.2 database. The steps will include upgrading the
database to 10.2.0.4, and then on to 11.2.0.1 (including 8 patches to be applied after upgrading to
11.2).
The upgrade files are located on \\walkerr2\sapdownloads. Map this UNC path to Y: on the
system you are upgrading.

Upgrade to 10.2.0.4
1)
2)
3)
4)
5)
6)
7)
8)
9)
10)

Shutdown the database, and stop the Oracle Services


Navigate to Y:\Oracle_10.2.0.4\Installer\Disk1 and run setup.exe
The Oracle Universal Installer will start.
On the Welcome screen click Next
Verify that the Oracle Home Details are accurate and click Next
The installer will run pre-installation tests, ensure they pass and click Next
a. At this point if the Oracle services were not started an error will be displayed,
warning you that you cannot continue until the services are stopped.
Leave Enable Oracle Configuration Manager unchecked and click Next
Review the installation summary and click Install
a. The installation process will begin
b. The process will run for approximately 5 minutes
At the End of Installation screen click Exit
a. The installer will ask you to confirm; click Yes
At this point the TNS Listener will need to be reconfigured.
a. Click Start All Programs Oracle - <Oracle Home Name> Configuration
and Migration Tools Net Configuration Assistant
b. Select Listener configuration and click Next
c. Select Delete and click Next
d. The old listener should be selected by default; click Next
e. Confirm that you want to delete the listener by clicking Yes
f. Click Next after it states that the listener was deleted
g. Click Next when Listener configuration complete is displayed
h. Select Listener configuration and click Next
i. Add should be the only option; click Next
j. Use the default name LISTENER and click Next
k. Leave TCP as the Selected Protocols, and click Next
l. For new systems, use the default port of 1521, for older systems use 1527 if
appropriate

11)

m. Select No that you do not want to create another listener, and click Next
n. When Listener configuration is complete, click Next
o. Click Finish
p. Ensure the new listener service has been created and is started
At this point only the binaries are upgraded; next the database files must be upgraded.
a. Start the database in upgrade mode:
i. sqlplus /nolog
ii. connect / as sysdba
iii. startup upgrade
b. Click Start All Programs Oracle - <Oracle Home Name> Configuration
and Migration Tools Database Upgrade Assistant
i. On the Welcome screen, click next
ii. Ensure the correct oracle home is selected (there should only be one) and
click Next
iii. If the upgrade assistant warns of invalid objects, do the following, click
Yes to continue with the upgrade
iv. If the upgrade assistant states that any tablespaces need to be expanded,
use the following command to do so:
ALTER TABLESPACE <name> ADD DATAFILE
e:\oracle\<SID>\sapdata1\<short_name>_#\<short_name>.DATA# size
4096M;
Example:
ALTER TABLESPACE PSAPSR3 ADD DATAFILE
e:\oracle\SND\sapdata1\SR3_2\SR3.DATA2 SIZE 4096M;
Note: if a temporary tablespace is what needs to be extended replace the
word DATAFILE with TEMPFILE.
v. Use the default option Do Not Move Database Files as Part of Upgrade
and click Next
vi. Check Recompile invalid objects and choose 4 for Degree of
Parallelism, and select Turn off Archiving, for duration of upgrade then
click Next
vii. Select I have already backed up my database and click Next
viii. Do not specify a flash recovery area and click Next
ix. Review the summary page and click Finish
1. The upgrade will run, and will take between 5-10 minutes.
x. Click OK when the upgrade completes.
xi. Review the results and click Close
xii. Shutdown the database, reboot, and bring the database back up.
xiii. 10.2.0.4 Upgrade Complete!

Upgrade to 11.2.0.1
1)

Pre-upgrade preparation

a. Extract p9584028_102040_Generic.zip (found at Y:\Oracle11.2\Upgrade Scripts)


to E:\tmp (create the tmp folder if necessary)
i. This should leave a folder e:\tmp\9584028
ii. Using CLI, navigate to e:\tmp\9584028 and type:
opatch apply
Note: The opatch program may warn about the Oracle Configuration
Manager being installed but not configured. This is okay and may be
ignored.
iii. You can run the command opatch lsinventory to confirm that the patch
is installed correctly
iv. While still in the CLI, navigate to
e:\tmp\9584028\files\sap\ora_upgrade\pre_upgrade and perform the
following:
1. OS> sqlplus /nolog
2. SQL> connect / as sysdba
3. SQL> spool e:\tmp\pre_upgrade_tasks.log
4. SQL> @pre_upgrade_tasks.sql
5. SQL> spool off
6. Review the resulting logfile
a. Timezone file warning can be ignored
b. Invalid objects warning can be ignored as it will be dealt
with in post-upgrade
c. It will recommend gathering dictionary statistics, do so:
EXECUTE dbms_stats.gather_dictionary_stats;
v. Refresh the schema stats:
1. Exit SQL Plus, and in the CLI navigate to: Y:\Oracle11.2\_FIXES
2. OS> sqlplus /nolog
3. SQL> connect / as sysdba
4. SQL> @gather_stats.sql
Note: This will run for awhile when it reaches the psapsr3
tablespace. (35 minutes for CRM, almost an hour for BI)
2)

Software Installation
a. Navigate to Y:\Oracle11.2\x64\database\SAP and run sapserver.cmd
b. Do not enter an email address, and leave the checkbox unchecked (this feature is
not relevant for OEM installations), and click Next
i. It will ask you to confirm, click Yes
c. Use the default option Install database software only and click Next
d. Use the default option Single instance database installation and click Next
e. Use the default language English and click Next
f. Use the default edition Enterprise Edition and click Next
g. Verify the oracle base and software location and click Next
i. D:\oracle
ii. D:\oracle\<SID>\112
h. Review the summary and click Finish

3)

4)
5)

6)
7)

i. The software installation will now run for up to 10 minutes


i. Once the installation completes click Close
Change the following Environment Variables
Note: if any environment variables reference the old oracle home, but are not listed
here, update them to point at the new home (i.e. d:\oracle\<SID>\112)
a. ORACLE_HOME D:\oracle\<SID>\112
b. Path (any paths referencing 102, change to 112)
c. PERL5LIB 102 112
Patch OPatch
a. Copy the folder Y:\Oracle11.2\OPatch to the new oracle home (i.e.
D:\oracle\<SID>\112\
Apply required generic patches
a. Shutdown the database
b. From CLI navigate to: Y:\Oracle11.2\Generic Patches\
c. Execute opatch lsinventory and ensure that you are using the 11.2 version of
opatch. If not, close the CLI and open a new one and re-verify.
d. Go into each of the 8 subfolders one at a time and run opatch apply
i. 8830174
ii. 9006105
iii. 9261882
iv. 9315655
v. 9315778
vi. 9322740
vii. 9359939
viii. 9584028
e. Once all above are applied run opatch lsinventory to ensure all 8 patches show up
as applied
Take a backup
a. The next step is to upgrade the database itself, so now is the time to make sure
you can recover the database incase something goes wrong.
Perform the Database Upgrade
a. Ensure that the database will not auto-start, run from CLI the following:
oradim edit sid <SID> -startmode manual
b. Ensure the environment variable SAPDATA_HOME is set
i. SAPDATA_HOME E:\oracle\<SID>
c. If Powershell is not installed, install it at this time.
i. Installer found in Y:\Oracle11.2\PowerShell
d. Copy the post_upgrade folder from Y:\Oracle11.2\Upgrade Scripts\files to
e:\tmp\9584028\files\sap\ora_upgrade
e. From a powershell navigate to
e:\tmp\9584028\files\sap\ora_upgrade\post_upgrade
i. Remember that power shell is case sensitive
f. Run: Set-ExecutionPolicy unrestricted
g. Run: ./dbua.sap.ps1
i. If it gives a security warning, respond R to run the script
ii. It will warn about the database being 10.2.0.3.0 and ask if you want to
continue without support from SAP. This warning is inaccurate; type y
and press enter to continue.

8)

9)
10)

11)

h. The Database Upgrade Assistant Starts


i. Enter the username system and the password saf3tyNET and click Next
j. The system will warn again about invalid objects, time zone file, and stale
statistics.
i. The invalid objects will be corrected at the end of the upgrade
ii. The time zone file will be automatically corrected if the Database Upgrade
Assistant was started from powershell
iii. The stale statistics are only on small schemas that will not affect the
upgrade that couldnt be refreshed earlier when the script was ran to
collect them.
iv. Click Yes to continue
k. Leave Recompile invalid objects at the end of the upgrade checked, change
parallelism to 4, select Turn off Archiving for the duration of the upgrade and
click Next
l. Leave the default setting of Do Not Move Database Files as Part of Upgrade
and click Next
m. Do not specify a Flash Recovery Area, leave the diagnostic destination as
defaulted (E:\oracle\<SID>\saptrace), and click Next
n. Do not configure the database with enterprise manager, and click Next
o. Review the summary and click Finish
i. The upgrade process will begin, and took approximately 20 minutes in
CRM
p. Once the upgrade completes, click OK
q. Review the results and click Close
r. Type exit to close the powershell window
Ensure that the tnsnames.ora file has an entry for the database
a. <SID>.WORLD =
(DESCRIPTION =
etc
Copy the data from the old sqlnet.ora into the new sqlnet.ora file
(D:\oracle\<SID>\102\Network\admin D:\oracle\<SID>\112\Network\admin)
At this point the TNS Listener will need to be reconfigured.
a. If the old TNS Listener service is running, stop it at this time, and remove it
i. Ex. From CLI: sc delete Oracle<SID>102TNSListener
b. Click Start All Programs Oracle - <New Oracle Home Name>
Configuration and Migration Tools Net Configuration Assistant
c. Select Listener configuration and click Next
d. Add should be the only option; click Next
e. Use the default name LISTENER and click Next
f. Leave TCP as the Selected Protocols, and click Next
g. For new systems, use the default port of 1521, for older systems use 1527 if
appropriate
h. Select No that you do not want to create another listener, and click Next
i. When Listener configuration is complete, click Next
j. Click Finish
k. Ensure the new listener service has been created and is started
Connect to the database with sqlplus (it should be in an up state)
a. sqlplus /nolog

12)

b. connect / as sysdba
c. shutdown immediate
Ensure that the database will not auto-start, run from CLI the following:
oradim edit sid <SID> -startmode manual
Yes; do the above again

13)
14)
15)

Reboot
Once the system has restarted, use sqlplus to start the database.
Upgrade Complete!

You might also like