You are on page 1of 11

Oracle Upgrade Procedure: Sl. No. 1.

Required SAP Notes:

Description

Remarks Read all the SAP Notes listed here for any relevance. Hold a copy of the note for offline reference.

2. 3.

Note 156548 - Released operating systems SAP kernel 4.6x ORACLE Note 493143 - ORACLE upgrade to 9.2.0: Windows Note 567301 - Upgrade from 8.1.7 to 9.2 fails with ORA3114 and ORA-7445 Note 578683 - Installation of Newest Patch Set for Oracle 9.2.0 Note 650638 - Oracle 7.2 datafile conversion tool for Windows Note 306408 - OPatch: Oracle tool for patch installation Note 684106 - Microsoft runtime DLLs Get the access details: OS and DB version meets SAP requirements. Please check SAPNotes: Note 156548 - Released operating systems SAP kernel 4.6x ORACLE

to check if the Oracle and OS versions match the SAP requirements.


4. 5. Login as <SAPSID>ADM SAP and Oracle Version Details SAP Version 4.6C SAP Kernel Oracle Version 8.1.7 Oracle Patchset

6. 7.

Confirm the SAP Instance(s) are shutdown clean Set the NLS_LANG environment variable for the OS ser <SID>ADM. NLS Character Set can be found from the Source Database using the following query: SQLPLUS Connect / as sysdba SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER LIKE 'NLS_CHAR%'; Take the value of the parameter NLS_CHARACTERSET

Set the variable NLS_LANG in the Windows user environment of <SAPSID>adm. If you are upgrading or migrating a database client, do this on the client machine. If NLS_CHARACTERSET has the value WE8DEC, set NLS_LANG to AMERICAN_AMERICA.WE8DEC

8.

(Oracle 10g only.) Check the Oracle SYSTEM and SYSAUX tablespaces for 750MB free space each. brspace f dbshow c tsinfo s SYSTEM brspace f dbshow c tsinfo s SYSAUX (Oracle 10g only.) List the number of invalid objects in the database SQL> spool invalid_objects SQL> select unique object_name, object_type, owner from dba_objects where status = 'INVALID'; SQL> @?/rdbms/admin/utlrp.sql SQL> select unique object_name, object_type, owner from dba_objects where status = 'INVALID';

9.

10 . 11 .

Shutdown the Oracle database Backup the Oracle Database (Offline mode preferred) Backup should be for the following folders: \ORACLE Save the database \<ORACLE_HOME> Save the Oracle software Backup the Operating System Registry Shutdown all the Oracle related services on the server Run the executable R3DLLINS.EXE (SAPNOTE 684106)

Done.

12 . 13 . 14 .

Backup the full registry

15 .

The DLLs can be downloaded with the SAP Note 684106 Start the Oracle installation. Choose a new ORACLE_HOME for the upgrade. The existing ORACLE_HOME must not be overwritten. SAP recommends using <SAPSID><ORACLE_VERSION> (ex: C11920) Choose the path for the Oracle Home as <Drive:>\ORACLE\<DBSID>\<ORA_VERS> (ex: D:\ORACLE\C11\920)

Done.

16 . 17 .

Choose NO for creation of Database For Oracle Net Configuration Assistant, select the Perform typical Configuration option and continue

Done. Done. Experienced errors during Remote installation. Configured from the Console.

18 .

Install the required Oracle Patch set. The Patch set must be installed in the same ORACLE_HOME path as the new Oracle software Before starting the Patch set installation, check that all the Oracle services are shutdown.

Here, you have to shutdown the Oracle Database Server compulsorily. Install the latest patch set. The current available patch set is 9.2.0.8.0 If you have problem logging thru the SQL*Plus, connect via SVRMGR tool

19 .

Restart the Oracle8 services and bring up the database. Bringing up Oracle8i is required for the Database upgrade assistant to run.

20 .

Delete the following Environment variables: ORACLE_HOME and TNS_ADMIN The OS user will be <SID>ADM Edit the Oracle parameter file INIT<SID>.ORA and set JOB_QUEUE_PROCESSES=0

You can set the ORACLE_HOME path to Oracle9i instead of deleting, though. If the parameter does not exist, you can add the

21 .

22 . 23 . 24 . 25 .

The file is in the Old Oracle_home directory Copy the Oracle init<SID>.ora file from Oracle8i to Oracle 9i From C:\oracle\ora81\database to C:\oracle\PRA\920\dbs Log off and log on to the user <SID>ADM again Confirm SAP instance is shutdown Start the Upgrade process: a. Start the Oracle Database Upgrade Assistant. START >> Programs >> Oracle >> <NEW_ORACLE_HOMENAME> >> Configuration and Migration Tools >> Database Upgrade Assistant. b. Select the SID you are upgrading. SAP instance must be shutdown now compulsorily This process takes less than 20mins.

26 .

c. Do not change the passwords for any of the Oracle users d. Close the Database Upgrade Assistant Post-Upgrade Procedure: Create a Oracle Listener with the SID and SAP Port details using the Oracle Net8 Configuration Assistant and Net8 Manager. 1. Stop the old Oracle Listener service. 2. Start the New Oracle Net Manager Start Programs Oracle <NEW_ORACLE_HOMENAME> Configuration and Migration Tools Net Manager 3. on the right side of the Net Manager, in the default domain field add world

4. On the right side, in the Methods tab, remove the entries hostname and onames

5. On the Left side, select Listener, on the right


side, under the Listening Locations option, on the address tab, modify the port number to 1527

6. In the tree on the left, expand Service Naming


and select <DBSID>.<tcp/ip_dns_name> Choose Edit Rename. Enter the name <DBSID>.world and choose OK

7. On the right, in Address Configuration choose


the plus icon to open a dialog box for a new address. Enter the port number 1527

8. Under Service Identification select Use Oracle8


Release Compatible Identification. For SID enter <DBSID>. 9. Save and Close the Net Manager

10. Start the Oracle9i Listener Service.

27 .

Follow the Oracle920 upgrade document strictly. Add the following line in the Oracle Network file SQLNET.ORA Tcp.nodelay = TRUE SQLNET.ORA file can be found in the folder \\ORACLE_HOME\NETWORK\ADMIN\ In the <NEW_ORACLE_HOME> directory for 9.2.0, create the subdirectory SAP. From the Oracle RDBMS CD3, copy all the files from the directory <CD_DRIVE>:\NT\I386\SAP to the new SAP directory Copy the INITSID.ORA and INITSID.SAP files from the old ORACLE_HOME\database folder to the new ORACLE_HOME\database\ folder Startup the Database and create the PFILE for modifying the Oracle Parameters from the SPFILE. Command: CREATE PFILE FROM SPFILE;

28 .

Copy the files dbatools.sar and sapcar.exe

29 . 30 .

Done. Done.

31 .

Delete the SPFILE<DBSID>.ora Make sure that the following parameters point to the correct directory: background_dump_dest has to point to <drive>:\oracle\<DBSID>\saptrace\background core_dump_dest has to point to <drive>:\oracle\<DBSID>\saptrace\background user_dump_dest has to point to <drive>:\oracle\<DBSID>\saptrace\usertrace Start the Administration Assistant with Start Programs Oracle<NEW_ORACLE_HOMENAME> Configuration and Migration Tools Administration Assistant for Windows NT In the Properties dialog box, change the entry for ORA_<DBSID>_PFILE to: <NEW_ORACLE_HOME>\DATABASE\init<dbsid>.ora v. Set the entry for ORA_<DBSID>_AUTOSTART to FALSE and confirm with OK. Set the environment variable TNS_ADMIN to \\<sapglobalhost>\sapmnt\<SAPSID>\SYS\profile\oracle Modify the Parameter Compatible as required to the current version. Modify the OS Environment variables to point from old

Done.

32 .

33 . 34 . 35

Done. Done. Done.

36 . 37 .

ORACLE_HOME to new Oracle_home Install the New BR*TOOLS in the SAP folder <NEW_ORACLE_HOME>\SAP\sapcar -xvf <NEW_ORACLE_HOME>\SAP\DBATOOLS.SAR Delete the Old Oracle Software Shutdown the database Stop the Oracle Services. De-install the Old Oracle software using the Oracle Universal Installer Delete the Old Oracle software services with the command ntscmgr remove <service_name> Delete all the Old Oracle software from the OS Reset the PATH environment variable to point to the new ORACLE_HOME folder Start the Oracle Database. Confirm the New Database version. (Oracle 10g only) Execute the SQL script sapconn_role.sql Creates a new Oracle Role related to SAP for External user authentication (Oracle 10g only) Install the Oracle Database client software (Oracle 10g only) Execute the script SAPDBA_ROLE.SQL sqlplus /nolog @sapdba_role <SAPSCHEMA_ID> (Oracle 10g only) Deactivate the Oracle recycle bin by executing the following SQL command as the <dbsid>adm user: SQL> purge dba_recyclebin; SQL> alter system set recyclebin = 'off' scope = spfile; (Oracle 10g only) Gather Oracle optimizer statistics as follows: Execute the following commands as the <dbsid>adm user: SQL> spool %ORACLE_HOME%/cfgtoollogs/dbstats.log SQL> execute dbms_scheduler.disable('GATHER_STATS_JOB'); SQL> execute dbms_stats.gather_system_stats; SQL> execute dbms_stats.gather_dictionary_stats (ESTIMATE_PERCENT => NULL, METHOD_OPT => 'FOR ALL COLUMNS SIZE AUTO', GRANULARITY => 'ALL',

Done.

38 . 39 . 40 . 41 .

Done. Done. Done.

42 . 43 . 44 .

Done.

Done.

45 .

Done.

46 .

CASCADE => TRUE, OPTIONS => 'GATHER', NO_INVALIDATE => FALSE); SQL> execute dbms_stats.gather_fixed_objects_stats; (Oracle 10g only) Modify the Oracle parameters as suggested in SAPNOTE 830576 Always download the latest version of SAPNote from the SAP Market place. (Oracle 10g only) Gather statistics for SAP schemas: sqlplus SAP<SAPSCHEMA_ID>/<password> SQL> update DBSTATC set activ = 'A' where activ in ('N, 'R'); SQL> commit; Update the Oracle database statistics with BRCONNECT as follows: brconnect -c -u / -f stats -t all f collect -p 4 Create the Oracle password file: Set the parameter remote_login_passwordfile to EXCLUSIVE Open a command prompt and create the pwd<DBSID>.ora file with the following command: orapwd file=%Oracle_Home%\database\pwd<DBSID>.ora password=<pwdFilePassword> entries=100 force=y Enter a password for <pwdFilePassword>.

Done.

47 .

Done.

48 . 49 .

Done. Done.

50 .

51 .

Stop and restart the Oracle database. To allow a database user, for example sap<sapsid>, or a system to connect to the Oracle database as sysdba or sysoper (connect dbusername/dbpassword as sysdba) although the database is not started, enter the following commands: sqlplus /nolog SQL>connect / as sysdba SQL>grant sysdba to <dbusername>; SQL>grant sysoper to <dbusername>; To deactivate user locking after invalid logon attempts, enter the following information in sqlplus: sqlplus /nolog sql>connect / as sysdba sql>ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED; sql>exit

Done.

Done.

You might also like