Вы находитесь на странице: 1из 8

Oracle Database Upgrade to 11gR2

From ETWiki
(Redirected from SOP - Upgrading 10G,11g database's to version)


• 1 Check List

• 2 Πη α σ ε Ι: Πρ ε Υπ γ ρ α δ ε Τασ κ σ

• 3 Πη α σ ε Ι Ι : Υπ γ ρ α δ ι ν γ το τη ε Νεω Ορα χ λ ε
∆α τ α β α σ ε 11 γ Ρ 2

• 4 Πη α σ ε Ι Ι Ι : Πο σ τ− Ι ν σ τ α λ λ Ορ α χ λ ε
∆α τ α β α σ ε 11 γ Ρ 2

• 5 Ισσυ ε ορ κνοω σ ερρ ο ρ ωη ι λ ε υπ γ ρ α δ ε

[edit] Check List

Scope : Wiki is describing pre/post checklist and upgrade process details for
upgrading a Oracle 10R2 or to Oracle 11gR2(

• Please check OS version as upgrade is only certified for RH 5.

cat /etc/red*

• Please ensure that latest package is pushed by Onsite Oracle DBA team.
DBA ADMIN Team Part: update the EM files (oratab, tnsnames.ora, listener.ora). Push
the package from adm0m3:
--For Linux: On Target Server install latest Packages : --
etrpmadd -f -p oracle -v
etrpmadd -f -p oradba -v 1.0
etrpmadd -f -p oradiag -v 1.0
--FROM adm0m3
etupdate –fn <server_name>
etupdate –fn <server_name> -p /etrade/lib
etupdate –fn <server_name> -p /etrade/bin

• Verify all ET standards

* Index Placement
* DB User profile assignment
* Physical Naming convention.
* File Naming conventions.
• Etrade DBA Task:
* Install latest 11202 package
* Execute etserver install on new envirment so ORAPWD and init links
will be created on new ORACLE_HOME
* etcmd -s chmod 777 /etrade/etc/packages.linux.intel on target Server
Phase 1: Pre Upgrade Tasks.
Phase 2: Upgrading to Oracle Database 11g Release 2
Phase 3: Post Upgrade Tasks.

[edit] Phase I: Pre Upgrade Tasks

• Step 1: Pre-create DIR.
Create upgrade directory at $ET_INSTANCE_ROOT/bkup/ location
etcmd mkdir upgrade pre_upgrade_bkup

• Step 2 :
Disable all batch and cron jobs.
Archive removal and rotation
Application jobs
Stats collection job
Netcheck Monitoring. (In Oracle CRON)
standby job at standby server and make sure all arch has been applied at
DR/STANDBY server side.

• Step 4 : Gather full stats for the database

etcmd gather_stats.ksh db
etcmd gather_stats.ksh full

• Step 6: Capture Database link information.

Create a list of database link before starting an upgrade as can be useful many time like in
case of downgrade or in post task after upgrade.
SQL> spool create_dblink.info
'create '||DECODE(U.NAME,'PUBLIC','public ')||'database link '||CHR(10)
||DECODE(U.NAME,'PUBLIC',Null, U.NAME||'.')|| L.NAME||chr(10)
||'connect to ' || L.USERID || ' identified by
||L.PASSWORD|| using || L.host || '
||chr(10)||';' TEXT
FROM sys.link$ L, sys.user$ U WHERE L.OWNER# = U.USER# ;
SQL> spool off
• Step 7: Create Pre-Upgrade BackupSET.
Backup the existing database or Please ensure for we do have a latest backup for the
etcmd dba_bkup_gzip.ksh

Note : --> Provide rac as first argument if it is a Rac enviroment.

IMP: Copy backup to either standby server or move it to
pre_upgrade_bkup folder

• Step 8: Verify Disk free space.

Check for adequate free space on archive log destination file systems.
[plt:etadm:dbs:PORA11G:pltdb2w98m7] df -h | grep arch
33G 20G 13G 62%

Create HD to Increase space if needed. Ideally it should be 10~15G free.

• Step 9: Ensure no files need media recovery:

SQL> select * from v$recover_file;
no rows selected

Make sure currently no backup is running for the database, if yes then
end backup using command.

SQL > Alter database end backup;

Database altered.

• Step 10 : Verify DB version and installed options.

Ensure the properties for SYSTEM ,SYS user and database component status should be
valid and default tablespace should be SYSTEM and SYSAUX respectively.
SQL> select username, default_tablespace from dba_users where username
in ('SYS','SYSTEM');

2 rows selected.

col COMP_NAME for a39

col VERSION for 9999999
col status for a19
set lines 1000

Oracle Database Catalog Views
Oracle Database Packages and Types
Note : If any component is invalid then you should work bringing them
in valid status to procees ahead.

• Step 11: Make sure Recycle bin is empty.

Empty the Recycle Bin using purge statement.
DBA Recyclebin purged.

• Step 12: Recompile invalid objects:

SQL> spool invalid_objects_pre_upgrade_11g.log
SQL> @${ET_ORADBA_ROOT}/sql/list_invalid_objects.sql
SQL> spool off

Note : Compile all objects before proceeding ahead.

• Step 13 Spool file before running upgrade tool

SQL> spool pre_upgrade_database_info.log
SQL> spool off

Then, check the spool file and examine the output genrated by

• Step 14: Shutdown Database.

Stop the database cleanly and also stop all applicable tools running for like Rember: You
need to shutdown database by using older ORACLE_HOME. To shutdown the database
connect as
etcmd sqlplus " / as sysdba"
SQL> shutdown immediate;

To stop agent running on host.

$ etcmd -a oracle emctl stop agent

To stop listner on the database :--

$ etlsnrctl stop
Imp : -- For a cluster database, set the parameter CLUSTER_DATABASE=FALSE
during the upgrade. Upgrading a cluster database, then modify the initdb_name.ora file in
the same way that you modified the parameter file.
[edit] Phase II: Upgrading to the New Oracle Database
• Step 1 : Update ET Framework Files:
Make required changes in file to have latest environment value's to take affect and re
login from a new session NOTE: Keep your older PUTTY window with older
vi /etrade/etc/packages.linux.intel

Grep the specific database entry and change the value to latest home.

Like for PORA11G it was

#plt:etadm:dbs:PORA11G:oracle: --- OLD value

plt:etadm:dbs:PORA11G:oracle: --- New value after

• Step 2: Source new Oracle home variable by re login

Make Sure that ORACLE_HOME variable is pointing to new ORACLE_HOME
--creating new password file under new oracle 11g Home : --
$etcmd orapwd file=${ORACLE_HOME}/dbs/orapw${ORACLE_SID}
password={password} entries =80 force=y

• Step3: Creating links and update PFILE

• Create pfile and orapwd file links by running etserver install.

• Rename Old parameter file present in $

{ET_INSTANCE_ROOT}/admin/pfile/ to *.10g.

• Copy sample File from $

{ET_ORADBA_ROOT}/dbcreate/11g/initSAMPLE11G.ora to $

• Take care of local_listener parameter

• Make appropriate changes in pfile

Make compatible parameter to This will allow us to easy
downgrade. compatible will change only after testing and confirmation.

# Miscellaneous
compatible =

• It is Assumed that database was shutdown cleanly using OLD Oracle_HOME

at end of Phase 1.
etcmd sqlplus " / as sysdba"
SQL> startup nomount;
SQL> shutdown

• Step 4 : Startup database in upgrade mode and run the upgrade script :
This time you will be login to database using 11202 ORACLE_HOME.
SQL*Plus: Release Production on Tue Feb 1 14:00:11 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter password:
Connected to an idle instance.
SQL*Plus: Release Production on Tue Feb 1 14:00:11 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter password:
Connected to an idle instance.
SQL> spool $ET_INSTANCE_ROOT/bkup/upgrade/upgrade_to_11_2_0_2.log append
SQL> startup upgrade
SQL> @?/rdbms/admin/catupgrd.sql

Imp : -This script will take care of all required script execution for upgrade existing
installed packages.
Oracle Database Catalog Views
Oracle Database Packages and Types
Oracle Real Application Clusters -- For RAC database's.


SQL> startup

Check the spool file and verify that the packages and procedures compiled successfully.
Correct any problems you find in this file and rerun the appropriate upgrade script if
necessary. You can rerun any of the scripts described in this note as many times as

DBA ADMIN ORACLE TEAM TASK : --- Ask to update all required file at
admin server adm0m3
Packages.linux.intel, oratab, tnsnames.ora, listener.ora
and Push to target server


[edit] Phase III: Post-Install Oracle Database 11gR2

• Step 1: Verify Upgrade Status:
Executing Oracle Script : utlu112s.sql This is the Post-upgrade Status Tool displays the
status of the database components in the upgraded database. The Upgrade Status Tool
displays output similar to the following:
SQL> @?/rdbms/admin/utlu112s.sql
Oracle Database 11.2 Post-Upgrade Status Tool 01-28-2011
Component Status Version
Oracle Server
Gathering Statistics
Total Upgrade Time: 00:12:03

PL/SQL procedure successfully completed.

Note - in RAC environments, this script may suggest that the status of
the RAC component is
INVALID when in actual fact it is VALID (as shown in the output from

Verify the DATABASE components

SQL> select comp_id, version, status from DBA_registry;


------------------------------ ------------------------------
Verify DST Information: Oracle 11gR2 use the DST zone file of 11 (or higher). After
upgrade you should see
SQL> SELECT * FROM v$timezone_file;

-------------------- ----------
timezlrg_11.dat 11

• Step 3: Verify Invalid Objects:

Check Invalid objects and compare with details of objects at PRE-UPGRADE file
invalid_objects_pre_upgrade_11g.log status.
SQL> shutdown immediate (DO NOT USE SHUTDOWN ABORT!!!!!!!!!)

SQL> startup;
SQL> spool invalid_objects_post_upgrade_11g.log
SQL> @${ET_ORADBA_ROOT}/sql/list_invalid_objects.sql
SQL> spool off

• Step 4: Start the database,agent,listner cleanly:

Reduce Memory parameters of POOL sizes which increased for upgrade." If any "
SQL> shutdown immediate
SQL> startup

Start the listener and OEM if applicable.

$ etlsnrctl start

• Step 5: Verify connectivity:

Verify connectivity to new database using all available tnsnames.
$ sqlplus etdbmon/<pwd>@TNS_ENTRY

• Step 7: Gather full Stats

$ etcmd gather_stats.ksh full

• Step 9: Enable cron and batch jobs:

1) Backup 2) Archive removal and rotation 3) Application jobs 4) Stats collection job 5)
Net check Monitoring.

• Step 10 : Verify ET Standards.

Verify soft links
Correct UNDO/TEMP/Redo

• Step 11: Enable flashback: