.com Solutions Inc. - logo  
Products - Header Buttons
.
Repgen bullet item 7b Installgen bullet item 7b FmPro Migratorbullet item 7b CGIScripter
.
.
.

.
.

Installgen - sol920 - Title Graphic

Installgen Features and Benefits

Installgen Demo Available for download...

Bookmark This Page

email a friend

.

#!/bin/sh
# script: prod1_controlfile_backup_to_trace_1.sh (renamed from 36_sol_prod1_controlfile_backup_to_trace_1.sh)
# Features: This shell script backs up the control file to trace.
# Note: This script only needs scheduled as a CRON job if the same task
# has not been scheduled via an OEM job.
# This task is also incorporated into each of the other
# backup scripts.
#
# Script Sequence#: 36
# Used By: CRON job via oracle UNIX account
# Usage:
# ******** Nightly backup of controlfile to trace at 11:51PM ********
# 51 23 * * 0-6 /opt/server_scripts/prod1_controlfile_backup_to_trace_1.sh
# Copyright 2001 by test customer
#
# ---------------------- Revision History ---------------
# Date By Changes
# 10-1-2001 dsimpson Initial Release
# 10-7-2001 dsimpson trace file now goes into /backup directory
# 05-10-2002 dsimpson Updated to use oracle UNIX account.
# 10-01-2002 dsimpson Added globally set environment variables,
# added #! path to shell as 1st line

# 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

# back up the controlfile to a trace file in the /backup directory
#su - oracle -c "$ORACLE_HOME/bin/sqlplus /nolog" << EOF

$ORACLE_HOME/bin/sqlplus /nolog << EOF
conn / as sysdba
set echo on;
-- temporarily change the user dump dest so that
-- the text copy of the control file rebuilding sql commands
-- go into the /backup directory
ALTER SYSTEM SET USER_DUMP_DEST='/backup';
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
ALTER SYSTEM SET USER_DUMP_DEST='/u01/udump';
exit;
EOF



.

hline

. .

.

. .
 

Home | Products | Services | Downloads | Order | Support | Contact

Legal Notices

.
.   .
.
Home Products Services Downloads Order Support Contact