Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Backup Script

Backup Script

From: Hari Om <hari_om_at_hotmail.com>
Date: 6 Aug 2003 12:04:25 -0700
Message-ID: <d1d5ebe4.0308061104.7c1e8d6a@posting.google.com>


I have a question on the Cold Backup Scripts. I was reading a book and it showed how to use scripts to automate BACKUP. Here is a sample:



#!/bin/ksh
ORACLE_SID=$1
export ORACLE_SID
export ORAENV_ASK=NO
BACKUP_DIR=/test01/app/oracle
. oraenv
sqlplus -s system/remorse << EOF
set head off feed off echo off trimspool on linesize 200 spool /u01/app/oracle/dba/cold_backup.ksh
select 'cp' || file_name || '{$BACKUP_DIR}' from sys.dba_data_files;
select 'cp' || name || '{$BACKUP_DIR}' from v$controlfile;
select 'cp' || member || '{$BACKUP_DIR}' from v$logfile;
spool off;
exit;
EOF

My question is with reference to line 6 (. oraenv) and Line 7 (sqlplus...)
What does Line 6 do? What is . oraenv used for? What does SQLPLUS with '-s" option do?

I am a newbie and so please excuse my ignorance on this topic. Where can I find more startup scripts on Oracle DB?

Thanks! Received on Wed Aug 06 2003 - 14:04:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US