Sunteți pe pagina 1din 10

ORACLE 11g Upgrade

ORACLE 11g Upgrade

Documentation based on Solaris10

Oracle 11G Upgrade Documentation

By Jaleel Ahmed

ORACLE 11g Upgrade

Pre-requisites

1. Need to apply patch set 10.2.0.4 if you are on 10.2.0.2

2. Implement sap notes 1416108, 1414733, 1433301 and 1417124 if running with patch levels mentioned below

SAP_BASIS 7.00 SP21

SAP_BASIS 7.01 SP06

SAP_BASIS 7.02 SP02

SAP_BASIS 7.10 SP10

SAP_BASIS 7.11 SP05

SAP_BASIS 7.20 SP02

Required Patch Downloads

01. Download 11ginstall_11202_rev016.zip as from sap note 1524205.

02. Download p9584028_112020_Generic.zip (Pre and post upgrade scripts) from sap Note

1431793

03. Download SAP Bundle Patch 11.2.0.2.1 SAP_112021_201102_SOLX8664.zip or

SAP_112021_201102_SOL64.zip as per sap note 1503759 you must use OPatch version 11.2.0.1.3, MOPatch version 2.1.7 to install this SBP

04. Download the latest OPatch, MOPatch, follow sap note 1027012

Notes to be refered before Upgrade

Note 1431800 - Oracle 11.2.0 Central Technical Note

Note 1398634 - Oracle database 11g Integration in SAP environment Note 1454627 - Additional Info Corrections to Oracle 11g Upgrade Guide Note 1524205 - Oracle 11.2.0 Database Software Installation Note 1431796 - Oracle 11.2.0 Troubleshooting the Software Installation Note 1431797 - Oracle 11.2.0 Troubleshooting the Database Upgrade Note 1431798 - Oracle 11.2.0 Database Parameter Settings Note 1503709 - Oracle 11.2.0 Patches Patch collections for 11.2.0.2 Note 850306 - Oracle Critical Patch Update Program Note 1557318 - CPU patches January 2011 (Oracle Critical Update program) Note 1027012 - MOPatch - Install Multiple Oracle Patches in One Run Note 1477787 - Optimizer merge fix for Oracle 11.2.0.1

ORACLE 11g Upgrade

Note 1430669 - BRTools support for Oracle 11g Note 1449619 - BRTools cannot be started on Oracle 11g Note 1428529 - Corrections in BRTools Version 7.20 Note 1431793 - Oracle 11.2.0 Upgrade Scripts Note 819829 - Oracle Instant Client Installation and Configuration on UNIX Note 1431794 - Oracle 11.2.0 Instant Client Note 1020260 - Delivery of Oracle statistics (Oracle 10g, 11g) 850306 – Oracle Critical Patch Update Program Note 134592 – Update SAPDBA Role Note 834917 – SAPCONN Role Note 306408 – OPatch Patch installation Note 905279 - DBUA/Upgrade to 10g: upgrade.xml is not a valid XML file. Note 1417124 - Error ORA-20001 in statistics class CL_SDB_ORA_UPDATE_STATS Note 1416108 - Error in consistency check of tables (transaction SE14) Note 1414733 - Missing double quotation marks in range partitioning Note 1433301 - Error w dictionary-managed tablespaces and compressing LOBs Note 1550133 - Oracle Automatic Storage Management (ASM)

Required CD’s / DVDs Patch Downloads

Oracle 11g R2 (11.2.0.2) is available as direct installation

Go to https://websmp201.sapag.de/SWCENTER 3PMAIN

Solaris sparc:

EXE

51040092_1

ORACLE RDBMS 11.2.0.2 SOL. SPARC 64 1 of 6

Info

976563

13.01.2011

RAR

51040092_2

ORACLE RDBMS 11.2.0.2 SOL. SPARC 64 2 of 6

Info

976563

13.01.2011

RAR

51040092_3

ORACLE RDBMS 11.2.0.2 SOL. SPARC 64 3 of 6

Info

976563

13.01.2011

RAR

51040092_4

ORACLE RDBMS 11.2.0.2 SOL. SPARC 64 4 of 6

Info

976563

13.01.2011

RAR

51040092_5

ORACLE RDBMS 11.2.0.2 SOL. SPARC 64 5 of 6

Info

976563

13.01.2011

RAR

51040092_6

ORACLE RDBMS 11.2.0.2 SOL. SPARC 64 6 of 6

Info

456225

13.01.2011

Solaris x64:

 

EXE

51040093_1

ORACLE RDBMS 11.2.0.2 SOLARIS x64 1 of 5

Info

976563

13.01.2011

RAR

51040093_2

ORACLE RDBMS 11.2.0.2 SOLARIS x64 2 of 5

Info

976563

13.01.2011

RAR

51040093_3

ORACLE RDBMS 11.2.0.2 SOLARIS x64 3 of 5

Info

976563

13.01.2011

ORACLE 11g Upgrade

RAR

51040093_4

ORACLE RDBMS 11.2.0.2 SOLARIS x64 4 of 5

Info

976563

13.01.2011

RAR

51040093_5

ORACLE RDBMS 11.2.0.2 SOLARIS x64 5 of 5

Info

309236

13.01.2011

Oracle client for 11g database

Look in to SAP Note 1431794 - Oracle 11.2.0: Instant Client, before working with oracle client

Oracle instant clients version(s) 10.2.0.4.0 V3, 10.2.0.4.0 V4, 10.2.0.4 V5 and above are currently supported for SAP environments with Oracle Database Release 11.2.0.1 and

11.2.0.2.

Oracle 11.2 Instant Client is not certified for use in an SAP environment. Currently the Oracle 11.2 Client certification is planned for end of February 2011. 51039412 ORACLE Client V5 10.2.0.4

BRTools for 11g database

BR*Tools 7.20 patch 12

DBATL720O10_12-20005274.SAR

DBATOOLS Package for Oracle 10g and 11g

BRTools 7.20 is specially designed for full support to oracle 11g

Look into sap notes: 1428529, 1430669

Preparation Steps (Database Should be Up and Running)

1. Login as oraSID user

2. Check permissions for /oracle filesystem. This users should have Read,Write and Delete

permissions to this folder and all sub-folders

a. Test steps

b. Touch /oracle/write_file

c. rm /oracle/write_file

3. Create /oracle/stage/112_64 directory and provide 777 permissions to this directory.

4. Extract the Oracle software

a. cd /oracle/stage/112_64

b. Move oracle media to this location and extract *.SAR files SAPCAR –xvf OR111264.SAR

c. This creates folder called database and copies all the content.

/oracle/stage/112_64/database

ORACLE 11g Upgrade

5. Check the oraInventory directory

a. Back oracle inventory, if files exists

There will not be a file at this point in time

6. Create new oracle home directory in /oracle/SID

7.

a. mkdir /oracle/SID/112_64 Provide permissions 755 Ownership orasid:dba

Prerequisites

Checking prerequisites for the OUI:

a. cd /oracle/stage/112_64/database ./runInstaller –executeSysPrereqs

Checking operating system requirements (release, patches, kernel parameters):

a. cd /oracle/stage/112_64/database ./runInstaller –executePrereqs

8.

setting env variables

1. Make sure ORA_NLS10 is not set

2. Set env ORACLE_HOME = /oracle/SID/112_64

3. Set env ORACLE_HOME_SRC = /oracle/SID/102_64

4. Verify ORACLE_BASE, ORACLE_SID, SAPDATA_HOME

5. Set $ORACLE_HOME/lib:$LD_LIBRARY_PATH

6. Set

PATH=/oracle/SID/112_64/bin:/usr/java14_64/bin:.:/home/sidadm:/usr/sap/SID/SYS/e

xe/run:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/

bin:/usr/local/bin

9.

Oracle 11g binaries installation:

cd /oracle/stage/112_64/database/SAP ./RUNINSTALLER

At the end of installation it will pop a window asking to root.sh script located in /oracle/SID/112_64/root.sh

Log on with root user Go to directory /oracle/SID/112_64 Run ./root.sh

ORACLE 11g Upgrade

Now come back to pop window and click on ok. Oracle 11g binaries installation completed.

10. Copying Pre and post upgrade scripts to /oracle/<DBSID>/112_64

skzddb35:oracab 5%cd /oracle/<DBSID>/112_64

skzddb35:oracab 6%ls

sap

skzddb35:oracab 7%mv sap sap_orig

Copy scripts to /oracle/<DBSID>/112_64

skzddb35:oracab 9% Unzip p9584028_112020_Generic.zip

skzddb35:oracab 10% ls

p9584028_112020_Generic

skzddb35:oracab 11% cd p9584028_112020_Generic/9584028

skzddb35:oracab 12% ls

etc files README.txt

skzddb35:oracab 12% cd files skzddb35:oracab 13%ls

sap

skzddb35:oracab 13%cp –rpf sap /oracle/CAB/112_64/ Here new scripts are replaced with old scripts

11. Oracle 11g patch set:

Currently 11.2.0.2 is the latest and is available as direct installation, as of now no patch set is

required. Look in market place for new oracle patch set, if available.

12. Installing the Required SAP Bundle Patch:

Currently SAP Bundle Patch 11.2.0.2.1 is available

SAP_112021_201102_SOLX8664.zip or

SAP_112021_201102_SOL64.zip, implement same using latest MOPatch

13. Create links with shared library, to make BRTools 7.20 work with 11g

cd oracle/SID/112_64/lib Ln –s libnnz11.so libnnz10.so

14. Copy SQL*Net Files

Copy listener.ora, sqlnet.ora, and tnsnames.ora from /oracle/SID/102_64/network/admin Directory to /oracle/SID/112_64/network/admin

Add the following entry to the file listener.ora:

ADR_BASE_LISTENER = /oracle/DBSID/saptrace

ORACLE 11g Upgrade

15. Update oracle client

Create 10x_64 directory, permissions 755, ownership oracle:dba Uncar OCL10264.SAR and move the contents to oracle/client/10x_64 directory

51039412 ORACLE Client V5 10.2.0.4

15. Updating env profiles

Log on sidadm user Make changes to .sapenv_hostname.csh setenv LD_LIBRARY_PATH /usr/sap/SID/SYS/exe/run:/oracle/client/10x_64/instantclient

Make changes to .dbenv_hostname.csh setenv ORACLE_HOME /oracle/CAB/112_64 setenv ORA_NLS10 /oracle/CAB/112_64/nls/data

16. Before starting oracle 10g upgrade (Database upgrade)

Verify and confirm below environment variables points to 11g directories. Note: env will be different for both <SIDADM> and <ORASID> users.

a. ORACLE_HOME = /ORACLE/<DBSID>/112_64

b. Path

c. ORA_NLS10

d. LD_LIBRARY_PATH

e. Copy listener.ora, tnsnames.ora, sqlnet.ora from /oracle/CAB/102_64/network/admin to

/oracle/CAB/112_64/network/admin

And make changes in those files accordingly to 10g directories.

f. Verify /var/opt/oracle/oratab file. There should be a entry as SID:/oracle/SID/102_64:N, it should be with 102_64 directory. Never make changes to oratab file starting actual database upgrade

17. Running the Pre-Database Upgrade Scripts

cd /oracle/<DBSID>/112_64/sap/ora_upgrade/pre_upgrade

SQL> conn /as sysdba Connected. SQL> spool /oracle/stage/log/pre_upgrade_status.log SQL> @/oracle/<DBSID>/112_64/sap/ora_upgrade/pre_upgrade/ pre_upgrade_status.sql SQL> spool off

SQL> conn /as sysdba Connected. SQL> spool /oracle/stage/log/pre_upgrade_tasks.log SQL> @/oracle/<DBSID>/112_64/sap/ora_upgrade/pre_upgrade/ pre_upgrade_tasks.sql SQL> spool off

ORACLE 11g Upgrade

SQL> conn /as sysdba Connected. SQL> spool /oracle/stage/log/pre_upgrade.log SQL> @/oracle/<DBSID>/112_64/sap/ora_upgrade/pre_upgrade/utlu112i.sql SQL> spool off

SQL> conn /as sysdba Connected. SQL> spool /oracle/stage/log/pre_upgrade_checks.log SQL> @/oracle/<DBSID>/112_64/sap/ora_upgrade/pre_upgrade/ pre_upgrade_checks.sql SQL> spool off

18. Run Database upgrade assistant

Check all env variables before start, check oratab Log on with orasid user

skzddb35:oracab 12% ./dbua.sap.sh –q

./dbua.sap.sh –q

In query mode certain parameter files (init<DBSID>.sap, listener.ora, etc.) are copied from the source Oracle Home to the target Oracle Home.

Database structure is updated.

SQL> select version from v$instance; VERSION

-----------------

11.2.0.2.0

SQL> select comp_id, version, status from dba_registry; COMP_ID VERSION STATUS ------------------------------ ------------------------------ ----------- CATALOG 11.2.0.2.0 VALID CATPROC 11.2.0.2.0 VALID

19. Checking the Upgraded Database

SQL> conn /as sysdba Connected. SQL> spool /oracle/stage/log/POST_UPGRADE_STATUS.log

SQL>@/oracle/<DBSID>/112_64/sap/ora_upgrade/post_upgrade/post_upgrade_status.sql

SQL> spool off

ORACLE 11g Upgrade

SQL> conn /as sysdba Connected. SQL> spool /oracle/stage/log/POST_UPGRADE_CHECKS.log

SQL>@/oracle/<DBSID>/112_64/sap/ora_upgrade/post_upgrade/post_upgrade_checks.sql

SQL> spool off

20. Post upgrade steps

1. SQL> alter system set compatible=’11.2.0’ scope = spfile; System altered.

Restart database

3. Upgrade BRTools with version 7.20 (BR*Tools 7.20 patch 12) Extract DBATL720O10_12-20005274.SAR and place in /sapmnt/SID/exe directory Run ./saproot.sh SID

Check brtools owner and permissions in directory /sapmnt/SID/exe

BRTools upgraded.

skzddb35:oracab 31% brtools BR0651I BRTOOLS 7.20 (12) BR0280I BRTOOLS time stamp: 2011-02-11 09.03.04 BR0656I Choice menu 1 - please make a selection

-------------------------------------------------------------------------------

BR*Tools main menu

1 = Instance management

2 - Space management

3 - Segment management

4 - Backup and database copy

5 - Restore and recovery

6 - Check and verification

7 - Database statistics

8 - Additional functions

9 - Exit program

Note: sapdba_role.sql, sapconn_role.sql are only required to run if your source database was 9.2.0.8

ORACLE 11g Upgrade

4.

Gather Oracle optimizer statistics by executing the following commands as the ora<dbsid> user:

brconnect -u / -c -f stats -t system_stats brconnect -u / -c -f stats -t oradict_stats

5.

Update the Oracle database statistics with BRCONNECT as follows:

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

6.

Now try logging with user = schema owner (SAPR3) with default password SAP.

If log on was not successful then change password using brtools or brconnect command. Brconnect –u system/<syst_pwd> -f chpass –o sap<sid> -p <new_sap_pwd> Check and verify logon is successful

SQL> conn Enter user-name: sapr3 Enter password:

7.

Check if all links are loading. skzddb35:oracab 54% cd /sapmnt/CAB/exe skzddb35:oracab 55% ldd dboraslib.so

8.

Check sap connectivity

skzddb35:cabadm 54% R3trans –d

This is R3trans version 6.14 (release 700 - 12.01.10 - 10:02:00). R3trans finished (0000).

9.

Update oracle client on app servers

10.

Look for short dumps