Re: RMAN Shell Script Failing
Date: Fri, 26 May 2017 15:47:04 +0000
Message-ID: <300D8106-404B-47EF-AE63-8E4E7F605EC9_at_mufalani.com.br>
Hi David,
You need to put your rman commands between <<EOF and EOF. The OS doesn’t know commands like “SPOOL” and “RUN{“, because they are rman commands.
rman target sys/<password>_at_orcl catalog rman/<password>_at_rcat auxiliary sys/<password>@PRDREP1<<EOF
spool log to '/home/oracle/scripts/restore/orcl_dup_to_prdrep.log';
run {
run{
EOF
Obs.: Try startup nomount your auxiliary before issue the shell script.
All the best,
Rodrigo Mufalani - Diretor Técnico | rodrigo_at_mufalani.com.br<mailto:rodrigo_at_mufalani.com.br> | +55 21 988 994 817
Mufalani - +55 21 3193 0326 | Rua Alm Grenfall, 405, Bl 3, Sl 310, Centro Empresarial
Washington Luiz, Duque de Caxias, RJ | CEP 25085-009 | www.mufalani.com.br<mailto:rodrigo_at_mufalani.com.br>
[id:image001.png_at_01D2CE51.4968E650]<http://www.mufalani.com.br/>[id:image002.png_at_01D2CE51.4968E650]
De: <oracle-l-bounce_at_freelists.org> em nome de David Barbour <david.barbour1_at_gmail.com>
Responder para: "david.barbour1_at_gmail.com" <david.barbour1_at_gmail.com>
Data: sexta-feira, 26 de maio de 2017 12:38
Para: oracle-l mailing list <oracle-l_at_freelists.org>
Assunto: RMAN Shell Script Failing
Oracle EE 12.1.0.2 - 2 Node RAC
orcl1_at_node1:/home/oracle/scripts/restore $ cat rman_dup.sh
#! /bin/sh
set echo on
rman target sys/<password>_at_orcl catalog rman/<password>_at_rcat auxiliary sys/<password>@PRDREP1
spool log to '/home/oracle/scripts/restore/orcl_dup_to_prdrep.log';
run {
run{
exit;
And the nohup output:
Recovery Manager: Release 12.1.0.2.0 - Production on Fri May 26 10:32:34 2017
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)';}
release auxiliary channel c1;
}
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:
export ORACLE_SID=PRDREP1
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_2
export ORACLE_BASE=/u01/app/oracle
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)';}
release auxiliary channel c1;
}
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 commandsRMAN-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.
-- http://www.freelists.org/webpage/oracle-lReceived on Fri May 26 2017 - 17:47:04 CEST
- image/png attachment: image001.png
- image/png attachment: image002.png