# Log in as Oracle software owner
su - oracle
# Confirm environment refers to old Oracle installation.
env | grep -i oracle

# Shut down Enterprise Manager, if running
emctl stop dbconsole

# Shut down iSQL*Plus, if running
isqlplusctl stop

# Before shutting down your old version of Oracle, create a parameter file
# (PFILE) from the instance's server parameter file (SPFILE).  You will use
# this during the upgrade of this database.

echo "CREATE PFILE FROM SPFILE;" | sqlplus / as sysdba

# Shut down the Oracle instance
echo "shutdown immediate" | sqlplus / as sysdba

# Shut down the Oracle listener
lsnrctl stop listener

# Note: If the system is configured (through system startup scripts such
# as those found under /etc/rc*.d/) to start the old database automatically
# at boot time, you should remove or disable those scripts at this time.
