Académique Documents
Professionnel Documents
Culture Documents
Documentation
Prerequisite of steps before starting Oracle upgrade 1. Upgrade Kernel to the 640 , Latest Patch Level 175. a. Login as SIDadm b. Stop the BW instance i. stopsap r3 ii. Wait for the instance to stop. c. Backup the current kernel. i. cd /sapmnt/SID ii. mv exe exe.backup iii. mkdir exe d. Install the Latest Kernel patch level i. cd /sapmnt/SID/exe ii. ./sapmnt/SID/exe.backup/SAPCAR xvf /bidump/kernel640/SAPEXE_17520000221.SAR iii. ./SAPCAR xvf /bidump/kernel640/SAPEXEDB_175-20000223.SAR 2. Edit the .db_<hostname>.sh & .db_<hostname>.csh a. Modify the ORA_NLS33 parameter to oracle 920 Path. 3. Start the BW Instance a. Login SIDadm b. Startsap r3 4. Extract the Latest SPAM patch into EPS/in a. Login SIDadm b. cd /usr/sap/trans c. SAPCAR xvf /bidump/spam620/KD62023.CAR d. SAPCAR xvf /bidump/sp620/KB62043.CAR e. SAPCAR xvf /bidump/sp620/KB62044.CAR f. SAPCAR xvf /bidump/sp620/KA62043.CAR g. SAPCAR xvf /bidump/sp620/KA62044.CAR 5. Apply the latest SPAM 620 a. Login into SAPgui in client 000 as DDIC user b. SPAM -> Support Packages -> Import spam/saint Update c. It may create a ABAP dump in Epilog phase. Ignore the dump d. Restart the SPAM and continue the import. 6. Apply the Basis and ABA Support Pack a. Login as DDIC user into Client 000 b. Execute the tcode SPAM c. Load the support packages from application server d. Apply the support packs of Basis 620 upto Patch level 44
11. Check the OS prerequisite a. Login as oraSID b. cd /oracle/stage/102_64/database c. setenv DISPLAY <your ipaddress>:0.0 (session id from xmanager title bar) d. ./runInstaller executeSysPrereqs e. Check the screen out of the the results and check for result line All installer requirements met. 12. Stopping Statspack Reports a. Login as oraSID b. sqlplus /nolog c. SQL> connect / as sysdba d. SQL> alter user perfstat identified by sap; e. SQL> connect perfstat/sap; f. SQL> select job,what from user_jobs; i. Check for the job number from the result g. SQL> execute dbms_job.remove(4); i. In this case, the job number is 4. Check current query result and delete. h. SQL> select job,what from user_jobs; i. Now there should be 0 records. 13. Create the SPFILE from the PFILE a. Sqlplus /nolog b. Connect / as sysdba c. Create spfile from pfile; d. Shutdown immediate e. Startup f. Show parameter spfile i. You can check the output for the physical file name reference. ii. You can also check the spfileSID.ora file is created in /oracle/SID/920_64/dbs directory. 14. Execute the sapconn_role.sql a. cp /oracle/stage/102_64/database/SAP/sapconn_role.sql /oracle/SID/920_64/dbs cd /oracle/SID b. cd /oracle/SID/920_64/dbs c. sqlplus /nolog @sapconn_role.sql d. check the sapconn_role.log for any errors 15. Create the Automatic Undo Management Tablespace as per the Note 600141. a. Login as oraSID b. mkdir /oracle/SID/sapdata6/undo c. sqlplus /nolog
d. connect / as sysdba e. spool /oracle/stage/log/Mig_Manual_2_AUM.log f. Detect the current undo management mode i. show parameter undo ii. select segment_name,tablespace_name,status from dba_rollback_segs; 16. The values are considered to create the tablespace i. Undo Retension (UR) = 4Hrs ii. Undo block changes /sec = 350 /sec iii. Block size = 8192 Bytes iv. Undospace = (4 * 3600) * (500*8) v. This results too 40320000 ( 38.5 GB) 17. Use the following commands to create the tablespace a. create undo tablespace PSAPUNDO datafile /oracle/SID/sapdata6/undo/undo.data1 size 20480M reuse autoextend off; b. alter tablespace PSAPUNDO add datafile /oracle/SID/sapdata6/undo/undo.data2 size 20480M autoextend off; c. Assigning the Undo tablespace i. Alter system set undo_tablespace = PSAPUNDO scope = spfile; d. Set the Undo Retention time for 6 Hrs i. Alter system set undo_retention = 21600 scope = spfile; e. Activate the AUM i. Alter system set undo_management = auto scope = spfile; f. Restart the database to make the changes effective i. shutdown immediate ii. startup iii. show parameter undo (This should show the following Output) 18. To Avoid the DBUA Starting problem ,Apply the note 905279. a. Drop the PSAPTEMP tablespace b. drop tablespace PSAPTEMP including contents and datafiles; c. create temporary tablespace PSAPTEMP tempfile '/oracle/SID/sapdata3/temp_1/temp.data1' size 5120M; d. alter database default temporary tablespace PSAPTEMP; 19. Check for the Invalid objects in the database a. select owner,object_name,object_type from dba_objects where status='INVALID'; b. select owner,object_type,count(*) from dba_objects where status='INVALID' group by owner,object_type; 20. Install the Oracle 10g Instance Client as per the note 819829. a. cd /oracle/client
NAME TYPE VALUE NAME undo_management undo_retention undo_suppress_errors undo_tablespace TYPE string integer Boolean string VALUE AUTO 21600 FALSE PSAPUNDO
ii. Sqlplus /nolog iii. Connect / as sysdba iv. @/oracle/stage/102_64/database/SAP/CHECKS.SQL b. As per the output check the value is set as NLS_LANG to AMERICAN_AMERICA.WE8DEC. 8. Start the Oracle Universal Installer a. Login as oraSID b. cd /oracle/stage/102_64/database/SAP c. setenv DISPLAY <ipaddress of the PC>:0.0 d. ./RUNINSTALLER e. Choose the default selections in the following screens f. Ignore the warning prompted in the Product specific prerequisite check for Check Security Kernal Parameters. To Ignore click on the check box next to it. g. Click on the Install button in summary screen, to start the installation of the Oracle 10g software. h. For the final process the installer prompt to execute a script from root user. Follow the steps i. Open a new windows ii. Make sure that you are in root user iii. Change directory to /oracle/SID/102_64 iv. Change directory to /oracle/oraInventory v. Execute ./ orainstRoot.sh vi. Change directory to /oracle/SID/102_64 vii. ./root.sh viii. Answer the following prompts 1. Enter the full pathname of the local bin directory: [/usr/local/bin]: 2. The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y 3. The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y 4. The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y ix. Click OK in the window prompted to execute this, to proceed further. i. This ends the Oracle 10g software installation. ii. Click Exit button to exit and confirm as Yes in the following window. 9. Install the Oracle Patch 10.2.0.2. a. Login as oraSID b. Extract the patch to the stage directory from the cd i. Cd /oracle/stage/102_64 ii. Mkdir patch102 iii. Cd patch102 iv. Unzip /bidump/RDBMS1002/d51031725/SOLARIS64/p4547817_10202_SOLARIS64.zip c. Check the env DISPLAY is set ok d. Cd /Disk1
e. ./runInstaller f. Choose Next in the initial screen g. Check the oracle home name is SID_102_64 h. Check the oracle patch shown is same as environment variable ORACLE_HOME i. Click Next button j. Click Install button in the summary screen. k. For the final process the installer prompt to execute a script from root user. Follow the steps i. Open a new windows ii. Make sure that you are in root user iii. Change directory to /oracle/SID/102_64 iv. ./root.sh v. Answer the following prompts 1. Enter the full pathname of the local bin directory: [/usr/local/bin]: 2. The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y 3. The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y 4. The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y vi. Click OK in the window prompted to execute this, to proceed further. l. This ends the Oracle 10g software installation. i. Click Exit button to exit and confirm as Yes in the following window. 10. Upgrade the OPatch version before starting the interim patch installation a. Login as oraSID b. Rename the exiting OPatch folder in ORACLE_HOME to ORACLE_SAVE i. mv OPATCH OPATCH.SAVE c. Create OPATCH directory i. mkdir OPATCH d. Extract the OPATCH new version i. unzip /bidump/OPatch/p4898608_10202_GENERIC.zip 11. Installation of Interim patches a. Create directory interim under /oracle/stage b. cd /oracle/stage/interim c. unzip P5117016_10202_SOLARIS64.ZIP d. This creates the directory under /oracle/stage/interim/ e. Check the directory name and structure f. Apply the patch with the following command i. Add the /oracle/SID/102_64/OPatch to the $PATH environment variable i. setenv PATH $ORACLE_HOME/OPatch:$PATH ii. cd $ORACLE_HOME/OPatch iii. opatch apply /oracle/stage/interim/<Patch Number> -verbose
g. Follow the same steps for all interim patches listed in the note 871096. 12. Copy and adapt the SQL*Net files a. Login as oraSID users b. Copy the listener.ora,sqlnet.ora and tnsname.ora files from /oracle/SID/920_64/network/admin to /oracle/SID/102_64/network/admin c. Modify the listener.ora and modifty the oracle home reference to current ORACLE_HOME d. Check the /var/opt/oracle/oratab for the correct entry i. It should be SID:/oracle/SID/920_64:N ii. If it is not as above do the changes as above iii. If the entry is not there, exit the file and add the entry as above.
1. Choose check for the recompilation of invalid objects 2. Select the check box for disable the Archive log during the upgrade. 3. Click on Next to proceed xiii. Select the I already backed up my database and choose next xiv. In the Management Options screen disable the Configure the database with enterprise manager option xv. Ignore the warning about the LISTER config, Proceed further by clicking Ok button. xvi. Click Finish on the summary Screen 2. Upgrade / Conversion Time a. Conversion Started By 10:45 Am b. Conversion End By 12:07 Pm c. Total Conversion Time 1Hr 30Min (Approx)
iii) Make sure that the command returns the status VALID. iv) Check that the version returned in the previous two commands is identical as 10.2.0.2.0 2) Update the latest BR*Tools for Oracle 10g
i) Extract the latest BR*Tools to the kernel directory /sapmnt/SID/exe (i) Cd /sapmnt/SYS/exe (ii) Sapcar xvf DBATL700O10_18-20001045.SAR ii) Copy the initSID.sap from /oracle/SID/920_64/dbs directory (i) Cd $ORACLE_HOME/dbs (ii) Cp /oracle/SID/920_64/dbs/initSID.sap . 3) Update the permissions for the OS$ users for BR*Tools usage i) cp /sapmnt/SID/exe/sapdba_role.sql /oracle/SID/102_64/dbs ii) cd /oracle/SID/102_64/dbs iii) ./sqlplus /nolog @sapdba_role SID 4) Change database compatibility by executing the following SQL command as the ora<dbsid> user a) Login as oraSID b) Sqlplus /nolog c) Connect / as sysdba i) SQL> alter system set compatible='10.2.0' scope = spfile; d) Restart the Oracle database. i) Shutdown immediate ii) startup 5) Deactivate the Oracle recycle bin by executing the following SQL command as the ora<dbsid> user: a) SQL> purge dba_recyclebin; b) SQL> alter system set recyclebin = 'off' scope = spfile; 6) Gather Oracle optimizer statistics as follows: a) Execute the following commands as the ora<dbsid> user: b) SQL> spool $ORACLE_HOME/cfgtoollogs/dbstats.log c) SQL> execute dbms_scheduler.disable('GATHER_STATS_JOB'); d) SQL> execute dbms_stats.gather_system_stats; e) SQL> execute dbms_stats.gather_dictionary_stats (ESTIMATE_PERCENT => NULL, METHOD_OPT => 'FOR ALL COLUMNS SIZE AUTO',GRANULARITY => 'ALL', CASCADE => TRUE, OPTIONS => 'GATHER', NO_INVALIDATE => FALSE); f) SQL> execute dbms_stats.gather_fixed_objects_stats; g) Check the log file dbstats.log created at $ORACLE_HOME/cfgtoollogs for any errors during the gathering of statistics. 7) Identify the objects that are invalid after the upgrade as follows: a) Execute the following commands as the ora<dbsid> user: b) SQL> @?/rdbms/admin/utlrp.sql; c) SQL> spool $ORACLE_HOME/cfgtoollogs/invalid_post.log d) SQL> select count(*) from dba_objects where status = 'INVALID';
e) SQL> select substr(owner,1,12) owner, substr(object_name,1,30) object, substr(object_type,1,30) type, status from dba_objects where status <>'VALID' order by owner; f) SQL> spool off; g) Check the log file to compare the invalid objects before the start of the upgrade to the upgraded system 8) Disable the following oracle parameters a) Alter system reset commit_write scope = spfile sid=*; b) Alter system reset cursor_space_for_time scope = spfile sid=*; c) Alter system reset db_file_multiblock_read_count scope = spfile sid=*; d) Alter system reset hash_join_enabled scope = spfile sid=*; e) Alter system reset log_archive_start scope = spfile sid=*; f) Alter system reset optimizer_index_cost_adj scope = spfile sid=*; g) Alter system reset optimizer_mode scope = spfile sid=*; h) Alter system reset statistics_level scope = spfile sid=*; i) Alter system reset timed_statistics scope = spfile sid=*; j) Alter system reset trace_enabled scope = spfile sid=*; 9) Restart the database to activate the changes a) Sqlplus /nolog b) Connect / as sysdba c) Shutdown immediate; d) Startup 10) Gather Statistics for SAP Schema a) sqlplus /nolog b) SQL> connect / as sysdba c) SQL> @/oracle/stage/102_64/database/SAP/updDBSTATC10.sql 11) Update the DBCHECKORA control table after the upgrade as follows: a) cd /oracle/stage/102_64/database/SAP b) sqlplus sap<sid>/<pwd> @dbcheckora10upgr 12) Checking the oratab entry a) cd /var/opt/oracle b) Make sure that there is an entry like the following in your oratab file: i) SID:/oracle/C11/102_64:N 13) Start the Listener process a) Login oraSID b) Check the status of the listener process (i) lsnrctl staus c) if the process is already not running, start the process i) To start the listener
ii) lsnrctl start 14) Dont rename the old oracle home directory, just rename the /oracle/SID/920_64 directory. a) mv /oracle/SID/920_64/bin /oracle/SID/920_64/bin.old 15) Change the following R3 instance parameter to the new oracle home /oracle/SID/102_64. a) DIR_ORAHOME b) DIR_CLIENT_ORAHOME c) DIR_SERVER_ORAHOME 16) Install the Oracle 9.2.0.7 Client software as per the note 886783 a) Login as oraSID b) cd /oracle/client c) mkdir 92x_64 d) cd 92x_64 e) SAPCAR xvf /oracle/stage/920_64/client/OCL92064.SAR 17) Login as SIDadm a) Edit .dbenv_P046XPPPCO.sh b) Modify the ORACLE_HOME=/oracle/SID/920_64 c) Modify the ORA_NLS33=/oracle/client/92x_64/ocommon/nls/admin/data d) Modify the Variable LD_LIBRARY_PATH=LD_LIBRARY_PATH=/usr/sap/SID/SYS/exe/run:/oracle/SID/920_64/lib
Appendix I
Oracle Patch Installed List
oraSID> opatch lsinventory Invoking OPatch 10.2.0.2.2 Oracle interim Patch Installer version 10.2.0.2.2 Copyright (c) 2005, Oracle Corporation. All rights reserved.. Oracle Home : /oracle/SID/102_64 Central Inventory : /oracle/oraInventory from : /var/opt/oracle/oraInst.loc OPatch version : 10.2.0.2.2 OUI version : 10.2.0.2.0 OUI location : /oracle/SID/102_64/oui Log file location : /oracle/SID/102_64/cfgtoollogs/opatch/opatch2007-06-02_17-25-07PM.log Lsinventory Output file location : /oracle/SID/102_64/cfgtoollogs/opatch/lsinv/lsinventory2007-06-02_1725-07PM.txt -------------------------------------------------------------------------------Installed Top-level Products (2): Oracle Database 10g 10.2.0.1.0 Oracle Database 10g Release 2 Patch Set 1 10.2.0.2.0 There are 2 products installed in this Oracle Home.
Patch 6033289 : applied on Wed May 30 17:44:50 IST 2007 Created on 10 May 2007, 23:15:51 hrs PST8PDT Bugs fixed: 4430244, 5752105, 5558627, 5376783, 5212539, 5913430, 5386204, 5093837 5667736, 6033289, 5245129, 5959612, 3279497, 4771672, 5728380, 5657620
Patch 5638146 : applied on Wed May 30 17:37:53 IST 2007 Created on 18 Apr 2007, 22:30:08 hrs PST8PDT Bugs fixed:5638146
Patch 5618049 : applied on Wed May 30 17:30:37 IST 2007 Created on 6 Mar 2007, 00:41:49 hrs US/Pacific
Bugs fixed:5618049
Patch 5530958 : applied on Wed May 30 17:25:15 IST 2007 Created on 29 Mar 2007, 14:06:56 hrs PST8PDT Bugs fixed:5530958
Patch 5915774 : applied on Wed May 30 17:19:12 IST 2007 Created on 15 Mar 2007, 20:37:58 hrs US/Pacific Bugs fixed:4599763, 4772145, 5915774, 5284303
Patch 4883635 : applied on Wed May 30 17:18:27 IST 2007 Created on 20 Feb 2007, 13:29:55 hrs US/Pacific Bugs fixed:4883635
Patch 5636728 : applied on Wed May 30 17:12:35 IST 2007 Created on 15 Feb 2007, 19:45:14 hrs PST8PDT Bugs fixed:5636728
Patch 4518443 : applied on Wed May 30 17:07:12 IST 2007 Created on 20 Jun 2006, 06:23:25 hrs PST8PDT Bugs fixed:4518443
Patch 4668719 : applied on Wed May 30 17:06:27 IST 2007 Created on 9 Aug 2006, 02:22:35 hrs US/Pacific Bugs fixed:4668719
Patch 4899479 : applied on Wed May 30 17:00:01 IST 2007 Created on 23 Aug 2006, 06:10:09 hrs US/Pacific Bugs fixed:4899479
Patch 5635254 : applied on Wed May 30 16:54:39 IST 2007 Created on 22 Nov 2006, 22:54:11 hrs US/Pacific Bugs fixed:5635254
Patch 5063279 : applied on Wed May 30 16:52:11 IST 2007 Created on 29 Nov 2006, 07:07:18 hrs PST8PDT Bugs fixed:5063279
Patch 4742607 : applied on Wed May 30 16:46:06 IST 2007 Created on 22 Aug 2006, 05:15:27 hrs US/Pacific Bugs fixed:4742607
Patch 5571916 : applied on Wed May 30 16:41:04 IST 2007 Created on 18 Oct 2006, 06:25:48 hrs PST8PDT Bugs fixed:5571916
Patch 5984705 : applied on Wed May 30 16:36:16 IST 2007 Created on 18 Apr 2007, 15:23:24 hrs US/Pacific Bugs fixed: 4483240, 5449488, 5483301, 5245494, 5381446, 5057695, 5548510, 5680702 4904838, 5984705, 5380055, 5741121, 4273361, 5766310, 4698023, 4372359 4722645, 5705257, 3901785, 5762598, 5397482, 5043097, 5033476, 5399282 5113934, 5547058, 5690241, 5126551, 5649765, 5089444, 4648181, 5129407 5172444, 5966822, 5884780, 5084239, 4712638, 5694984
Patch 5363584 : applied on Wed May 30 16:30:41 IST 2007 Created on 3 Aug 2006, 22:32:51 hrs US/Pacific Bugs fixed: 5363584
Patch 5369855 : applied on Wed May 30 16:23:41 IST 2007 Created on 24 Aug 2006, 22:18:36 hrs US/Pacific Bugs fixed: 5369855
Patch 5103126 : applied on Wed May 30 16:17:04 IST 2007 Created on 3 Jul 2006, 21:35:47 hrs US/Pacific Bugs fixed: 5103126
Patch 4638550 : applied on Wed May 30 16:11:19 IST 2007 Created on 26 Apr 2006, 22:06:12 hrs US/Pacific Bugs fixed: 4638550
Patch 4864648 : applied on Wed May 30 16:05:32 IST 2007 Created on 31 Mar 2006, 03:36:35 hrs US/Pacific Bugs fixed: 4864648
Patch 5090361 : applied on Wed May 30 16:03:35 IST 2007 Created on 28 Mar 2006, 14:44:10 hrs US/Pacific Bugs fixed: 4604970
Patch 5099986 : applied on Wed May 30 15:43:02 IST 2007 Created on 28 Mar 2006, 14:34:24 hrs US/Pacific Bugs fixed: 5092134
Patch 5117016 : applied on Wed May 30 15:19:36 IST 2007 Created on 30 Mar 2006, 12:52:17 hrs US/Pacific Bugs fixed: 5117016 -------------------------------------------------------------------------------OPatch succeeded.