
Installgen
Features and Benefits
Installgen
Demo Available for download...
Bookmark This Page

#!/bin/sh
# script: prod1_rman_restore_db_1.sh (renamed from 30_sol_920_prod1_rman_restore_db_1.sh)
# Features: This shell script performs an RMAN full database restore in the case
# where all datafiles have been lost.
#
# Note: If ORA-12573 is encountered while performing a restore with this
# script, then it may be necessary to restart the server in
# order to insure that the OS is not holding any datafiles open.
#
# Script Sequence#: 30
# Used By: DBA - invoked manually
# Usage: prod1_rman_restore_db_1.sh
# Copyright 2002 by .com Solutions Inc.
#
# ---------------------- Revision History ---------------
# Date By Changes
# 10-10-2001 dsimpson Initial Release
# 05-10-2002 dsimpson Updated to use oracle UNIX account.
# Added shutdown/startup after restore.
# 10-17-2002 dsimpson Added note about ORA-12573
# This output file was created by Installgen version 1.38 on Sun Nov 10 14:20:50 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net
# define globally used paths/variables
ORACLE_BASE=/u01/v901
ORACLE_HOME=/u01/v901
ORACLE_OWNER=oracle
ORACLE_OWNER_PATH=/export/oracle
ORACLE_GROUP=dba
ORACLE_HOME=/u01/v901
ORACLE_SID=prod1
LD_LIBRARY_PATH=/u01/v901/lib:/u01/v901/lib64:/usr/dt/lib
CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
ORAENV_ASK=NO
TNS_ADMIN=$ORACLE_HOME/network/admin
PATH=/usr/sbin/:/bin:/usr/bin:/usr/ccs/bin:/usr/ucb/bin:/usr/ucb:/usr/openwin/bin:/usr/dt/bin:/usr/local/bin:/opt/bin:/usr/opt/SUNWmd/sbin:/usr/platform/sun4u/sbin:/opt/sfw/bin:.:/usr/local/sbin:/u01/v901/bin
TERM=vt100
NLS_LANG=AMERICAN_AMERICA.US7ASCII
export ORACLE_OWNER ORACLE_OWNER_PATH ORACLE_GROUP ORACLE_HOME ORACLE_SID ORA_BDUMP_DIR LD_LIBRARY_PATH PATH ORAENV_ASK TNS_ADMIN TERM NLS_LANG
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as SYSDBA
-- make sure database is shut down before starting
set echo on
set verify on
set feedback on
shutdown immediate;
EOF
# start the rman restore and recovery
$ORACLE_HOME/bin/rman target / << EOF
startup mount
restore database;
recover database;
alter database open;
quit
EOF
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as SYSDBA
-- shutdown and then startup so database is ready for use
shutdown immediate;
startup
EOF

