Top Banner
Application Installation Instruction for Oracle 10g (10.2.0.4) Database Upgrade Version 1.3 2 Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 1
38

Oracle 10 Upgrade Instruction_1.3

Jul 21, 2016

Download

Documents

banala.kalyan

sarasf
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Oracle 10 Upgrade Instruction_1.3

Application Installation Instruction

for

Oracle 10g (10.2.0.4) Database Upgrade

Version 1.32

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 1

Page 2: Oracle 10 Upgrade Instruction_1.3

Client: Jobcentre Plus

Authors: Sankar Natarajan [email protected] 0114 291 1968Richard Alderson [email protected] 0114 291 1233Gopinath Murali [email protected] 0114 291 1233

Change History:

Date Version Initials Change

17/03/2009 1.0 SN Initial version

05/05/2009 1.1 RA Updated post initial tests on Development databases

09/06/2009 1.2 SN Further changes following Peer Review.

23/09/2009 1.3 GM Further changes following Peer Review

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 2

Page 3: Oracle 10 Upgrade Instruction_1.3

Contents

1. Specification............................................................................................................................ 5Components to be installed.....................................................................................................5

2. Compatibility Matrix................................................................................................................. 53. Pre Upgrade Steps..............................................................................................................64.Upgrading the database.....................................................................................................205. Post Upgrade Steps..........................................................................................................22

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 3

Page 4: Oracle 10 Upgrade Instruction_1.3

TERMINOLOGY

Abbreviation/ Terminology

Description

ABSMASTER The Appointment Booking System Schema within the Database.

AII Application Installation Instruction.

AIX Advanced Interactive eXecutive; Proprietary Operating System developed by IBM based on UNIX system V.

DBA Data Base Administrator

DLL Dynamic Link Library (In case of LMS it would be LMSTUX.dll and various other DLLs that sit on the PC where the LMS front-end application is installed.

EDS Electronic Data Systems

EIT Early Integration Testing (EDS System Testing)

SFTP Secure File Transfer Protocol

IBM International Business Machines

IJBMASTER The Internet Job Bank Schema with the Database.

LMS Labour Market System

OAT Operational Acceptance Testing

MASTER The Master LMS Schema within the database.

MRIF Mid Range Hosting Services

OpenROAD The proprietary development environment, from Computer Associates, within which the major part of the LMS user interface is constructed.

PuTTY A free SSH client

SSH Secure Shell. A network protocol used to establish a secure channel between two computers.

SCP Secure Copy. The SCP program is used to copy files securely between two computers using the SCP protocol.

UAT User Acceptance Testing

UCT User Confidence Test

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 4

Page 5: Oracle 10 Upgrade Instruction_1.3

1. Specification

Components to be installed

Oracle 10g Enterprise edition release 2

1. Please install Oracle software 10.2.0 in the new Oracle Home (/apps/oracle/admin/10.2.0 following the document ‘Oracle 10g (Release 2) for AIX (To 10.2.0.4) –Software/Binaries Installation AII’ (Below Item No: 342 in the Configuration Management WebSite) or instructions on how to install Oracle 10.2.0.1 base release and then to upgrade to Oracle 10.2.0.4. If in any doubt about what is required then contact the DBA team. Make sure Oracle supports the version and any outstanding issues and any patches that should be applied2. Remember that the only way of backing out is re-creating the database in other words recovering from a backup,. A RMAN Cold/Hot backup would be preferable.3. Take a cold backup of the database before starting the upgrade or ask the Project DBA to take one. 4. Check for the necessary file permission on the new ORACLE_HOME directory before proceeding.

2. Compatibility Matrix

+ Minimum Version of the database that can be directly upgraded to Oracle 10g Release 2

8.1.7.4 -> 10.2.X.X.X 9.0.1.4 or 9.0.1.5 -> 10.2.X.X.X 9.2.0.4 or higher -> 10.2.X.X.X 10.1.0.2 or higher -> 10.2.X.X.X

Note. Most of the EDS Front Office and Back Office systems are at Oracle 9.2.0.5, 9.2.0.6 and 9.2.0.8

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 5

Page 6: Oracle 10 Upgrade Instruction_1.3

3. Pre Upgrade Steps

Create appropriate directories to proceed with the Oracle upgrade.

Step Action Command(s) Notes

1 Log in as oracle and switch to the database to be upgraded. Check that the Oracle database is up and running for the ORACLE_SID

sudo su – oracle switch $ORACLE_SID

ps –fuoracle | grep pmon

Switch to the $ORACLE_SID which needs to be upgraded. .

2 Create a backup directory. mkdir –p /apps/oracle/edsadmin

3 Copy the pre check files from Change Management to backup directory. If not already on the NIM server.

See Item No. 350 in the Configuration Management Media Library for tar file containing database upgrade scripts.

export UPGDIR=/apps/oracle/edsadminecho $ORACLE_SIDcd $UPGDIR

copy from the NIM the file oracle_10g_db_scripts.tar to the $UPGDIR

tar –xvf oracle_10g_db_scripts.tar

Copying the necessary Oracle Upgrade pre check files. The .sql files will be copied to the $UPGDIR.

4 Check the Oracle Home directory has necessary permissions and update if necessary.

cd /apps/oracle/productls –l

Should return something like below – i.e. that both the ‘9.2.0’ and the ’10.2.0’ directories exist:drwxr-xr-x 57 oracle dba 4096 17 Feb 17:58 9.2.0drwxr-xr-x 65 oracle dba 4096 12 Mar 11:41 10.2.0

If the permissions on the 10.2.0 directory are not as above, please update as

This step should have been performed in the AIX Oracle Binary software upgrade if not the step needs to be performed.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 6

Page 7: Oracle 10 Upgrade Instruction_1.3

follows:

chmod –R 750 /apps/oracle/product/10.2.0/apps/oracle/product/10.2.0/db_1

Note. If you do the chmod command any Warning messages re-Oracle not being the owner can be ignored – as there are a few ‘root’owned files.

5 Gather information about the database to be upgraded

cd $UPGDIR

sqlplus ‘/ as sysdba’spool database_ORACLE_SID_info.log

@utlu102i.sql

spool offexit

A sample of the output file is attached.

The script writes all the information to an output file: f02_01_database_info_$ORACLE_SID.lst – details about the parameters required to be modified in order to proceed with the upgrade.

Please check the log file to see if it has highlighted any changes to be made and liaise with the Project DBA if necessary.

If there are no changes required please proceed with the upgrade.

For any help please contact the Project DBA to discuss the errors and take the corrective actions.

6 Resolving issue around redo size if reported in the log file generated by Step 5 - Pre Upgrade Steps.

Resolving redo log size issue

Please find attachement on resolving redo log space issue

This step need to be done only if the script utlu102i.sql in Step no 5 gives information on increasing the size of the redo log file.

Please contact Project DBA to assist/fix if required. This issue is only likely to be encountered on the smaller databases used for DEV, Stest and UAT.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 7

Page 8: Oracle 10 Upgrade Instruction_1.3

Step Action Command(s) Notes

7 Resolving issue related to memory size if reported in the log file generated by Step 4 above.

Locate the initORACLE_SID.ora file.

Log in as oracle user

The file init$ORACLE_SID.ora should be located under :/apps/oracle/admin/$ORACLE_SID/pfile (if not see the Note.)

cd /apps/oracle/admin/$ORACLE_SID/pfile

Make a backup of the init$ORACLE_SID.ora file before proceeding by the command below.

cp /apps/oracle/admin/ORACLE_SID/pfile/initORACLE_SID.ora $UPGDIR/initORACLE_SID.ora.bak

Edit the file, change the following parameters as shown.vi initORACLE_SID.ora

change the value assoicated with the following parameters: shared_pool_size = 214288589large_pool_size = 8388608session_max_open_files = 30streams_pool_size = 50331648

Note. If the parameter is not present please add an entry to the initORACLE_SID.ora file. (This is likely to be the case with the last three on DWP Systems).

Changes to the values for shared_pool_size, large_pool_size, session_max_open_files, stream_pool_size as reported in database_ORACLE_SID_info.log of Step 6 Pre Upgrade steps.

Note. In few cases the init$ORACLE_SID.ora is located under $ORACLE_HOME/dbsNote. If this is the case please contact the Project DBA to copy it to the pfile area and to create a link from the /dbs area – so that there is only one version and in the /apps/oracle/admin/ORACLE_SID/[pfile area,

If no change is reported for the memory parameter then please proceed with the next step.

Please Note: If these values are higher please do not make these changes. The LMS production database has higher value for the memory parameters.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 8

Page 9: Oracle 10 Upgrade Instruction_1.3

8 Resolving space issue related to SYSTEM, UNDO tablespaces.

If reported in Step 6 above.

Again only likely to be encountered on the smaller Databases used for DEV, STEST and UAT.

Before proceeding with the resize please check for sufficient space on the file system. E.G.df –k /u02/oradata/$ORACLE_SID

RESOLVING UNDO TABLESPACE ISSUE:

Check the datafile name and size of the UNDO tablespace by issuing the below command

sqlplus ‘/ as sysdba’

SQL> select tablespace_name, file_name, sum(bytes/(1024*1024))from dba_data_fileswhere tablespace_name like ’%UNDO%’ group by tablespace_name, file_name;

Resize the datafile to the required size mentioned in the database_ORACLE_SID_info.log. Please follow the below example.

sql>!df –k /u02/oradata/$ORACLE_SIDto see if enough room in the filesystem to extend.

sql> alter database datafile ‘/u02/oradata/$ORACLE_SID/dbf/$ORACLE_SID_undo01.dbf’ resize 450M;Please be ensure that the correct datafile name and location are used for the above command, .(i.e. the file_name returned by the select statement above

This step need only be done if an error for LMS_UNDO space issue is reported in system tablespace by Step 5 of Pre Upgrade Steps

Note. This change will not be required on Life Size databases where the LMS_UNDO is already 6GB,

Please note the command to resize the undo datafile is only an exmpale the datafile name of the UNDO tablespace can be different.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 9

Page 10: Oracle 10 Upgrade Instruction_1.3

RESOLVING SYSTEM TABLESPACE ISSUE:

SQL> select tablespace_name, file_name, sum(bytes/(1024*1024))from dba_data_fileswhere tablespace_name like ’%SYSTEM%’ group by tablespace_name, file_name;

Resize the datafile to the required size mentioned in the database_ORACLE_SID_info.log – or to 400M as we recommend. Please follow the below example.

sql>!df –k /u02/oradata/$ORACLE_SIDto see if enough room in the filesystem to extend.

sql> alter database datafile ‘/u02/oradata/$ORACLE_SID/dbf/$ORACLE_SID_system01.dbf’ resize 400M;Please be ensure that the correct datafile name and location are used for the above command .(i.e. the file_name returned by the select statement above

RESOLVING TEMPORARY TABLESPACE ISSUES:

Check for file name and size of the temporary tablespace sqlplus ‘/ as sysbdba’

SQL> select file_name, sum(bytes/(1024*1024))from dba_temp_files group by file_name;

This steps needs to be performed only if an error is reported for not enough space on the SYSTEM tablespace in Step 5 of Pre Upgrade Step.

Note. On the smaller Databases will probbaly be set tp 250M – so will need updating.

This step needs to be performed only if an error was reported for not enough temporary tablespace in datebase_$ORACLE_SID_info.log of Step 5 - Pre Upgrade

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 10

Page 11: Oracle 10 Upgrade Instruction_1.3

Increase the size of the temporary tablespace TEMP to the size mentioned in the database_$ORACLE_SID_info.log. In the below example the temporary tablespace size is incrased by adding a temp file.

sql>!df –k /u02/oradata/$ORACLE_SIDto see if enough room in the filesystem to extend.

sql> alter tablespace temp add tempfile '/u02/oradata/$ORACLE_SID/dbf/temp01.dbf' size 100M;Please be ensure that the correct datafile name and location are used for the above command.

The temporary tablespace size needs to be increased by the amount mentioned in the database_$ORACLE_SID_info.log (minimum size is 58MB).

Where it is smaller on Test Size systems extemd by 100MB by adding another tempfile.

9 Check which users have the deprecated connect role.

cd $UPGDIR

sqlplus ‘/ as sysdba’ @03_01_check_connect_role.sql

Please note the output for this command will vary depending on the type of system being built:

A log file name 33_01_check_connect_role.log will be produced.

DBARELnn will show:MASTER, ABMASTER andIJBMASTER

For the main RELnn Development database the output should be:

ABSMASTER, DCMUSERDEV_USER, IJBMASTER,CFS and MASTER

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 11

Page 12: Oracle 10 Upgrade Instruction_1.3

And for STEST, UAT :ABSMASTER, (DCMUSER –UAT only) IJBMASTER, MASTER and TIVOLI).

For the Live ‘ES_LIVE’ database the following will be returned: ABSMASTERANALYZE_USERBATCHDCMUSERIJBMASTERMASTERTIVOLI

LMSSTATSMASTER

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 12

Page 13: Oracle 10 Upgrade Instruction_1.3

Step Action Command(s) Notes

10 Backup Grant information sqlplus ‘/ as sysdba’ @03_05_gen_rest_of_connect_grants.sql The script produces a file 03_05_gen_rest_of_connect_grants_{ORACLE_SID}.sql. Please do not run this script.

11 Backup db link informaton

sqlplus ‘/ as sysdba’ @04_01_gen_cre_db_links.sql This scipt produces a backup script 04_01_gen_cre_db_links_{ORACLE_SID}.sql. Please do not run this script.

12 Check the National Characterset Datatype

sqlplus ‘/ as sysdba’ @06_01_check_nchar_datatype.sql The query produces a log file 06_01_check_nchar_datatype_{ORACLE_SID}.lstThis querry should return no rows.

If the query returns any rows please refer to the Project DBA to see Metalink Note number 316889.1 Step 6 or contact Oracle support.

13 Export schema statistics sqlplus “/ as sysdba” @07_01_export_schema_stats.sql The script creates a log file 07_01_export_schema_stats_{ORACLE_SID}.lst.

Note. Error messages ORA-20000 and associated ORA-6512’s - ‘Schema does not exist or insufficent previleges can be ignored.

14 Compute schema statistics

sqlplus “/ as sysdba” @07_05_compute_schema_stats.sql The script produces a log file 7_05_compute_schema_stats_{ORACLE_SID}.lst. Note. Any warning messages about ‘insufficient privileges’ can be ignored.

15 Check invalid objects in the database

sqlplus ‘/ as sysdba’ @08_01_check_invalid_objects.sql The scipts lists all the invalid objects into the log file 8_01_check_invalid_pre_{ORACLE_SID}.lst and also attempts to compile the invalid objects. If any invalid objects please contact the Project DBA to

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 13

Page 14: Oracle 10 Upgrade Instruction_1.3

check.

16 Spool output of V$option sqlplus ‘/ as sysdba’ @09_01_inst_features_hist.sql This script list all the features that are installed in the existing 9i version. The report can be compared after upgrading to 10g to see any discrepancy

Check spool files for errors, if any.

17 Spool DBA_REGISTRY sqlplus ‘/ as sysdba’ @09_02_dba_registry.sql To list upgrade information of the database. The report can be compared after upgrading to 10g

Check spool files for errors, if any.

186 Check snapshot refreshes are completed successfully and replication is stopped.

sqlplus ‘/ as sysdba’ @10_01_check_snapshot_refreshes.sql The script checks for any replication that is pending. A log file is generated 10_01_check_snapshot_refreshes_${ORACLE_SID}.lst

Will display some dates on screen when snapshots were last refreshed – if any. If no ORA- errors please continue.

197 Resolve any outstanding unresolved distributed transaction.

sqlplus ‘/ as sysdba’ @11_01_check_pending_recovery.sql The scipt checks for any unresoved transaction and if recovery is pending. Should return responses ‘no rows selected’.The script produces a log file 11_01_check_pending_recovery_$ORACLE_SID.lst

2018 Make system as the detault tablespace for ‘SYS’ and ‘SYSTEM’

sqlplus “/ as sysdba” @15_01_check_sys_default_tbsp.sql

The script produces an output sctipt 15_01_system_$ORACLE_SID.sql this script needs to be run only if the SYSTEM tablespace is different for ‘SYS’ AND ‘SYSTEM’ user.

This scipt make SYSTEM as the default tablespace for sys and system users.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 14

Page 15: Oracle 10 Upgrade Instruction_1.3

To verify the default tablespace for ‘SYS’ and ‘SYSTEM’ please run the below query to find out if is different.

sqlplus ‘/ as sysdba’ @15_02_check_sys_default_tbsp.sql

Check the output file 15_02_system_$ORACLE_SID.log – it should show;

USERNAME DEFAULT_TABLESPACE---------------------------- ------------------------------SYS SYSTEMSYSTEM SYSTEM

Only if the above output returns a different tablespace other than ‘SYSTEM’ run the below sql statement to alter the default tablespace for SYS and SYSTEM schemas.

sqlplus ‘/ as sysdba” @15_01_system_$ORACLE_SID.sql

This script generates a sql script 15_01_system_$ORACLE_SID.sql. This script needs to be run only if the system tablespace is different for sys and system users.

The script 15_02_check_sys_default_tbsp.sqlproduces an output file 15_02_system_$ORACLE_SID.log

1921 Making system as the default tablespace for AUD$ table.

sqlplus “/ as sysdba” @ 16_01_check_audit_tbs.sql16_01_check_for_auditing_$ORACLE_SID.sql

This scipt make SYSTEM as the default tablespace for AUD$ table. This scipt make default tablespace as SYSTEM for sys and system users. AUDITING??????

2022 List out the physical structure of the database Make a backup of al(l datafiles,control and redo log files)

sqlplus “/ as sysdba” @17_01_database_files.sql This scripts produces a list of data files, control files and redo log files present in the database.

231 Shutdown database and listener

sqlplus “/ as sysdba” @18_01_shutdown.sql This script shuts down the database. Should see the following on screen:

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 15

Page 16: Oracle 10 Upgrade Instruction_1.3

Database closed.Database dismounted.ORACLE instance shut down.

242 Shutdown listener lsnrctl statuslsnrctl stop

These command checks the status of the listener and lsnrctl stop stops the listener.

253 Check for the following parameters to be modified

Look for init$ORACLE_SID.ora it can be either

cd /apps/oracle/admin/$ORACLE_SID/pfile/init$ORACLE_SID.ora

or cd $ORACLE_HOME/dbs check for init$ORACLE_SID.ora

grep -i AQ_TM_PROCESSES init$ORACLE_SID.ora

If found then change the value as shown in the step below if not found then add the value as shown below.

vi init$ORACLE_SID.oraaq_tm_processes=0

This command should be done only if aq_tm_processes=0.

Note. If the parameter does not exists please add the parameter.

264 Change the streams_pool_size if not already done in Step 5

cd /apps/oracle/admin/$ORACLE_SID/pfile

grep -i STREAMS_POOL_SIZE init$ORACLE_SID.ora if found change the value to the value shown below else add the value to the init$ORACLE_SID.ora

vi init$ORACLE_SID.ora

This step should be only done if not done in Step 5.

Note. It is likely that the value will not be set. Not currently set on live LMS,

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 16

Page 17: Oracle 10 Upgrade Instruction_1.3

streams_pool_size=50331648

275 Check for SESSION_MAX_OPEN_FILESIf not already done in Step 5

grep -i SESSION_MAX_OPEN_FILES init$ORACLE_SID.ora if the value is found then change if the value is not found add the value.

vi init$ORACLE_SID.orasession_max_open_files=30

This step should be done only if not already done in Step 5.

Note. It is likely that the value will not be set. Not currently set on live LMS,

286 Check for obslete and deprecated parameters.These are parameters that are no longer required and so can be hashed (#) out in the initORACLE_SID.ora file.

cd /apps/oracle/admin/$ORACLE_SID/pfile

at the unix prompt execute the following command

for i in `cat $UPGDIR/obsolete.par`dogrep -i $i init$ORACLE_SID.oradone

Comment out any parameter returned by the command from the init$ORACLE_SID.ora fileUnless they have a ‘#’ in front of them on screen (i.e. already commented out).

vi init$ORACLE_SID.ora# log_archive_start

Similarly do for the deprecated parameters as below

for i in `cat $UPGDIR/deprecate.par`dogrep -i $i init$ORACLE_SID.oradone

Comment out any parameter returned by the command from the init$ORACLE_SID.ora file.Unless they have a ‘#’ in front of them on screen (i.e. already

Note. The ` is the key Top-Left on keyboard above Tab.If the command does not return any rows then no need to update the $init$ORACLE_SID.ora

vi the file and comment out these from the init$ORACLE_SID.ora file.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 17

Page 18: Oracle 10 Upgrade Instruction_1.3

commented out).

297 Modify the oratab file vi /etc/oratabcomment out the old ORACLE_HOME and set the new ORACLE_HOMEfor example if your LMS30 is your ORACLE_SID then comment out the existing entry and add new entry as shown below.

#LMS30: /apps/oracle/product/9.2.0:NLMS30: /apps/oracle/product/10.2.0/apps/oracle/product/10.2.0/db_1:N

Comment out the old ORACLE_HOME entry in /etc/oratab and entrying the new ORACE_HOME which is ORACLE_SID: /apps/oracle/product/10.2.0/apps/oracle/product/10.2.0/db_1

Please note the value at the end of the Oracle Home entry is either ‘N” or ‘Y” this entry needs to be the same as before for the new Oracle home.

3028 Set the New 10G environment

If the switchenv file exists on the server change the value of the environment variables pointing 9i to 10g as shown in the example below.

cd /etc/switchconf

vi $ORACLE_SID.switchenv

change ORACLE_HOME from /apps/oracle/product/9.2.0 to /apps/oracle/product/10.2.0/apps/oracle/product/10.2.0/db_1change LIBPATH=/lms/tuxedo/lib:/lib:/apps/oracle/product/9.2.0/lib:/apps/tuxedo8.1/lib to LIBPATH=/lms/tuxedo/lib:/lib:/apps/oracle/product/10.2.0/apps/oracle/product/10.2.0/db_1/lib:/apps/tuxedo8.1/lib

Changing the switchconf files to reflect the new ORACLE_HOME.

Similarly for a few varibles point to the old 9i ORACLE_HOME please edit the files and point those variable to the new Oracle_HOME.

Please Note for exmaple if LMS is the database you are currently upgrading please change all the corresponding $ORACLE_SID.switchenv files example in LMS database following are the switchconf files

LMS.switchenv

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 18

Page 19: Oracle 10 Upgrade Instruction_1.3

Also if exists change the ORA_NLS33 path from /apps/oracle/product/9.2.0/ocmmon/nls/admin/data to/apps/oracle/product/10.2.0/apps/oracle/product/10.2.0/db_1/ocmmon/nls/admin/data.

Please Note. after changing the $ORACLE_SID.switchenv file logout of the unix session and log in back as oracle only then the new 10g environment variables will be set (see Step 29 below),

LMS01.switchenvLSM02.switchenvINT01.switchenv

If any ORA_NLS33 PATH does not exists on the .env file please ignore.

Note. In order to change other switchenv files you must be the identity of the owner of that switch file eg. Sudo to tuxedo to change LMS01.switchenv if tuxedo owns it.

3129 Exit the Shell and Re login as Oracle

exitsudo su – oracleswitch $ORACLE_SID

Verify the new environment is properly setecho $ORACLE_HOMEecho $LIBPATHecho $PATH

This step needs to be done to reflect the new environment..

Verify all the variables are set to the new 10g environment.(i.e. have 10.2.0 listed rather than 9.2.0)

3230 Create the link for the initORACLE_SID.ora in the new $ORACLE_HOME/dbs

cd $ORACLE_HOME/dbs

ln -sf /apps/oracle/admin/$ORACLE_SID/pfile/init$ORACLE_SID.ora .

A link is created for init ORACLE_SID.ora to point to the new ORACLE_HOME.

In the following steps, the variables in the table below should be substituted where indicated depending on the environment being built.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 19

Page 20: Oracle 10 Upgrade Instruction_1.3

NOTE When creating multiple instances of a database (i.e. for EIT/IST), the following files will contain references to ‘LMSTEST’ as the ORACLE_SID which will need to be edited to whatever ORACLE_SID as been decided on. Files to be edited as follows: initSTEST.ora, cr_STEST_db.sql, create_STEST_directories.ksh

Variable

Value to use in

EIT / IST User Acceptance Test (UAT) OAT Performance Test Live

[ORA_SID] LMS30 LMS_UAT (x2) and DMAS_UATNote. From LMS29 there are two LMS_UAT databases, one for just LMS testing (Non-ESA) and one against which ESA testing was carried out.

ES_LIVE ES_LIVE ES_LIVE

[PFILE] initSTEST.ora Amend LMS29 to reference relevant ‘ORA_SID’ value if different, e.g. LMS30

initLMS_UAT.ora initDMAS_UAT.ora (no need to edit)

initES_LIVE.ora initES_LIVE.ora initES_LIVE.ora

4.Upgrading the Database

Step Action Command(s) Notes

1 Log on to sqlplus as Oracle user, export the UPGDIR variable and run the upgrade script.

export UPGDIR=/apps/oracle/edsadmin

cd $UPGDIRsqlplus ‘/ as sysdba’ @29_01_startup_upgrade.sql’

This step generates the logfile file 29_01_startup_upgrade_{ORACLE_SID}.lst

Check the file for any ORA- errors if any error please contact the Project DBA.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 20

Page 21: Oracle 10 Upgrade Instruction_1.3

2 Create SYSAUX tablespace - LIVE Implementation ONLY:

Create the sysaux tablespace.

Create SYSAUX tablespace – others(DEV, OAT, UAT, PERF) Implementation ONLY:

For LIVE Implementationexecute the script to create SYSAUX TABLESPACE

sqlplus ‘/ as sysdba’ @30_01_create_sysaux.sqlcd $UPGDIRcreate_sysaux_PROD.sh

For Others( DEV, OAT, UAT, PERF) Implementationcd $UPGDIRcreate_sysaux_others.sh

Select the create sysaux scripts depend on the environment .

Use create_sysaux_PROD.sh should be used only during LIVE upgrade

For other environments use create_sysaux_others.sh

The idea is to have SYSAUX datafiles in the same filesystem where SYSTEM datafiles resides. Run create_sysaux_tbs.sh to create it.

Note: The script fails if the identified filesystem free space is less than 2 GB. Contact Project DBA

Check the script 30_01_create_sysaux.sql - the script should have the correct $ORACLE_SID for the database being updated and have the correct path

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 21

Page 22: Oracle 10 Upgrade Instruction_1.3

If the script is not pointing to the correct ORACE_SID amend the correct $ORACLE_SID and the path.

This script produces a output file ‘30_01_create_sysaux_{0RACLE_SID}.lst’ check this log file for any errors.

Please contact the Project DBA if any error.

3 Run the actual ORACLE 10g upgrade script,

The script performs the actual upgrade

nohup sqlplus ‘/ as sysdba’ @32_01_catupgrd.sql &

This step generates the log file 32_01_catupgrd_{ORACLE_SID}.lst

Note: VERY IMPORTANT Check the output file for any errors (grep ORA- 32*.lst) and if any reported please contact the Project DBA.There will always be some generated as the .lst file display comment lines as well – so it may be necessary to either e-mail the errors and/or allow access to the Server to the Project DBA.

Please Note. Estimated run time for this part of the Release is 20 minutes on smaller databases and up to 50 minutes on Live LMS.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 22

Page 23: Oracle 10 Upgrade Instruction_1.3

5. Post Upgrade Steps

Step

Action Command(s) Notes

1 Check for invalid database objects

sqlplus ‘/ as sysdba’

sql> @?/rdbms/admin/utlrp.sql

and then recheck for invalid objects:

sql> select object_name,object_type,owner from dba_objects where status = ‘INVALID’;

sql> exit

Recheck for INVALID objects, if any object is listed other than the ones in Step 4. Please contact DBA.

Even after running the utlrp.sql, if there are still invalid objects once again rerun the utlrp.sql as sysdba. Then if still any contact the Project DBA.

2 Shutdown and Startup the database in restricted mode.

sqlplus ‘/ as sysdba’ @37_01_shutdown_startup.sql AN output file ‘37_01_shutdown_startup_{ORACLE_SID}.lst’ is created, but you should be able to see on screen if any errors reported, should see:

Database closed.Database dismounted.ORACLE instance shut down.

ORACLE instance started.Database mounted.Database opened.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 23

Page 24: Oracle 10 Upgrade Instruction_1.3

3 Check the database to verify all the database components are upgraded successfully

sqlplus ‘/ as sysdba’

select * from v$version;

which should return the following:

BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biPL/SQL Release 10.2.0.4.0 - ProductionCORE 10.2.0.4.0 ProductionTNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - ProductioNLSRTL Version 10.2.0.4.0 - Productiony

select comp_name,version,status from dba_registry;

which should return the following:

COMP_NAME VERSION STATUS---------------------------------------- ------------------------Oracle Database Catalog Views 10.2.0.4.0 VALIDOracle Database Packages and Types 10.2.0.4.0 VALID

If either of the queries does not return the rows mentioned in blue or they refer to 9.2.0 oracle references please contact DBA support.

V$option is queried to check any existing feature is disabled during the upgrade. This output can be compared with the output we had in step 16.

Check DBA_REGISTRY to double check the version and components installed

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 24

Page 25: Oracle 10 Upgrade Instruction_1.3

4 Reset initORACLE_SID.ora parameters which were changed in the Pre upgrade Step 5.

The original init$ORACLE_SID.ora(.bak at end of name) saved in the $UPGDIR now needs tp be compared with updated file in /apps/oracle/admin/ORACLE_SID/pfile. Best to do this on two sessions.

You may need to make the following changes to the /apps/oracle/admin/ORACLE_SID/pfile/ initORACLE_SID.ora

cd /apps/oracle/admin/ORACLE_SID/pfile

vi initORACLE_SID.ora

shared_pool_size - Keep it set to the newer value

Note – for the following ones it is highly likely they didn’t exist before – so comment out if necessary.

java_pool_size - Reset to old value (Comment out if previously commented out or did not exist,))

aq_tm_processes - Reset to old value (Comment out if previously commented or did not exist,))

nls_length_semantics - Reset to old value (Comment out if previously commented or did not exist,))

cluster_database - Reset to old value (Comment out if

The values backed up in Pre Upgrade Step 6. Reset these values as shown in the next step.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 25

Page 26: Oracle 10 Upgrade Instruction_1.3

previously commented or did not exist,))

session_max_open_files - Reset to old value (Comment out if previously commented or did not exist,)

save the init$ORACLE_SID.ora with the changes.

5 Change Compatible to 10.2.0

vi initORACLE_SID.ora

# COMPATIBLE=9.2.0.0.0

COMPATIBLE=10.2.0.0.0

Modify the existing COMPATIBLE parameter to 10.2.0 in initORACLE_SID.ora

Note: The purpose of changing compatible in post-upgrade steps is that once the parameter is change it cannot be reverted. Hence this is performed in post-upgrade steps.

6 Create spfile sqlplus ‘/ as sysdba’

SQL> create spfile from pfile;

Createing spfile in the new Oracle Home to ensure the amended parameters are in effect in spfile

7 Disable Default scheduler job for collecting schema statistics

sqlplus ‘/ as sysdba’

exec dbms_Scheduler.disable('GATHER_STATS_JOB');

exit;

The default 10g method of collecting statisitics is disabled to keep the traditional method of collecting statistics alive.

8 Modify AWR report Frequency

sqlplus ‘/ as sysdba’ This modifies the default snapshot setting of collecting snapshot at a interval of 1hour to

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 26

Page 27: Oracle 10 Upgrade Instruction_1.3

exec dbms_workload_repository.modify_snapshot_settings(retention=>129600 , interval=>30);

exit;

30 minutes and the default retention from 30 to 90 days

9 Grant Create synonym privilege to ABSMASTER, IJBMASTER

sqlplus ‘/ as sysdba’

SQL> grant create synonym to ABSMASTER, IJBMASTER;

This step is a pre-requisite for LMS30 Build to work.

105 Change the default tablespace for SYS and SYSTEM users, ONLY if different from Step 18.

Verify the tablespace name

sqlplus ‘/ as sysdba’

sql> select username,default_tablespace_name from dba_users whereusername in (‘SYS’,’SYSTEM’);

Change the tablespace name of ‘SYS’ and ‘SYSTEM’ to the tablespace name in 15_02_system_$ORACLE_SID.log as shown in the example

sql> alter user sys default tablespace TABLESPACE_NAME;

sql> alter user system default tablespace TABELSPACE_NAME ;

This step needs to be done only if different from Step 18.

Please verify the sql statement 15_01_system_$ORACLE_SID.sql.

Please check the log file produced in step 20 15_02_system_$ORACLE_SID.log.

Note. On DWP System, this is unlikely to need to be done, as SYS and SYSTEM are always in the SYSTEM tablespace.

711 Shutdown and Restart the Oracle Database.

sqlplus ‘/as sysdba’

shutdown immediate

If for any reason the command does not work please contact DBA support. Should see on screen:Database closed.Database dismounted.ORACLE instance shut down.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 27

Page 28: Oracle 10 Upgrade Instruction_1.3

startup

exit

ORACLE instance started.Database mounted.Database opened.

812 Restart the listener. cd $TNS_ADMINlsnrctl start

913 Check the permissions on a couple of newly installed Library Files used by some Batch processes.

At the end of the release ensure that the permissions on the newly installed files below /apps/oracle/product/10.2.0/apps/oracle/product/10.2.0/db_1/lib are as follows (and update if necessary):

-rw-rw-r--   1 oracle   dba      for libclntsh.a and libclntst10.a

1014

To prevent users other than Oracle (i.e. Tuxedo, Batch etc.) having problems accessing the database after the upgrade run:

cd $ORACLE_HOME/install

changePerm.sh

enter ‘Y’ when prompted,

This should change the permissions, preventing users like tuxedo accessing the database.

1115

On LIVE SIZE systems (PERF.OAT and LIVE) - Update the RMAN hot and cold backup scripts re-PATH and

Also ensure that the RMAN hot and cold backup scripts below /TSM/scripts directory have the PATH and ORACLE_HOME updated to reference the new oracle e.g.

cd /TSM/scripts

and then vi the file and update as follows:

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 28

Page 29: Oracle 10 Upgrade Instruction_1.3

ORACLE_HOME variables.

Not applicable to DEV, STEST or UAT environments.

PATH=/apps/oracle/product/10.2.0/apps/oracle/product/10.2.0/db_1/bin:ORACLE_HOME=${ORACLE_BASE}/product/10.2.0/db_1i.e. the ’9.2.0’ after 9.2.0 removed from all references.

On LIVE ONLY - A link will also need to be created as follows so that the RMAN backup can pick up the correct file for the Lanfree backups:ln -s /usr/tivoli/tsm/client/oracle/bin64/libobk64.a {space} $ORACLE_HOME/lib/libobk.a (All on one line).

162 Update the new glogin.sql script for ease of use of vi commands in sqlplus.

Also worth checking that the newly installed glogin.sql script used by sqlplus below /apps/oracle/product/10.2.0/apps/oracle/product/10.2.0/db_1/sqlplus/admin looks similar to the one used previously in the 9.2.0 area, i.e. you may need to insert the line ‘DEFINE_EDITOR=vi’ as the last line of the file

You have now completed the upgrade.

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 29

Page 30: Oracle 10 Upgrade Instruction_1.3

Oracle 10g (10.2.0.4) Database Upgrade Instruction: page 30