RMAN Shell Script Failing

  • From: David Barbour <david.barbour1@xxxxxxxxx>
  • To: oracle-l mailing list <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 26 May 2017 10:38:39 -0500

Oracle EE 12.1.0.2 - 2 Node RAC
RHEL 6.8

We are backing up our on-premise stuff to the Oracle Cloud.  That works.
But when we try a duplicate database we're getting an error.  Just trying
at this point to get a simple RMAN comand to work.  Here's the script:

orcl1@node1:/home/oracle/scripts/restore $ cat rman_dup.sh
#! /bin/sh

set echo on

export ORACLE_SID=PRDREP1
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_2
export ORACLE_BASE=/u01/app/oracle


rman target sys/<password>@orcl catalog rman/<password>@rcat auxiliary
sys/<password>@PRDREP1

spool log to '/home/oracle/scripts/restore/orcl_dup_to_prdrep.log';


run {
allocate auxiliary channel c1 type 'SBT_TAPE' parms
'SBT_LIBRARY=/u01/app/oracle/product/12.1.0/dbhome_1/lib/libopc.so,ENV=(OPC_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcorc
l.ora)';}

run{
release auxiliary channel c1;
}

exit;

And the nohup output:

Recovery Manager: Release 12.1.0.2.0 - Production on Fri May 26 10:32:34
2017

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights
reserved.

connected to target database: ORCL (DBID=1408841846)
connected to recovery catalog database
connected to auxiliary database: PRDREP (not mounted)

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signaled during parse
RMAN-00565: unable to read input file
LFI-00005: Free some memory failed in lfibrdl().
LFI-01005: Unable to fill buffer.
LFI-00004: Call to lfibgl() failed.

Recovery Manager complete.
./rman_dup.sh: line 12: spool: command not found
./rman_dup.sh: line 15: run: command not found
./rman_dup.sh: line 16: syntax error near unexpected token `}'
./rman_dup.sh: line 16: `allocate auxiliary channel c1 type 'SBT_TAPE'
parms
'SBT_LIBRARY=/u01/app/oracle/product/12.1.0/dbhome_1/lib/libopc.so,ENV=(OPC_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcorc
l.ora)';}'


We are not using acfs or any clustered file systems.  There is plenty of
memory.

Other related posts: