Re: Automate rman login with shell script

  • From: Jared Still <jkstill@xxxxxxxxx>
  • To: phil@xxxxxxxxxx
  • Date: Fri, 9 Dec 2011 16:39:02 -0800

On Fri, Dec 9, 2011 at 1:34 PM, Phillip Jones <phil@xxxxxxxxxx> wrote:
> Hi,
> EOF"
>
> Should be
>
> EOF
> "
>
>
That doesn't seem to be necessary - identical results on Oracle Linux 5
with bash and  ksh on (old) Suse linux

====
#!/bin/sh

cmd="
$ORACLE_HOME/bin/rman target / nocatalog <<EOF
show all;
EOF"

echo "$cmd"

eval "$cmd"


results:

16:35-poirot:ts20:jkstill-27 > ./r.sh

/u01/app/oracle/product/10gR2/ts20/bin/rman target / nocatalog <<EOF
show all;
EOF

Recovery Manager: Release 10.2.0.3.0 - Production on Fri Dec 9 16:35:51 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: TS20 (DBID=509834197)
using target database control file instead of recovery catalog

RMAN>
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; #
default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO
'/u01/app/oracle/product/10gR2/ts20/dbs/snapcf_ts20.f'; # default

RMAN>

Recovery Manager complete.
[ /home/jkstill/tmp ]

16:35-poirot:ts20:jkstill-27 > PD KSH v5.2.14 99/07/13.2^C
[ /home/jkstill/tmp ]


Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Oracle Blog: http://jkstill.blogspot.com
Home Page: http://jaredstill.com


--
//www.freelists.org/webpage/oracle-l


Other related posts: