Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Texture

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 26

g:\prints\db_upgrade\10201 to 10204.

txt
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Upgrade Oracle database from 10.2.0.x to 10.2.0.4
++++++++++++++++++++++++++++++++++++++++++++++++++:

Follow the simple steps to upgrade your database from 10.2.0.x to 10.2.0.4

Here are the Upgrade paths:-


Upgrade 10.2.0.1. to 10.2.0.4
Upgrade 10.2.0.2. to 10.2.0.4
Upgrade 10.2.0.3. to 10.2.0.4

If you have updated your Oracle version then you must upgrade your database using
any one of the below methods, otherwise you will get the following error during
Database startup.

ORA-01092: ORACLE instance terminated.


ORA-39700: database must be opened with UPGRADE option

1. Database Upgrade assistant


2. Database Upgrade assistant in Noninteractive mode
3. Manual Upgrade Method

1. Upgrade Database using Database Upgrade assistant:


+++++++++++++++++++++++++++++++++++++++++++++++++++++

Step 1: Set the ORACLE_HOME and ORACLE_SID and start DBUA


$ ORACLE_SID=testdb; export ORACLE_SID
$ ORACLE_HOME=/oracle/v10204; export ORACLE_HOME
$ dbua

Step 2: Follow the upgrade steps


(i) Select the database that you want to upgrade
(ii) On the Recompile Invalid Objects screen, select the Recompile the invalid
objects then click next.
(iii) On the backup screen, select �I would like to take this tool to backup the
database�, if you have not taken database backup.
(iv) Click finish

2. Upgrade Database using Database Upgrade assistant in Noninteractive mode:


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Run the following command to upgrade Oracle Database in silent mode:


$ dbua -silent -dbname $ORACLE_SID -oracleHome $ORACLE_HOME -sysDBAUserName
UserName -sysDBAPassword SYS_password -recompile_invalid_objects true

3. Upgrade Database using Manual Upgrade Method:


++++++++++++++++++++++++++++++++++++++++++++++++

Step1: Download the patch 6810189 from Metalink and extract the file.
$ unzip p6810189_10204_LINUX-x86-64.zip (ex:- for linux 64 bit)

Step2: - Set the ORACLE_HOME and ORACLE_SID and backup the database
$ ORACLE_SID=testdb; export ORACLE_SID
$ ORACLE_HOME=/oracle/v10201; export ORACLE_HOME

Backup the databases using RMAN or command line file level backup, if any
Step 3: Shutdown database and all other processes/services.
Shutdown listener, if running on same version
$ lnsrctl stop

Stop dbconsole, if any


$ emctl stop dbconsole

Shutdown database
SQL> SHUTDOWN IMMEDIATE

Step 4:- Backup Oracle home and Inventory.


Oracle recommends that you take a backup of Oracle Inventory and Oracle home.

Step 5: Start the OUI and install the 10.2.0.4


For Unix:- $ ./runInstaller
Start Oracle Universal Installer from patch set and select the ORACLE_HOME that you
want to patch from the list and click next�next�to complete the installation. Run
the $ORACLE_HOME/root.sh script as the root user, when prompted.

Step 6: Set the ORACLE_HOME and ORACLE_SID and run Pre-upgrade checks
$ ORACLE_SID=testdb; export ORACLE_SID
$ ORACLE_HOME=/oracle/v10204; export ORACLE_HOME

SQL> SPOOL Pre_checks.log


SQL> @?/rdbms/admin/utlu102i.sql
SQL> SPOOL OFF

Review the spool file and make the necessary database/parameter changes based on
the recommendation.

If you are upgrading a RAC database, then set CLUSTER_DATABASE to �FALSE�.

Step 7: Start the database in UPGRADE mode and run catupgrd.sql


SQL> STARTUP UPGRADE
SQL> SPOOL upgrade_db.log
SQL> @?/rdbms/admin/catupgrd.sql
SQL> SPOOL OFF

Review the log for errors.

Step 8: Restart database and recompile invalid objects


SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP
SQL> @?/rdbms/admin/utlrp.sql

If RAC database, then set CLUSTER_DATABASE to �TRUE� after upgrade.

Step 9: Check components status after upgrade


Run the following command to check the status of all the components
SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;

The status of all the components should be VALID for a successful upgrade

Step 10: Upgrade RMAN Catalog


If you are using the Oracle Recovery Manager catalog, enter the following command:
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;

Step 11: Startup all other processes and services.


g:\prints\db_upgrade\12c db upgrade.txt
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Upgrade Oracle 11g R2 (11.2.0.4) Database to Oracle 12c (12.1.0.2)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++:

Step 1:

Upgrade Path for Oracle Database to Oracle 12c Release 1 (12.1)

For example:

If you are upgrading from 11.2.0.1 or 11.1.0.6, then you must first upgrade to
Oracle Database 11g Release 2 (11.2.0.2).
If you are upgrading from 10.2.0.2, 10.2.0.3, 10.2.0.4, or 10.1.0.5, then you must
first upgrade to 10.2.0.5 or later.
For release 9.2.0.8, you must first upgrade to an intermediate Oracle Database
release, as follows: 9.2.0.8 -> 11.2.0.2 or 11.2.0.3 -> 12.1

Upgrading 11.2.0.4 to 12.2.0.1, on Linux (x64_86) platform

Step 2 :

Requirements and recommendations for Source database

Either take a cold or hot backup of the source database (advisable to have cold
backup).

a) Take a backup using RMAN


(or)
b) Perform Cold Backup ( if your database is in NOARCHIVELOG mode)

Step.3:

check source database before upgrade

-Ensure That No Files Need Media Recovery Before Upgrading


-Ensure That No Files Are in Backup Mode Before Upgrading
-Purge the Database Recycle Bin Before Upgrading
-Disable all batch and cron jobs
-check the invalid objects in the database
-check location of datafiles, redo logs and control files. Also take a backup of
all configuration files like listener.ora, tnsnames.ora, etc. from $ORACLE_HOME

Step.4:

Run the new preupgrade check script (preupgrd.sql), in 11.2.0.4 environment � it


will generate 3 files in $ORACLE_HOME/cfgtoollogs/$SID/preupgrade:

SQL> @/u01/app/oracle/product/12.1.0.2/rdbms/admin/preupgrd.sql

preupgrade.log
preupgrade_fixups.sql
postupgrade_fixups.sql

Step.5:
Verify the preupgrade.log and make necessary changes

Example of preupgrade.log:

-WARNING: --> Process Count may be too low


ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE (bydefault 150)
-WARNING: --> Inactive DBIDs found in AWR
AWR contains inactive DBIDs which may need additional updating after upgrading.
-WARNING: --> Enterprise Manager Database Control repository found in the database
In Oracle Database 12c, Database Control is removed during the upgrade. To save
time during the Upgrade, this action can be done prior to upgrading using the
following steps after copying rdbms/admin/emremove.sql from the new Oracle home
- Stop EM Database Control:
$> emctl stop dbconsole
Connect to the Database using the SYS account AS SYSDBA:
SET ECHO ON;
SET SERVEROUTPUT ON;
@emremove.sql Without the set echo and serveroutput commands you will not be able
to follow the progress of the script.

-WARNING: --> Existing DBMS_LDAP dependent objects Database contains schemas with
objects dependent on DBMS_LDAP package. Refer to the Upgrade Guide for instructions
to configure Network ACLs. USER APEX_030200 has dependent objects.

-INFORMATION: -->
OLAP Catalog(AMD) exists in database Starting with Oracle Database 12c, OLAP is
desupported. If you are not using the OLAP Catalog component and want to remove it,
then execute the ORACLE_HOME/oraolap/admin/catnoamd.sql script before or after the
upgrade.

-INFORMATION: --> Older Timezone in use

Please gather dictionary statistics 24 hours prior to upgrading the database.


To gather dictionary statistics execute the following command while connected as
SYSDBA:
EXECUTE dbms_stats.gather_dictionary_stats;

Step.6:

Prepare spfile for the 12c upgrade according to the output from preupgrade.log:
(Please note: Best Practice would be to edit the init.ora for the upgrade manually.
You could do so � the way i propose here is just a shortcut avoiding manual edit
steps)
SQL> create pfile from spfile;

Step.7:

Execute the preupgrade_fixups.sql � it was created by preupgrd.sql in directory


ORACLE_HOME/cfgtoollogs/$SID/preupgrade

SQL>@ORACLE_HOME/cfgtoollogs/$SID/preupgrade/preupgrade_fixups.sql

Please note that the preupgrade_fixups.sql script will still complain about
PROCESSES being set too low. This is because I have used the ALTER SYSTEM command
to adjust the parameter, but that adjustment will not take effect until the
database is shutdown and restarted. Because I specified SCOPE=SPFILE, this
parameter will be set correctly for the upgrade.
Step.8:

Shutdown the UPGRADE database:


SQL >shutdown immediate
SQL >exit

Step.9:

Copy the passwordfile and pfile/spfile from the 11g home to the 12c home.

$ cp /u01/app/oracle/product/11.2.0/dbs/spfileUPGR.ora
/u01/app/oracle/product/12.1.0.2/dbs/
$ cp /u01/app/oracle/product/11.2.0/dbs/orapwUPGR
/u01/app/oracle/product/12.1.0.2/dbs/

Step.10:

Set new ORACLE HOME of 12c location


export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1/

Step.11:

SQL> startup nomount;


SQL> alter database mount;
SQL> alter database open upgrade;
SQL> exit

Step.12:

Run catctl.pl

Go to $ cd $ORACLE_HOME/rdbms/admin
$ $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql

This will take some time depending on your system. If you wonder about the RESTART
phases: those happen if timing dependencies make it necessary to rerun a certain
action. The logfiles will be written by default into the directory from which you
started catctl.pl, $ORACLE_HOME/rdbms/admin Once the upgrade is finished it will
shutdown the database and in the next phase restart it in normal mode.

logfile and upgrade summary reports are created in @ORACLE_HOME/cfgtoollogs/$SID

Step.13:

Run postupgrade_fixups.sql which was created earlier.


@ORACLE_HOME/cfgtoollogs/$SID/preupgrade/postupgrade_fixups.sql

The database is using timezone datafile version 14 and the target 12.2.0.1.0
database ships with timezone datafile version 26. Oracle recommends using the most
recent timezone data. For further information, refer to My Oracle Support Note
1585343.1

Step.14

Run below scripts:

SQL> @?/rdbms/admin/utlu122s.sql
SQL> @?/rdbms/admin/catuppst.sql
Important: The catuppst.sql script is run as part of the upgrade process unless the
upgrade returns errors during the process. Check the log file for "BEGIN
catuppst.sql" to verify that catuppst.sql ran during the upgrade process. If
catuppst.sql has not run, then proceed to run catuppst.sql as shown in this step.
Warning messages are also displayed when running catctl.pl indicating that
catuppst.sql was not run during the upgrade.

Run catuppst.sql, located in the $ORACLE_HOME/rdbms/admin directory, to perform


upgrade actions that do not require the database to be in UPGRADE mode.

SQL> @catuppst.sql
This script can be run concurrently with utlrp.sql.
Run utlrp.sql to recompile any remaining stored PL/SQL and Java code in another
session.

SQL> @utlrp.sql

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

Step.15:

Set COMPATIBALE parameter value to 12.2.0, start the listener with new home and
count the invalid objects

Step.16:

Restart the database and check the version of a database

Note:

The database is using timezone datafile version 14 and the target 12.2.0.1.0
database ships with timezone datafile version 26. Oracle recommends using the most
recent timezone data. For further information, refer to My Oracle Support Note
1585343.1

g:\prints\db_upgrade\catctl.txt
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The catctl.pl Utility In 12c
=============================:

The catupgrd.sql script Upgrade Utility to process the upgrade singled threaded.
Now there is a faster way to upgrade your Oracle Database to 12c, you can use the
catctl.pl the Parallel Upgrade Utility � a perl script, which replaces catupgrd.sql
and provides both parallel processing mode and serial mode. This will greatly help
reduce downtime for a database upgrade to 12c and I highly recommend you use this
option.

The �n option Specifies the number of processes to use for parallel operations
(default = 4). The maximum is 8. Set this parameter to 0 to run catctl.pl in serial
mode.

The catctl.pl Parallel Upgrade Utility is integrated with DBUA the gui upgrade
utility. However, for manual, command line upgrades, you can run catctl.pl with
various parameters

If -n 3 is used when invoking catctl.pl, then catupgrd0.log, catupgrd1.log,


catupgrd2.log are created during the upgrade process. When confirming if an upgrade
ran fine or failed, all of the catupgrd#.log files must be checked. If catctl.pl is
rerun, then the previous log files are overwritten unless you specify a different
log directory.

To run catctl.pl on Linux from the new Oracle 12c home.

cd $ORACLE_HOME/rdbms/admin
$ORACLE_HOME/perl/bin/perl catctl.pl -n 3 -l $ORACLE_HOME/diagnostics catupgrd.sql

Once you start the database in upgrade mode by issuing the following command:
SQL> STARTUP UPGRADE

The UPGRADE keyword prepares the database for the upgrade.

Once the database is started in upgrade mode, only queries on fixed views execute
without errors until after the catctl.pl script is run. Before running catctl.pl,
queries on any other view or the use of PL/SQL returns an error.

If errors appear listing desupported initialization parameters, then make a note of


the desupported initialization parameters and continue with the upgrade. Remove the
desupported initialization parameters the next time you shut down the database.
There is a lot more going on in the script ( sending commands to all sqlplus
sessions, enabling/disabling compile for oracle components, organizing the files
into the different phases � ) but this basic information should provide you with an
idea of how upgrades will be handled as of 12.1.0.1.

g:\prints\db_upgrade\startup upgrade.txt
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Startup Upgrade

What is happening inside the database when you are starting a database in startup
upgrade mode? What is the difference between normal startup and startup upgrade?

The answer is same for both the questions.

Basically startup upgrade will open the database by setting the below parameters in
memory.(not for spfile)

ALTER SYSTEM enable restricted session;


ALTER SYSTEM SET _system_trig_enabled=FALSE SCOPE=MEMORY;
ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=MEMORY;
ALTER SYSTEM SET undo_retention=900 SCOPE=MEMORY;
ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY;
ALTER SYSTEM SET resource_manager_plan='' SCOPE=MEMORY;

It will be just a normal database startup, but it will make an environment for
migrating the version.

Alert log will show all these details:

Starting ORACLE instance (normal)


LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Autotune of undo retention is turned on.
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.3.0.
---------------------------------------------------
---------------------------------------------------
Mon Mar 25 19:54:01 2013
Database mounted in Exclusive Mode
Completed: ALTER DATABASE MOUNT
Mon Mar 25 19:54:02 2013
ALTER DATABASE OPEN MIGRATE
Mon Mar 25 19:54:02 2013
-------------------------------------------------
-------------------------------------------------
Starting background process MMNL
MMNL started with pid=12, OS id=2536
Mon Mar 25 19:54:14 2013
ALTER SYSTEM enable restricted session;
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET _system_trig_enabled=FALSE SCOPE=MEMORY;
Autotune of undo retention is turned off.
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=MEMORY;
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET undo_retention=900 SCOPE=MEMORY;
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY;
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET resource_manager_plan='' SCOPE=MEMORY;
replication_dependency_tracking turned off (no async multimaster replication found)
Completed: ALTER DATABASE OPEN MIGRATE

g:\prints\db_upgrade\upg1.txt
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
How long will it take to upgrade the database by running catupgrd.sql script ?

Predicting the time of an upgrade is a common question but, unfortunately, there is


not a simple answer to this question due to the differences in environments,
platforms, options, etc.

How long it will take to upgrade the database is

Independent of:
Size of the database
Used data types

Dependent on:
The number of objects needing upgrading and recompilation Thus: the number of
installed options/components (Spatial, APEX, etc.)
Number of synonyms - they will be recompiled
Valid and non-stale data dictionary statistics (make sure to gather schema stats
prior to upgrade)
At a very low rate:
a. Number of datafiles
b. Size of redo logs

Other possible environmental factors to consider:


Different i/o bandwidth
Resource problems including contention for resources

Running a test upgrade as well may provide useful timings.

g:\prints\db_upgrade\Upgrade and Downgrade Scripts.txt


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
catdwgrd.sql
============:Downgrading script Provides a direct downgrade path from the new
Oracle Database 10g release, this script is used for DataBase DoWnGrade from the
current release to the original release (if supported)

DESCRIPTION

This script is to be used for downgrading your database from the current release
you have installed to the release from which you upgraded.

NOTES

* This script needs to be run in the current release environment (before installing
the release to which you want to downgrade).

* You must be connected AS SYSDBA to run this script.

catupgrd.sql
============:Upgrading script Provides a direct upgrade path to the new Oracle
Database 10g release

catupgrd.sql - CATalog UPGraDe to the new release

DESCRIPTION

This script is to be used for upgrading a 9.2, 10.1 or 10.2 database to the new
release. This script provides a direct upgrade path from these releases to the new
Oracle release.

The upgrade is partitioned into the following 3 stages:

STAGE 1: call the "i" script for the oldest supported release:this loads all tables
that are necessary to perform basic DDL commands for the new release

STAGE 2: call utlip.sql to invalidate PL/SQL objects

STAGE 3: Determine the original release and call the c0x0x0x0.sql for the release.
This performs all necessary dictionary upgrade actions to bring the database from
the original release to new release.

NOTES

* This script needs to be run in the new release environment


(after installing the release to which you want to upgrade).

* You must be connected AS SYSDBA to run this script.


utlu102i.SQL
============
It provides Pre-Upgrade Information and Analyzes the database to be upgraded,
detailing requi ents and issues for the upgrade to release 10.2

utlu102s.SQL
============

This Post-Upgrade Script Displays the component upgrade status after an upgrade to
release 10.2

g:\prints\db_upgrade\upgrade from 10g to 11g.txt


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Upgrade Oracle Database from 10g to 11g
+++++++++++++++++++++++++++++++++++++++:

Upgrade Oracle Database from 10g Release 2 to Oracle 11g Release 1

To Upgrade Oracle Database from 10g to 11g, you should be on 10.2.0.4, so to


install 10.2.0.4 patch set level follow the link

Upgrade Oracle Database from 10.2.0.1 to 10.2.0.4

This article is a step by step guide to upgrade oracle database 10gR2 (10.2.0.4) to
11gR1 (11.1.0.6). The current environment is OEL 4.7

1)Preparing for upgrade to 11g Release 1

The first step is to stop all the components of the oracle 10g database.

� stop isqlplus
$ isqlplusctl stop

� stop enterprise manager dbconsole


$ emctl stop dbconsole

� stop listener
$ lsnrctl stop

� Shutdown the database.


$ sqlplus / as sysdba
SQL> shutdown immediate

Now take a cold backup of the database and the ORACLE_HOME directory.

$cd /u01/app/oracle/oradata/
$ tar -czf /home/oracle/PRODbackup.tar.gz PROD

$ echo $ORACLE_HOME
/u01/app/oracle/product/10.2.0

/*
This is Home Directory for Oracle 10g so I would make a tar archive of �10.2.0�
directory.
*/
$ cd /u01/app/oracle/product/
$ tar czf /home/oracle/oraHomeBackup.tar.gz 10.2.0
$ ls /home/oracle/*.tar.gz
/home/oracle/PRODbackup.tar.gz /home/oracle/oraHomeBackup.tar.gz

2)Configure the system for oracle 11g Release 1 Installation

Now is the time to install oracle 11g R1 in a separate home directory from the
oracle 10g.

Since Oracle 10g is already installed on this server so you may find some of the
pre-installation configurations already there.
I will go through the adjustments in the pre-installation configurations that I had
to make when preparing for 11gR1 install on a server where 10gR2 was
already installed.

Open /etc/sysctl.conf and the following lines:

# Oracle settings
fs.file-max = 65536
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

If any one of these exist already and value is higher then or equal to the above,
then don�t add the new value but if the value is lower remove the already existing
value and add the above.

� Make the kernel parameters changes effective immediately:


# /sbin/sysctl -p

� Verify the parameters are changed or not?


# /sbin/sysctl -a | grep name_of_kernel_parameter
� e.g.� /sbin/sysctl -a | grep shmall

Now we need to make sure we have all necessary packages for Oracle. Most of the rpm
packages listed in the article would be installed. However to verify you may go
ahead and issue the following command for each of them.

rpm -qa | grep binutils-2


rpm -qa | grep compat-libstdc++-33*
rpm -qa | grep elfutils-libelf-0*
rpm -qa | grep elfutils-libelf-devel-0*
rpm -qa | grep glibc-2*`uname -p`*
rpm -qa | grep glibc-common-2*
rpm -qa | grep glibc-devel-2*
rpm -qa | grep glibc-headers-2*
rpm -qa | grep gcc-4*
rpm -qa | grep gcc-c++-4*
rpm -qa | grep libaio-0*
rpm -qa | grep libaio-devel-0*
rpm -qa | grep libgcc-4*
rpm -qa | grep libstdc++-4*
rpm -qa | grep libstdc++-devel-4*
rpm -qa | grep make-3*
rpm -qa | grep numactl-devel-0*
rpm -qa | grep sysstat-7*
rpm -qa | grep unixODBC-2*
rpm -qa | grep unixODBC-devel-2*

It will show you if the package is installed or not. Now which ever package you
find missing install them. Put your Linux Media into DVD and go to the �Server�
directory.

cd /media/cdrom/Enterprise/RPMS

and install all the missing packages. In my case the linux user that owns the
oracle software installation is oracle. Check for the existence of the groups it
needs.

# cat /etc/group | grep dba


dba:x:500:
# cat /etc/group | grep oinstall
oinstall:x:501:oracle
# cat /etc/group | grep oper

� Group oper doesn�t exist. Create it and assign it to the user oracle as secondary
group.

groupadd oper
usermod -g oinstall -G dba,oper oracle

Allow the user oracle to use X server, which it will need to run Oracle Universal
Installer.

run as a root user in new terminal

# xhost +

Now switch to the user oracle.

# su � oracle

Create a new directory for 11g Oracle Home under your Oracle Base directory.

$ echo $ORACLE_BASE
/u01/app/oracle

$ echo $ORACLE_HOME
/u01/app/oracle/product/10.2.0/

$ cd /u01/app/oracle/product
$ mkdir -p 11.1.0/
$ mkdir -p 11.1.0/oraInventory
� We will use a separate inventory location for 11g installation

Add these lines into the file ~/.bash_profile

# Oracle 11g Home settings


#ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
#ORACLE_HOME=$ORACLE_BASE/product/11.1.0; export ORACLE_HOME
#ORACLE_SID=PROD; export ORACLE_SID

# .bash_profile

# Get the aliases and functions


if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

# Oracle 11g Home settings


#ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
#ORACLE_HOME=$ORACLE_BASE/product/11.1.0; export ORACLE_HOME
#ORACLE_SID=PROD; export ORACLE_SID

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE


ORACLE_HOME=$ORACLE_BASE/product/10.2.0/; export ORACLE_HOME
ORACLE_SID=PROD; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH


CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export
CLASSPATH
#LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL

if [ $USER = �oracle� ]; then


if [ $SHELL = �/bin/ksh� ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

As you can see I have made two sections in the file. One to setup the Environemnt
for Oracle 11g and one for 10g. During the Upgrade we will need to switch
back and forth in the 10g and 11g environemnts, and these settings will make it
easy for us.
If we want to set the user environemnt to 11g Oracle Home we will edit the file and
uncomment 11g setting and comment out the 10g settings and will do the
vice versa to set the user environemnt to 10g.

How to set the oracle user environment to 10g:


� Edit the ~/.bash_profile, comment out the 11g settings and uncomment the 10g
settings.
� Logout and Login again to bring the changes in effect.

How to set the oracle user environment to 11g:


� Edit the ~/.bash_profile, comment out the 10g settings and uncomment the 11g
settings.
� Logout and Login again to bring the changes in effect.

Install Oracle 11g Release 1 software

Open another console and login as user root. Edit the file /etc/oraInst.loc to
change the Oracle Inventory location.

The contents of the file should look like this

inventory_loc=/u01/app/oracle/product/11.1.0/oraInventory
inst_group=dba

3)Download Oracle 11gR1 software

You will have to login to your OTN web account first.

-Download Linux x86 (32-bit)

Once download is complete unzip the files that you downloaded.

� Do this in the console where user oracle is logged in.


$ cd /home/oracle

� This is where I downloaded the zip files.


$ ls *.zip
p6810189_10204_Linux-x86.zip

$ unzip p6810189_10204_Linux-x86.zip

4)Set the oracle user environment to 11g using the way described above.

$ cd /home/oracle/database/
$ ./runInstaller -invPtrLoc /etc/oraInst.loc

5)Once DBCA has finished creating the database, it will show a page like this. It
is a summary of the database that has just been created.
Configure Security Updates
This is the first screen you should see when you run Installer. You may leave the
email field empty and uncheck the check box that says �I wish to receive
security updates via My Oracle Support�.

Configure Security Updates


Email address not specified confirmation
If you did not provide your email address in the last screen, you will see this
confirmation, whether you want to proceed with the installation or not.
Press Yes.

Email address not specified confirmation


Select Installation Option
Select �Install database software only� and press next.

Select Installation Option


Node Selection
Choose if it is a single node installation or a RAC. Select �Single instance
database installation�.

Node Selection
Select Product Languages
Choose the language.

Select Product Languages


Select Database Edition
Choose �Enterprise Edition� and press next.

Select Database Edition


Specify Installation Location
Provide the ORACLE_BASE and ORACLE_HOME locations for Oracle 11g software.

Specify Installation Location


Privileged Operating System Groups
Provide the OSDBA and OSOPER groups.

Privileged Operating System Groups


Perform Prerequisite Checks
Oracle will perform all prerequisite checks here and if it finds any thing missing
it will show a report other wise it will continue. If you have
configured your environment properly before starting the installation all checks
should pass.

Perform Prerequisite Checks


Installation Summary
If all prerequisite checks are passed in the previous screen then you should see
the summary page otherwise another screen will come up telling you which
prerequisite check has failed.

Installation Summary
Install Product
Sit back and relax until the progress bar goes to 100%.

Install Product
Execute Configuration Scrips
This screen suggests the scripts that you need to run as root user.

Execute Configuration Scrips

errors in prereq check

#grep SwapTotal /proc/meminfo

#dd if=/dev/zero of=/extraswap bs=1M count=10240


#mkswap /extraswap
#cp /etc/fstab /etc/fstab.mybackup
#cat /etc/fstab

#swapoff -a
#swapon -a

6)Open another console, log in as root and perform run the root.sh script suggested
by the Oracle installer.

# which dbhome
/usr/local/bin/dbhome
# cd /usr/local/bin/

# mv dbhome dbhome_10204
# mv oraenv oraenv_10204
# mv coraenv coraenv_10204

# /u01/apps/oracle/product/11.2.0/db_1/root.sh

Finish: End of Installation


Press the close close button to exit out the installer.

Finish: End of Installation

Run the Pre-Upgrade tool (utlu112i.sql)

7)Run the Pre-Upgrade tool (utlu112i.sql)

Oracle 11g Release 2 ships a script utlu112i.sql aka Pre-Upgrade tool. This script
can be found in the ORACLE_HOME/rdbms/admin directory. This script
checks the current database which you are trying to upgrade to 11gR2 and display a
report, if there are any changes need to be done before and after the
upgrade. Besides its reporting nature, it is mandatory to run before starting the
upgrade itself. If you did not run the Pre-Upgrade Information Tool, the
catupgrd.sql (upgrade script) script will terminate with one of the following
errors:

How to run Oracle 11gR2 Pre-Upgrade tool (utlu112i.sql)

To run the Pre-Upgrade tool the environment should be set like this:

$ORACLE_HOME = Oracle Home which you are planning to upgrade (Old Oracle Home).
$ORACLE_SID = SID of the database being upgraded.
$PATH = should point to the original/old Oracle Home.

Copy the script utlu112i.sql from 11gR2 ORACLE_HOME/rdbms/admin to another


directory say /tmp, change to that directory and start sqlplus. Run the script
and view the output.

$ echo $ORACLE_HOME
/u01/app/oracle/product/10.2.0/
� Verify that this is the 10g ORACLE_HOME

$ cd /u01/app/oracle/product/11.2.0/rdbms/admin/
$ cp utlu112i.sql /tmp
$ cd /tmp
$ sqlplus / as sysdba

SQL> startup
SQL> spool pre_upgrade.log
SQL> @utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 01-22-2013 23:19:55
.
**********************************************************************
Database:
**********************************************************************
�> name: PROD
�> version: 10.2.0.4.0
�> compatible: 10.2.0.1.0
�> blocksize: 8192
�> platform: Linux IA (32-bit)
�> timezone file: V4
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
�> SYSTEM tablespace is adequate for the upgrade.
�. minimum required size: 741 MB
�. AUTOEXTEND additional space required: 241 MB
�> UNDOTBS1 tablespace is adequate for the upgrade.
�. minimum required size: 404 MB
�> SYSAUX tablespace is adequate for the upgrade.
�. minimum required size: 472 MB
�. AUTOEXTEND additional space required: 202 MB
�> TEMP tablespace is adequate for the upgrade.
�. minimum required size: 61 MB
�> EXAMPLE tablespace is adequate for the upgrade.
�. minimum required size: 69 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
WARNING: �> �java_pool_size� needs to be increased to at least 64 MB
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
� No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
�> background_dump_dest 11.1 DEPRECATED replaced by
�diagnostic_dest�
�> user_dump_dest 11.1 DEPRECATED replaced by
�diagnostic_dest�
�> core_dump_dest 11.1 DEPRECATED replaced by
�diagnostic_dest�
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
�> Oracle Catalog Views [upgrade] VALID
�> Oracle Packages and Types [upgrade] VALID
�> JServer JAVA Virtual Machine [upgrade] VALID
�> Oracle XDK for Java [upgrade] VALID
�> Oracle Workspace Manager [upgrade] VALID
�> OLAP Analytic Workspace [upgrade] VALID
�> OLAP Catalog [upgrade] VALID
�> EM Repository [upgrade] VALID
�> Oracle Text [upgrade] VALID
�> Oracle XML Database [upgrade] VALID
�> Oracle Java Packages [upgrade] VALID
�> Oracle interMedia [upgrade] VALID
�> Spatial [upgrade] VALID
�> Data Mining [upgrade] VALID
�> Expression Filter [upgrade] VALID
�> Rule Manager [upgrade] VALID
�> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: �> Database is using a timezone file older than version 11.
�. After the release migration, it is recommended that DBMS_DST package
�. be used to upgrade the 10.2.0.4.0 database timezone version
�. to the latest version which comes with the new release.
WARNING: �> Database contains schemas with stale optimizer statistics.
�. Refer to the Upgrade Guide for instructions to update
�. schema statistics prior to upgrading the database.
�. Component Schemas with stale statistics:
�. SYS
�. WMSYS
�. OLAPSYS
�. SYSMAN
�. CTXSYS
�. XDB
�. MDSYS
WARNING: �> Database contains INVALID objects prior to upgrade.
�. The list of invalid SYS/SYSTEM objects was written to
�. registry$sys_inv_objs.
�. The list of non-SYS/SYSTEM objects was written to
�. registry$nonsys_inv_objs.
�. Use utluiobj.sql after the upgrade to identify any new invalid
�. objects due to the upgrade.
�. USER PUBLIC has 1 INVALID objects.
�. USER SYS has 2 INVALID objects.
WARNING: �> Database contains schemas with objects dependent on network
packages.
�. Refer to the Upgrade Guide for instructions to configure Network ACLs.
WARNING: �> EM Database Control Repository exists in the database.
�. Direct downgrade of EM Database Control is not supported. Refer to the
�. Upgrade Guide for instructions to save the EM data prior to upgrade.
WARNING:�> recycle bin in use.
�. Your recycle bin is turned on and it contains
�. 53 object(s). It is REQUIRED
�. that the recycle bin is empty prior to upgrading
�. your database.
�. The command: PURGE DBA_RECYCLEBIN
�. must be executed immediately prior to executing your upgrade.
.

PL/SQL procedure successfully completed.

Fix the warnings reported by the Pre-Upgrade tool. The warnings about parameters
and tablespaces if there are any needs to be done before the database
upgrade. As far as the Miscellaneous Warnings are concerned some you have to fix
before the upgrade and some after the upgre.

I have fixed the following warnings prior to the upgrade with the help of the link
�Oracle 11g Release 2 Pre Upgrade tool utlu112i.sql�.

SQL>ALTER DATABASE DATAFILE 1 RESIZE 800m;

SQL>ALTER DATABASE DATAFILE 3 RESIZE 500m;

SQL>alter system set java_pool_size = 70m scope = both;

SQL>PURGE DBA_RECYCLEBIN;
SQL>select count(*) from dba_objects where status=�INVALID�;

COUNT(*)
���-
3

SQL> select OBJECT_NAME,OWNER from dba_objects where status=�INVALID�;

OBJECT_NAME
���������������������������
OWNER
����������
DBMS_REGISTRY
SYS

DBA_REGISTRY_DATABASE
SYS

DBA_REGISTRY_DATABASE
PUBLIC

These invalid objects has to be compiled after the upgradation.

� Stop the listener


$ lsnrctl stop

� Shutdown the database.


$ sqlplus / as sysdba

SQL> shutdown immediate


Database closed.
Database dismounted.
ORACLE instance shut down.

Once the database is shutdown log in as sysdba and create a pfile from spfile, that
we will ship to the 11g ORACLE_HOME and make the changes suggested by
the Pre-Upgrade tool.

$ sqlplus / as sysdba

SQL> create pfile from spfile;

File created.

SQL> exit

Now copy the newly created pfile (init[SID].ora) and the password file (orapw[SID])
from oracle 10g ORACLE_HOME/dbs to oracle 11g ORACLE_HOME/dbs.

$ echo $ORACLE_HOME
/u01/app/oracle/product/10.2.0
$ cd $ORACLE_HOME/dbs
$ cp initPROD.ora orapwPROD /u01/app/oracle/product/11.1.0/dbs/

Now edit the newly copied pfile 11g ORACLE_HOME/dbs/init[SID].ora and make
adjustments as suggested by the pre upgrade tool. In my case the changes will
be:
� Remove the obsolete parameters background_dump_dest, user_dump_dest ,
core_dump_dest from the parameter file.

Now open another console, log in as root and edit /etc/oratab to change the oracle
home with the sid ora10g to 11g ORACLE_HOME. After the change the
/etc/oratab should look like this.

PROD:/u01/app/oracle/product/10.2.0:N to PROD:/u01/app/oracle/product/11.1.0:N

Now set the oracle user environment to 11g Oracle Home using the way described
above in this article.

Once the environment is set to 11g ORACLE_HOME, open sqlplus and startup the
database in upgrade mode.

$ echo $ORACLE_HOME
/u01/app/oracle/product/11.1.0/

$ cd $ORACLE_HOME/rdbms/admin/

$ sqlplus / as sysdba

SQL> startup upgrade pfile=�/u01/app/oracle/product/11.1.0/dbs/initPROD.ora�

ORA-00119: invalid specification for system parameter LOCAL_LISTENER


ORA-00132: syntax error or unresolved network name �PROD�
we have to create listener.ora,tnsnames.ora & sqlnet.ora manually using netca.

and startup upgrade again with the same statement

SQL> startup upgrade pfile=�/u01/app/oracle/product/11.1.0/dbs/initPROD.ora�

SQL> spool upgrade.log

SQL> @catupgrd.sql

Archive logs will be generated more because it will update tables in database so
db_recovery_file_dest_size will be filled, so increase the destination
size using below command & run again scripts

SQL>@catupgrd.sql

SQL>alter system set db_recovery_file_dest_size = 7G scope=memory;

When catupgrd.sql finishes it will automatically shutdown the database. Exit from
sqlplus and open the spool file for the upgrade process and see if there
were any errors during the upgrade. If you don�t see any errors proceed further
with the upgrade

8)Post upgrade steps: Oracle 11g Release 2

Create the spfile from the pfile so that the system should use the spfile for next
startup.

$ sqlplus / as sysdba
Connected to an idle instance.
SQL> create spfile from pfile=�/u01/app/oracle/product/11.1.0/dbs/initPROD.ora�;
SQL> startup
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1337720 bytes
Variable Size 234882696 bytes
Database Buffers 293601280 bytes
Redo Buffers 5840896 bytes
Database mounted.
Database opened.

9)Post-Upgrade Status tool (utlu112s.sql)

SQL> spool post_upgrade.log


SQL> @utlu112s.sql

SQL>spool off

Post-Upgrade Status Tool must shows all the components VALID or else you have to
troubleshoot it & run again the @utlu112s.sql

There are some further actions that need to be done, but they do not require the
database to be in upgrade mode. Now is the time to perform those action
via catuppst.sql script.

SQL> SPOOL catuppst.log


SQL> @catuppst.sql
TIMESTAMP
���������������������������
COMP_TIMESTAMP POSTUP_BGN 2013-01-23 17:27:25
PL/SQL procedure successfully completed.
This script will migrate the Baseline data on a pre-11g database
to the 11g database.

Move BL Data SYS.WRH$_FILESTATXS


Move BL Data SYS.WRH$_SQLSTAT
��..
.
.
.
Commit complete.
PL/SQL procedure successfully completed.

TIMESTAMP

���������������������������
COMP_TIMESTAMP POSTUP_END 2013-01-23 17:27:31

SQL>SPOOL OFF

Now run the utlrp.sql script to compile the objects which were invalidated during
the upgrade

SQL> SPOOL utlrp.log


SQL> @utlrp.sql
OBJECTS WITH ERRORS
������-
0

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION


���������
0
PL/SQL procedure successfully completed.

SQL>SPOOL OFF

Now change the compatible initialization parameter to 11.2.0.1.0 to use all the
features of Oracle 11g Release 2.

SQL> alter system set compatible=�11.2.0.1.0' scope=spfile;

SQL> shutdown immediate

SQL> startup

SQL> show parameter compatible

g:\prints\db_upgrade\upgrade.txt
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Upgrading database from 11.2.0.1 to 11.2.0.4
+++++++++++++++++++++++++++++++++++++++++++++:

Complete Checklist for out-of-Place Manual Upgrade from Previous 11.2.0.N Version
to the Latest 11.2.0.N
(Doc ID 1276368.1)

STEP 1
======
Download the 11.2.0.4 or RDBMS software.

STEP 2
======
Install the latest 11.2.0.4 RDBMS Software into a new ORACLE_HOME.

STEP 3
======
after installing the latest 11.2.0.4 RDBMS software, copy and run the Pre-upgrade
tool from 11.2.0.4 to 11.2.0.1 (utlu112i.sql) on database (11.2.0.1). You need to
run and review pre-upgrade output and fix if any issues before upgrading to the
latest release of 11.2.0.4.

$ sqlplus '/ as sysdba'


SQL> spool upgrade_info.log
SQL> @utlu112i.sql
SQL> spool off
SQL>

-Database
shows global database information about the current database, such as the database
name, release number and compatibility level. A warning is displayed if you must
adjust the COMPATIBLE initialization parameter before the database is upgraded.

-Logfiles
shows list of redo log files in the current database whose size is less than 4 MB.
For each log file, the file name, group number and recommended size is displayed.
In a manual upgrade using SQL scripts and utilities, new files of at least 4 MB
(preferably 10 MB) must be created in the current database, and any redo log files
less than 4 MB must be dropped before the database is upgraded. These tasks are
performed automatically by the Database Upgrade Assistant.

-Tablespaces
shows list of tablespaces in the current database. For each tablespace, the
tablespace name and minimum required size is displayed. In addition, a message is
displayed if the tablespace is adequate for the upgrade.In a manual upgrade using
SQL scripts and utilities, space must be added to tablespaces that do not have
enough free space in the current database. These tablespace adjustments must be
made before the database is upgraded. This task is performed automatically by the
Database Upgrade Assistant.

-Flashback
flashback is on/off

-Update Parameters
shows list of initialization parameters in the parameter file of the current
database that must be adjusted before the database is upgraded. The adjustments
must be made to the parameter file after it is copied to the new Oracle Database
11g release.

-Deprecated Parameters
shows list of initialization parameters in the parameter file of the current
database that are deprecated in the new Oracle Database 11g release.Obsolete
Parameters This section displays a list of initialization parameters in the
parameter file of the current database that are obsolete in the new Oracle Database
11g release2 (11.2). Obsolete initialization parameters must be removed from the
parameter file before the database is upgraded.

-Obsolete Parameters:
shows list of initialization parameters in the parameter file of the current
database that are obsolete in the new Oracle Database 11g release 2 (11.2).
Obsolete parameters need to be removed from the parameter file before the database
is upgraded. Obsolete parameters' means parameters which are no longer valid (or)
in use.

-Components
shows db components in the new Oracle Database 11g release 2 (11.2) that are
upgraded or installed when the current database is upgraded.

-Miscellaneous Warnings
shows warnings about specific situations that might require attention before or
after the upgrade.

-SYSAUX Tablespace
This section displays the minimum required size for the SYSAUX tablespace which is
required in the new Oracle Database 11g release 2 (11.2). The SYSAUX tablespace
must be created if it does not exist (in Oracle 9i ) after the new release is
started and before the upgrade scripts are invoked.

Note : If SYSAUX was created in 9i then it must be dropped and re-created after
starting in the new release. If created in 10g or later then it can be left there
and used.

STEP 4
======
Download dbupgdiag.sql script from the MOS to verify that all the components in
dba_registry are valid and no invalid data dictionary objects exist in dba_objects.

Note 556610.1 Script to Collect DB Upgrade/Migrate Diagnostic Information


(dbupgdiag.sql)

$ sqlplus / as sysdba
SQL> spool upgrade_info1.log
sql> @dbupgdiag.sql
sql> exit

dbupgdiag.sql

The above will create logfile and it will ask for location of the log
If the dbupgdiag.sql script reports any invalid objects, run
$ORACLE_HOME/rdbms/admin/utlrp.sql (multiple times) to validate the invalid objects
in the database, until there is no change in the number of invalid objects.

After validating the invalid objects, re-run dbupgdiag.sql in the upgraded database
once again and make sure that everything is fine

This script is intended to provide a user friendly output to diagonise


-- the status of the database before (or) after upgrade. The script will
-- create a file called db_upg_diag_<sid>_<timestamp>.log in your local
-- working directory. This does not make any DDL / DML modifications.
--
-- This script will work in both Windows and Unix platforms from database
-- version 9.2 or higher.

Note 556610.1 Script to Collect DB Upgrade/Migrate Diagnostic Information


(dbupgdiag.sql)

Step 5
======
Back up the Database
1. Perform Cold Backup
(or)
2. Take a backup using RMAN

STEP 6
=======
Shut down the database cleanly

STEP 8
=====
Configure the target 11.2.0.4 ORACLE_HOME.

1) Make sure environment variables ORACLE_BASE, ORACLE_HOME, PATH and


LD_LIBRARY_PATH are set to point to 11.2.0.4.
Set ORACLE_SID to the 11.2.0.4 DB name to upgrade i.e.
The /etc/oratab file points to your Oracle Database 11g Release 2 (11.2.0.4) Oracle
home.
2) Copy init.ora/spfile and password file (orapw<Sid>.ora) from 11.2.0.1
$ORACLE_HOME/dbs to 11.2.0.4 $ORACLE_HOME/dbs
3) Copy network configuration files (listener.ora, sqlnet.ora, tnsnames.ora, etc)
from 11.2.0.1 $ORACLE_HOME/network/admin (or $TNS_ADMIN) location to 11.2.0.4
$ORACLE_HOME/network/admin (or $TNS_ADMIN) location
4) If DB Console / DB Control is configured and used then also copy the following
two directories and their contents from 11.2.0.1 to 11.2.0.2. (if DB Console / DB
Control is not configured these directories MAY not exist).
ORACLE_HOME/<hostname_dbname>ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname_dbname>
Specify the actual name for <hostname_dbname>
5) Make sure the COMPATIBLE initialization parameter is properly set for Oracle
Database 11g Release 2 (11.2). The Pre-Upgrade Information Tool displays a warning
in the Database section if COMPATIBLE is not properly set.

6) The DIAGNOSTIC_DEST initialization parameter replaces the USER_DUMP_DEST,


BACKGROUND_DUMP_DEST.

STEP 9
======
Upgrade the database manually.

1) Start sqlplus and run catupgrd.sql script from the newly installed (Target)
$ORACLE_HOME/rdbms/admin

sqlplus " / as sysdba "


SQL> spool upgrade_info2.log
SQL> startup upgrade
SQL> set echo on
SQL> @?/rdbms/admin/catupgrd.sql;
SQL> spool off
SQL> Shutdown immediate

catupgrd.sql:

It drops all data dictionary objects of previous versions, and creates all of new
version objects along with this, it will running lots of internal scripts to make
your software functionable in short.

Note: After catupgrd.sql Process completes, Oracle will shut down Database. You
need to start database manually.

2) Check catupgrd.sql spool file for errors.

3) Restart the database in normal mode.

catuppst.sql

located in @$ORACLE_HOME/rdbms/admin/catuppst.sql;

catuppst.sql script does the following

- Upgrade Automatic Workload repository (AWR) Baseline Information


- Upgrade ADDM task metadata
- Update Oracle Label security (OLS) policies

Both AWR and ADDM were first introduced in Oracle 10g release 1 (10.1.0.2)

note: the catuppst.sql script will create logfile.

4) SQL> @$ORACLE_HOME/rdbms/admin/catuppst.sql;
5) SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql;
6) Run dbupgdiag.sql script (See note: 556610.1) and verify that all the components
in dba_registry are valid and there are no invalid objects in dba_objects.
7) Upgrade Time Zone to latest version using DBMS_DST.
11.2.0.1 Uses Time Zone version 11 but 11.2.0.4 Uses Time Zone version 14. So, need
to upgrade time Zone after DB upgrade. In case of DBUA upgrade it will update
automatically.
Note 1201253.1 Actions For DBMS_DST Updates When Upgrading to 11.2.0.4.

utlu112i.sql

utlu112s.sql

$ sqlplus "/as sysdba"


SQL> STARTUP
SQL> @utlu112s.sql

Run the Post-Upgrade Status Tool $ORACLE_HOME/rdbms/admin/utlu112s.sql which


provides a summary of the upgrade at the end of the spool log. It displays the
status of the database components in the upgraded database and the time required to
complete each component upgrade. Any errors that occur during the upgrade are
listed with each component and must be addressed.

http://oraclepoint.com/oralife/2010/08/19/points-of-oracle-database-manual-upgrade-
from-10g-to-11g/

https://taliphakanozturken.wordpress.com/tag/catupgrd-sql/

http://ranjaydba.blogspot.in/

http://ramoracleappsdba.blogspot.in/2011/05/upgrade-to-oracle-11202-from-
oracle.html

You might also like