Sponsored Content
Full Discussion: RMAN script gives error
Top Forums Shell Programming and Scripting RMAN script gives error Post 302880529 by radoulov on Friday 20th of December 2013 08:39:23 AM
Old 12-20-2013
The following statement is incomplete:
Code:
backup incremental level 1 tag Daily_Diff_Backup
    format '/u01/app/oracle/backup/Daily_%T_L1_%db_df_%U_%t';

Backup what Smilie? Database?
(in the example below "s" is your script name)
Code:
bash-3.00$ rman checksyntax @s

Recovery Manager: Release 10.2.0.4.0 - Production on Fri Dec 20 14:34:22 2013

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

RMAN> run {
2> allocate channel d1 type disk FORMAT '/u01/app/oracle/backup/Daily_%U_%t';
3> allocate channel d2 type disk FORMAT '/u01/app/oracle/backup/Daily_%U_%t';
4> allocate channel d3 type disk FORMAT '/u01/app/oracle/backup/Daily_%U_%t';
5>
6> backup incremental level 1 tag 'Daily_Diff_Backup'
7>     format '/u01/app/oracle/backup/Daily_%T_L1_%db_df_%U_%t';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found ";": expecting one of: "archivelog, as, backup, backupset, blocks, channel, check, comma, copy, copies, controlfilecopy, cumulative, current, database, datafile, datafilecopy, device, diskratio, db_recovery_file_dest, db_file_name_convert, duration, filesperset, for, format, full, force, incremental, keep, (, maxsetsize, nochecksum, noexclude, nokeep, not, proxy, pool, reuse, recovery, skip, spfile, setsize, tablespace, tag, to, validate"
RMAN-01007: at line 7 column 57 file: s

Added the keyword database:

Code:
bash-3.00$ rman checksyntax @s

Recovery Manager: Release 10.2.0.4.0 - Production on Fri Dec 20 14:34:52 2013

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

RMAN> run {
2> allocate channel d1 type disk FORMAT '/u01/app/oracle/backup/Daily_%U_%t';
3> allocate channel d2 type disk FORMAT '/u01/app/oracle/backup/Daily_%U_%t';
4> allocate channel d3 type disk FORMAT '/u01/app/oracle/backup/Daily_%U_%t';
5>
6> backup incremental level 1 tag Daily_Diff_Backup
7>   database
8>     format '/u01/app/oracle/backup/Daily_%T_L1_%db_df_%U_%t';
9>
10> sql 'alter system archive log current';
11> sql 'alter system archive log current';
12> backup tag ORCL_ARCHIVE
13>        archivelog all
14>        format '/u01/app/oracle/backup/al_%t_%s_p_ARCHIVE'
15>        delete all input;
16>
17> backup tag ORCL_CONTROL
18>            current controlfile
19>            format '/u01/app/oracle/backup/cf_%t_%s_p_CONTROL';
20>
21> crosscheck archivelog all;
22> delete noprompt expired archivelog all;
23> crosscheck backup;
24> delete noprompt expired backup;
25>
26> release channel d1;
27> release channel d2;
28> release channel d3;
29> }
30>
The cmdfile has no syntax errors

Recovery Manager complete.

This User Gave Thanks to radoulov For This Post:
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script for RMAN Backup

Hi Experts, Can anyone help me to write shell script for taking backup with RMAN in oracle 9i or suggests me any site which has this kind of scripts Thanks shaan (1 Reply)
Discussion started by: shaan_dmp
1 Replies

2. UNIX for Dummies Questions & Answers

awk Shell Script error : "Syntax Error : `Split' unexpected

hi there i write one awk script file in shell programing the code is related to dd/mm/yy to month, day year format but i get an error please can anybody help me out in this problem ?????? i give my code here including error awk ` # date-month -- convert mm/dd/yy to month day,... (2 Replies)
Discussion started by: Herry
2 Replies

3. Windows & DOS: Issues & Discussions

Error opening script file - location error

Hello, I know nothing about UNIX, ftp, etc. I am building an excel VBA macro which calls a .bat file. I've taken a pre-existing batch file and am trying to modify it to fit my purposes. I would be very grateful for some assistance. Here is my .bat file: echo off set... (9 Replies)
Discussion started by: starcraftbud
9 Replies

4. UNIX and Linux Applications

Running RMAN backups from grid control but using oracle account with rsa keys vs a password ?

I'm a sysadmin trying to help out one of our DBA's setup the RMAN backups (Oracle 11g on rhel5 ) so they can schedule and control them from the OEM grid control. But we want the oracle user to use ssh keys instead of a password. I have the working rsa keys in place for the user but the GUI seems to... (0 Replies)
Discussion started by: samael00
0 Replies

5. Shell Programming and Scripting

rman script

Hi, Can anyone provide me with RMAN script for taking backup to tape and restoring the same from tape. Thanks (0 Replies)
Discussion started by: chetansingh23
0 Replies

6. Shell Programming and Scripting

RMAN commands inside crontab shell script

Hello I'm trying to write simple script to delete archive logs for RMAN, unfortunately it's not working, I tried two way to do that: #!/bin/ksh echo "Start ....." rman target=/ << EOF RUN { delete force noprompt archivelog until time 'sysdate-10'; } EXIT; EOF echo "END ..." echo... (6 Replies)
Discussion started by: samer.odeh
6 Replies

7. Shell Programming and Scripting

Usage of disc group to kick off Oracle RMAN backup

Hi guys, i need a small help. I was writing an automation script for import utility of oracle datapump. I am getting stuck in one part of the shell script where i am doing a grep on one of the filesystem and if it is above threshold then it would kick off an oracle RMAN backup. Fyi. i am grepping... (3 Replies)
Discussion started by: sub
3 Replies

8. UNIX for Dummies Questions & Answers

Help on parsing Oracle RMAN output for string and print sections of a file

Hi, I need some advise on how to print 'sections' of the attached file. I am searching for some that says Marked Corrupt and print some lines after it. At the moment I am running the command below: sed -n -e '/Marked Corrupt/{N;N;p;}' rman_list_validate.txtThis gives me the following... (1 Reply)
Discussion started by: newbie_01
1 Replies
All times are GMT -4. The time now is 07:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy