Re: RMAN command from script
- From: "Joel Garry" <joel-garry@xxxxxxxx>
- Date: 28 Nov 2005 15:05:59 -0800
ram wrote:
> Hello,
> I am trying to run the RMAN backup from a script (unix). i wrote a
> small script (sh) with following commands:
> rman TARGET /
> RUN { backup database;
> }
> when i run it gives errors RUN, backup commands not found.
> Do i need to store this file under some specific dir? am i missing
> something?
> Thanks
Another way is to put the rman commands in another file and call it
from the shell script, ie:
.. /usr/local/bin/oradbenv
THE_DATE=`date +%y%m%d`
export FLASH_AREA="/oradata/flash"
rman nocatalog cmdfile ~/scripts/backup.rcv trace
~/logs/backup${THE_DATE}.log
and the rcv file in the scripts directory under your login directory
would have:
connect target
run {
backup
full
skip inaccessible
filesperset 4
tag full_db
format '$FLASH_AREA/df_%U'
database;
sql "alter system archive log current";
sql "alter database backup controlfile to trace";
backup archivelog all format '$FLASH_AREA/al_%U';
}
With maybe some allocate, set limit, release, include, etc. commands,
depending on your version and setup.
jg
--
@home.com is bogus.
Shocking, just shocking.
http://www.signonsandiego.com/uniontrib/20051128/news_1n28judge.html
.
- References:
- RMAN command from script
- From: ram
- RMAN command from script
- Prev by Date: Re: RMAN command from script
- Next by Date: Re: Is there any predefined Oracle constants there denominate very large number ?
- Previous by thread: Re: RMAN command from script
- Next by thread: Is there any predefined Oracle constants there denominate very large number ?
- Index(es):
Relevant Pages
|