Exit RMAN script linux problem...

Hi all

I use 11.1.6.0 on linux centos... Here is the rman script (the name is rmanbackup.sh).

RMAN target / < <-EOF
SQL 'alter system archive log current';
Run {}
backup current controlfile;
}
output
EXPRESSIONS OF FOLKLORE
echo "complete script for rman backup.
mkdir/home/oracle/backup_dir
CP/home/oracle/backup_dir/home/oracle/backup_dir1

When I run this, rman output script without executing the last orders 3 operating system.
any help in this regard.

Mseberg said, please try to score you questions answers, here's the answer:

Add * #! / bin/ksh * in your script. also cp-r no cp

[oracle@wissem ~]$ cat rmanbackup.sh
#!/bin/ksh
rman target / <<- EOF
sql 'alter system archive log current';
run {
backup current controlfile;
}
exit
EOF
echo "script complete for rman backup"
mkdir /home/oracle/backup_dir
cp -r /home/oracle/backup_dir /home/oracle/backup_dir1

[oracle@wissem ~]$ ./rmanbackup.sh 

Recovery Manager: Release 11.2.0.1.0 - Production on Sun Aug 28 17:00:11 2011

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

connected to target database: ORAWISSE (DBID=3964208472)

RMAN>
using target database control file instead of recovery catalog
sql statement: alter system archive log current

RMAN> 2> 3>
Starting backup at 28-AUG-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=149 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 28-AUG-11
channel ORA_DISK_1: finished piece 1 at 28-AUG-11
piece handle=/home/oracle/app/oracle/flash_recovery_area/ORAWISSE/backupset/2011_08_28/o1_mf_ncnnf_TAG20110828T170014_75np001q_.bkp tag=TAG20110828T170014 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 28-AUG-11

RMAN> 

Recovery Manager complete.
script complete for rman backup
[oracle@wissem ~]$ ls -rtl /home/oracle/backup_dir
total 0
[oracle@wissem ~]$ ls -rtl /home/oracle/backup_dir1/
total 4
drwxr-xr-x 2 oracle oinstall 4096 Aug 28 17:00 backup_dir
[oracle@wissem ~]$ ls -rtl /home/oracle/backup_dir1/backup_dir/
total 0

[oracle@wissem ~]$ 

Tags: Database

Similar Questions

  • implement a RMAN script in a cron job with a cold way of database

    Hello

    I want to run the Rman script in a cron job. But my question is: is it possible to make a backup of cold with the editing of the database and change at the end of the backup?

    here my sample rman script

    #! / bin/ksh

    export ORACLE_SID = test

    ORACLE_HOME=/U01/app/Oracle/product/11.2.0/dbhome_1; Export ORACLE_HOME

    PATH = / usr/sbin: $PATH: $ORACLE_HOME/bin. export PATH

    ORACLE_HOME/bin/rman target = / < < EOF

    Run {}

    SQL! connect / as sysdba;

    SQL! stop immediately;

    SQL! Startup mount;

    allocate channels ch1 disc type

    disc format ' / u01/app/oracle/backup/full_%d_T%T_s%s_p%p'(database).

    backup database archivelog;

    remove obsolete;

    output channel ch1

    SQL! alter database open

    }

    "exit";

    EXPRESSIONS OF FOLKLORE

    Thank you

    Hello

    No problem, when you use the rman target / it to connect with the RMAN and RMAN fast turns. You can change your order something like that

    #! / bin/ksh

    export ORACLE_SID = test

    ORACLE_HOME=/U01/app/Oracle/product/11.2.0/dbhome_1; Export ORACLE_HOME

    PATH = / usr/sbin: $PATH: $ORACLE_HOME/bin. export PATH

    ORACLE_HOME/bin/rman target = /.<>

    Run {}

    stop immediately;

    bootable media;

    allocate channels ch1 disc type

    format ' / u01/app/oracle/backup/full_%d_T%T_s%s_p%p';

    backup database archivelog;

    remove obsolete;

    output channel ch1.

    ALTER database open;

    }

    "exit";

    EXPRESSIONS OF FOLKLORE

    HTH

  • RMAN SCRIPT TO CLEAR THE BACKUP ITEMS MORE THAN 2 DAYS...

    Hello

    I take a full backup of the DB using RMAN script. The script is as below:

    grc_backup
    {allocate channel ch1 type disc format ' / home/oragrc/GRCbkup/rman_bkp/data/%T_%c_%s_%f';}
    backup database;
    SQL ' ALTER SYSTEM
    ARCHIVE LOG CURRENT ';
    change archivelog than any overlap;
    ARCHIVELOG backup all the format ' / home/oragrc/GRCbkup/rman_bkp/Archive/%T_al_%U.bck';
    current backup controlfile as ' / home/oragrc/GRCbkup/rman_bkp/%T_cf_%U.bck';
    }


    This script is supposed to run on a daily basis via an OS script.

    The problem is on a daily basis after the backup that I have to delete the backups more than 2 days. For this I use an OS script that finds the backups more than 2 days to find the command and deletes it. This script also removes the archivelogs over 2 days.

    I just know that it is not advisable to delete RMAN backups and archived logs OS command when using RMAN.

    I figured out the following script, I have changed the script and instance names are different please find below

    CONFIGURE REDUNDANCY 2 RETENTION STRATEGY;
    Configure type disk parallelism 1 backup compressed backupset device type;

    run
    {
    allocate channel d1 type disk;
    backup filesperset 5 ' format / u06/backup/EBSDEV/EBSDEV_data_t%t_s%s_p%p' database;
    SQL 'alter system archive log current';
    format of backup filesperset 20 ' / u06/backup/EBSDV3/EBSDV3_arch_t%t_s%s_p%p' all entered archivelog delete;
    backup format ' / u06/backup/EBSDEV/EBSDEV_control%U' current controlfile;
    backup spfile format ' / u06/backup/EBSDEV/EBSDEV_spfile_%U';
    SQL 'alter controlfile backup trace database as "/tmp/control.trc" re-use";

    OVERLAP BACKUPSET;
    DELETE NOPROMPT OBSOLETE;
    DELETE THE EXPIRED NOPROMPT BACKUP;
    }
    list summary backupset;
    "exit";

    Can someone suggest me this AM I correct...

    Yes.

    Note: The OVERLAP should be OVERLAPPING BACKUP.

    Hemant K Collette

  • RMAN disk space problems

    Hi all, I take a daily full backup of my database. She starts however currently lacking because there is not enough disk space.

    I have set to 'RECOVER WINDOW FROM 0 DAYS' conservation strategy. If the previous backup is deleted once the new backup was successful.

    We are in the progress of the addition of disk space, but it may take some time. At the same time is it possible to delete the old backup first? Because then I should have enough disk space to take a new full backup.

    It's my RMAN script:

    RMAN > DELETE NOPROMPT OBSOLETE;

    2 > CONFIGURE MAXSETSIZE TO UNLIMITED.

    3 > CONFIGURE CONTROLFILE AUTOBACKUP ON;

    4 > CONFIGURE RETENTION POLICY to RECOVERY WINDOW of 0 DAYS;

    5 > CONFIGURE DEVICE TYPE DISK PARALLELISM BACKUPSET BACKUP TYPE COMPRESSED 1;

    6 > CONFIGURE the CHANNEL DEVICE TYPE DISK MAXPIECESIZE 40 G;

    7 > AS COMPRESSED BACKUPSET BACKUP

    8 > ADDITIONAL STAFF 0

    9 > CUMULATIVE

    10 > TAG FULL_Su_12_22_2013

    11 > DATABASE

    12 > INCLUDE CURRENT CONTROLFILE

    13 > MORE ARCHIVELOG DELETION entry;

    14 > DELETE NOPROMPT OBSOLETE;

    15 > "exit";

    DELETE BACKUP is a command to delete the backup. But other mentioned move your backup to another location, and then delete. If you think that you will soon get the space, then you can wait until you get the new space. You can recover your database as long as you have old data base and all the archives after the backup.

  • Error in the configuration of RMAN script for physical Standby creation

    Version of database - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0

    I do creating waiting using physics 'RMAN duplicate script.

    The standby db is in nomount State.

    But when you connect to the primary database of standby DB to run the RMAN script on the backup server, I get the below error: -.

    [oracle@manu ~] $ rman target sys/oracle@orcl auxiliary sys/oracle@ORCL_STBY path = duplicate.trc

    Recovery Manager: release 11.2.0.1.0 - Production on Fri Jan 18 13:13:11 2013

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

    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of the package manager internal collection failed
    RMAN-04005: target database error:
    ORA-01031: insufficient privileges


    I checked a few password file is to say things as db and Eve tnsnames.ora and listener.ora primary in both primary and standby, everything seems perfect.

    Can someone help me find the real problem?

    All tips/ideas would be very appreciated

    Published by: 918868 on January 18, 2013 12:25 AM

    Published by: 918868 on January 18, 2013 12:27 AM

    Hello;

    I don't know I would use sqlplus to solve a problem of RMAN. At the end of the day, you still have to use RMAN to connect.

    You can debug by taking:

    rman target sys/oracle@orcl auxiliary sys/oracle@ORCL_STBY trace=duplicate.trc
    

    And then just try:

    rman target sys/oracle@orcl 
    

    Assuming this works, you can refine the RMAN connection problem.

    Connection string your RMAN:

    rman target sys/oracle@orcl auxiliary sys/oracle@ORCL_STBY trace=duplicate.trc
    

    Is different from the ones I use:

    rman target sys/password@PRIMARY auxiliary /
    
    OR
    
    rman target=sys/password@primary auxiliary=sys/password@standby
    

    In addition, you must have a static entry on the side of the day before, so you have something to connect to:

    Example of

    LISTENER =
        (DESCRIPTION_LIST =
          (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
          )
        )
    
    SID_LIST_LISTENER =
        (SID_LIST =
          (SID_DESC =
          (global_dbname = STANDBY_DGMGRL.hostname)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
          (sid_name = STANDBY)
          )
          (SID_DESC =
          (global_dbname = STANDBY.hostname)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
          (sid_name = STANDBY)
    )
    

    The listener must be restarted to see this entry.

    The tnsnames.ora will also the entries for two databases as both sides need to connect.

    Keys to success

    1. new Eve started NOMOUNT on new password file. (So the watch is a current master password renames and then the database started in NOMOUNT use it)
    2. hard coded listener on the new standby server.
    3 fix the tnsnames.ora files.
    4 fix the command duplicate.

    Best regards

    mseberg

  • Plan rman script in Windows 2003

    Oracle 10.2. I wrote an rman script and tried to plan the autorun in Windows 2003 server. I got this error:

    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of the package manager internal collection failed
    RMAN-04005: target database error:
    ORA-12560: TNS:protocol adapter error

    The package file name: rman_backup.bat
    content: rman target / cmdfile rman_backup.rcv log rman_backup.log

    Here's how I set up:
    go to control panel > scheduled tasks > add task scheduled, find rman_backup.bat, the timing of the execution and finish it. When you ask for username and password, I provide the user located in the oracle dba group.

    But when he run, he just produced the above error and will not work.

    Please notify

    S.



    in SQLnet.log

    fatal OR connect error 12560, connect to:
    (DESCRIPTION = (ADDRESS = (PROTOCOL = DOB (ARGV0 = oracleORCL))(PROGRAM=oracle) (ARGS = '(DESCRIPTION =(LOCAL=YES) (ADDRESS = (PROTOCOL = DOB)))')) (CONNECT_DATA = (SID = ORCL) (CID = (PROGRAM = D:\oracle\product\10.2.0\db_1\bin\rman.exe)(HOST=W3TY5Z203)(USER=WELC)))

    VERSION INFORMATION:
    AMT for 32-bit Windows: release 10.2.0.4.0 - Production
    Oracle bequeath Protocol adapter for 32-bit Windows NT: release 10.2.0.4.0 - Production
    Time: March 30, 2010 11:27
    Tracing not lit.
    AMT error struct:
    NS main err in code: 12560
    AMT-12560: TNS:protocol adapter error
    NS secondary err code: 0
    NT main err in code: 530
    AMT-00530: Protocol adapter error
    NT secondary err code: 2
    NT OS err code: 0

    ski123 wrote:
    No, I don't set up oracle_sid and oracle_home
    S.

    There is your problem. Any process that requires a connection to an oracle database must be able to tell what database, it wants to connect to. If you are on the same box that the database, which is done by setting the ORACLE_SID environment variable. And this oracle process (in your case rman, but it also applies to sqlplus on a remote client) needs to know where to find its own components, which is done by setting ORACLE_HOME.

  • RMAN backup permission problem

    My RMAN backup is scheduled.

    Even backup script fails sometimes and sometimes executed successfully
    When fails, it gives the following error.

    Your "cron" job the xxxx
    / U07/RMAN/scripts/call_arch_bkup. SCP

    produces the following output:


    Recovery Manager: release 9.2.0.1.0 - 64 bit Production

    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

    connected to target database: xxxx
    connected to the recovery catalog database
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of the package manager internal collection failed
    RMAN-04005: target database error:
    ORA-09925: cannot create the audit trail file
    SVR4 error: 13: permission denied
    Additional information: 9925


    If there is permission problem then there a few times, it runs successfully.

    It totally depends on your condition. Security can you move your old files to another location, course and then run your command?

  • Using the Scheduler to run the rman script directly stored in the recovery catalog

    Hi everyone, I usually automate my backups rman, using either cron or dbms_scheduler to call my stored in a sh file NIX rman scripts.  Everything works fine but anyone know how / if it is possible to call a stored in the recovery catalog rman script. Let's say I have create a script in the catalog:

    RMAN > create script showall

    Comment "just one example of demonstration."

    {

    VIEW ALL;

    }

    Can I use dbms_scheduler to call this script directly? If Yes, how and if not then how can we plan for this or a stored script stored in the rman catalog catalog.  Been looking all over the place, but everything seems to indicate leaving Oracle to call .sh or .bat file.

    Kind regards

    Dave

    Well, let us know the result.

    The link you supplied refers to 12 c Scheduler improvements it seems, it may not be applicable to lower versions of Oracle.

  • understanding the order of the commands in the RMAN script

    I just started working at a new job and prior s/n had left until I'm there. I'm looking at the RMAN script to back up the database of the single instance 11 GR 2 and I do not understand what is the need of two commands 'backup duplication "? Would it not be prudent to also have a command of "overlap of the archivelog backup all ' as well? In addition, what is the point of having the command "Restore database overview" in the daily backup script?


    run
    {
    cross-checking of backup;
    retrieve the copy of the database with the tag "ORA OEM_LVL1_ILANDB_PRIM$ ' until ' SYSDATE-1';
    backup incremental level 1 to retrieve the copy with the tag "ORA$ OEM_LVL1_ILANDB_PRIM" database more archivelog delete all entries;
    delete noprompt obsolete;
    Overview of database restore;
    cross-checking of backup;
    }

    Hello again;

    These jump out of me.

    CONFIGURE REDUNDANCY 1 RETENTION STRATEGY; (too low would set to minus 2 and would consider higher)
    CONFIGURE EXCLUDE THEM FOR TABLESPACE "WEBTASK_DATA"; (Consider removing unless you have good reasons for maintaining)
    CONFIGURE THE NONE ARCHIVELOG DELETION POLICY; (Review based on your configuration - for Data Guard may be different)

    STRATEGY OF RETENTION may be based on redundancy or a window of recovery. For redundancy, I like 2 or 3, for recovery window I like 7.

    Best regards

    mseberg

  • DataGuard Setup: RMAN Duplicate active problem

    Experts,

    I am trying to set up a standby database single-server to a primary database RAC, using configurations of data Gaurad. In this process, I finished all the configurations, and I was about to run the RMAN script to duplicate primary DB on Standby DB.

    When I turn off the RMAN script, he throws under the errors:

    ince the backup to December 5, 11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID = instance 901 = iam1 = DISK device type
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Db in dual at 05/12/2011 15:31:42
    RMAN-05501: abandonment of duplicate target database
    RMAN-03015: an error has occurred in the script stored memory Script
    RMAN-03009: failure of the backup command on the channel ORA_DISK_1 at 05/12/2011 15:31:42
    ORA-17629: unable to connect to the remote database server
    ORA-17627: ORA-01031: insufficient privileges
    ORA-17629: unable to connect to the remote database server


    Additional information:
    -----------------------------

    -Password is correctly copied the main database and the RAC rescue.
    -Capable to connect to DB primary waiting for database via sqlplus tool.
    -Telnet is conversely works very well.
    -All the pings work correctly.

    Please let me know if you have any suggestions. Happy to provide further information if necessary.

    Thank you

    Make sure that you should not use the password file that is located under /dbs. There is a folder called "database", where a password file must have been already generated at installation time. Simply copy the file to the same location on the standby node. I hope it should work now.

    Thank you
    GK

  • RMAN &amp; Configuration of RMAN script

    Dear all,

    This is the first time I'm with RMAN. I just wanted to run the RMAN script depending on the configuration of RMAN in order to test, for what is, I need to do before running this script below:
    RMAN > run {}
    stop immediately;
    bootable media;
    backup database;
    ALTER database open;
    }
    This is my current configuration of RMAN
    RMAN > show all.
    Database with db_unique_name DP RMAN configuration parameters are:
    CONFIGURE REDUNDANCY 1 RETENTION STRATEGY; # by default
    CONFIGURE BACKUP OPTIMIZATION # by default
    SET UP DEFAULT DISK DEVICE TYPE; # by default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO "%F" # by default
    SET UP THE DEVICE TYPE DISK PARALLELISM 1 BACKUP BACKUPSET TYPE; # by default
    CONFIGURE BACKUP OF DATA TO DISK FILE TYPE DEVICE TO 1; # by default
    CONFIGURE BACKUP ARCHIVELOG FOR DEVICE TYPE DISK TO 1; # by default
    CONFIGURE THE FORMAT OF DISC TYPE CHANNEL DEVICE "E:\RMAN\";
    CONFIGURE MAXSETSIZE TO UNLIMITED; # by default
    CONFIGURE ENCRYPTION OF DATABASE # by default
    CONFIGURE THE ENCRYPTION ALGORITHM "AES128"; # by default
    CONFIGURE COMPRESSION ALGORITHM 'BASIC' AND 'DEFAULT' LIBERATION OPTIMIZE FOR TRUE LOAD; # by default
    CONFIGURE THE NONE ARCHIVELOG DELETION POLICY; # by default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO ' E:\APP\10004\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFDP. ORA'; by default #
    kindly advice me and give me a very clear study for this above settings

    Concerning
    HAMEED


    Once I execute this script I got this following error message:

    + RMAN > run {+
    + 2 > shutdown immediate; +
    + 3 > mountain boot; +
    + 4 > backup database; +
    + 5 > alter database open; +
    {+ 6 >}; +

    database closed
    dismounted database
    Instance Oracle to close

    connected to the database target (not started)
    Oracle instance started
    mounted database

    Total System Global Area 770019328 bytes

    Bytes of size 1374780 fixed
    301991364 variable size bytes
    461373440 of database buffers bytes
    Redo buffers 5279744 bytes

    From backup may 18, 11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID = 134 type device = DISK
    channel ORA_DISK_1: starting full datafile from backup set
    channel ORA_DISK_1: specifying datafile (s) in the backup set
    Enter a file name 00006 = E:\APP\10004\ORADATA\DP\HAMEED01 = datafile number. DBF
    Enter a file name 00007 = E:\APP\10004\ORADATA\DP\ABDUL01 = datafile number. DBF
    Enter a number of file datafile = 00008 name = E:\APP\10004\ORADATA\DP\TEST01. DBF
    Enter a number of file datafile = 00001 name = E:\APP\10004\ORADATA\DP\SYSTEM01. DBF
    Enter a file name 00002 = E:\APP\10004\ORADATA\DP\SYSAUX01 = datafile number. DBF
    Enter a file 00005 name = E:\APP\10004\ORADATA\DP\EXAMPLE01 = datafile number. DBF
    Enter a number of file datafile = 00003 name = E:\APP\10004\ORADATA\DP\UNDOTBS01. DBF
    Enter a number of file datafile = 00004 name = E:\APP\10004\ORADATA\DP\USERS01. DBF
    channel ORA_DISK_1: starting piece 1 to 18 May 11
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03009: failure of the backup command on the channel ORA_DISK_1 to 2011-05-18 17:22:30
    ORA-19504: cannot create the file 'E:\RMAN\ '.
    ORA-27038: created file already exists
    OSD-04010: < create > option specified, the file already exists

    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-00558: error occurred during parsing of order entry

    Published by: hamza on May 18, 2011 04:59

    CONFIGURE THE FORMAT OF DISC TYPE CHANNEL DEVICE "E:\RMAN\";

    Let's not setting up your chain. You must therefore run as

    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'E:\RMAN\full_%U.bk';
    

    Then try again.

  • Cold backup RMAN script

    DB version: 10.2.0.4

    Can't you find something wrong in the below mentioned the cold backup RMAN script? Improvements, corrections?
    {
    shutdown immediate;
    startup mount;
    backup database including current controlfile tag='full_bkp';
    startup;
    crosscheck backup;
    delete noprompt obsolete device type disk;
    resync catalog;
    }

    Should work, but you can include more 'archivelog' in the backup statement in the case where your database is running in archivelog mode. It's also a good idea to make a backup of the trace of the controlfile using "sql" controlfile alter backup database to TRACE";"

  • Behavior of abnormal (Tag Date and place of automatic backup) RMAN script

    Hi all

    I have 11 GR 1 material running on Sun SOLARIS 10.

    The parameter default RMAN for backup of control file is on DISK (format: u02/oracle/backup/rman/control/%F.ctl)


    I have the RMAN script following (L0.rman):
    Run {}
    allocate channels ch1 type SBT_TAPE parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt) ';
    tag backup "${CURRENT_DATETIME}" additional 0 filesperset 3 format 'DB_%T_%U.dbf' database more archivelog;
    output channel ch1.
    }
    host ' cp /oracle/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora/u02/oracle/backup/rman/$(echo $CURRENT_DATETIME) /';


    This is called by the following (L0.sh) script:
    #! / bin/bash
    CURRENT_DATETIME = "$(date + 20 %y %m %d %H %M)»;) export CURRENT_DATETIME
    export ORACLE_SID = EDWH
    export ORACLE_HOME=/oracle/app/oracle/product/11.1.0/db_1
    mkdir/u02/oracle/backup/rman/$(echo $CURRENT_DATETIME)
    RMAN nocatalog target / cmdfile = L0.rman log = L0_EDWH_$ CURRENT_DATETIME.log


    The anomalies are as follows:

    1. the backupsets are created with a literal tag "${CURRENT_DATETIME}" instead of "201010051915" - why?
    FYI, the command 'host' at the bottom of L0.rman successfully copies the file in the right directory (/ u02/oracle/backup/rman/201010051915 /).

    2. after the backup finishes, the automatic backup for the control and spfile is taken on SBT_TAPE instead of DISK - why?

    Any help will be appreciated.

    1. well, this $CURRENT_DATETIME is variable shell, RMAN does not interpret it (she can't and doesn't have to.) HOST calls the external commands by spawning the shell in non-interactive mode and when placing the order for her, and since you have exported the variable is available to all processes having engineered and develop properly, then files are copied in the expected location. If you remove the '; CURRENT_DATETIME export"from your shell script, you will see files copied in/u02/oracle/backup rman / / because the variable will not be in the environment of the layed shell (it will be local to the script) and will expand to the empty string. You must pass $CURRENT_DATETIME to the RMAN script as a variable substitution so that the shell expands it before calling RMAN, like this:

    L0. RMAN: {code}
    Run {}
    allocate channels ch1 type SBT_TAPE parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt) ';
    backup format tag & 1 extra strength 0 filesperset 3 'DB_%T_%U.dbf' database archivelog;
    output channel ch1.
    }
    host ' cp /oracle/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora/u02/oracle/backup/rman / $ CURRENT_DATETIME /';
    {code}
    L0.sh: {code}
    #! / bin/bash
    CURRENT_DATETIME = "$(date + 20 %y %m %d %H %M)»;) export CURRENT_DATETIME
    export ORACLE_SID = EDWH
    export ORACLE_HOME=/oracle/app/oracle/product/11.1.0/db_1
    mkdir/u02/oracle/backup/rman / $ CURRENT_DATETIME
    RMAN nocatalog target / cmdfile = L0.rman using $CURRENT_DATETIME log = L0_EDWH_$ CURRENT_DATETIME.log
    {code}

    Note the * & 1 * variable substitution in the RMAN script and * using * keyword in the RMAN command line.

    2. control file record is taken to the same media, that the last backup, this is normal. You can't "CONFIGURE CONTROLFILE AUTOBACKUP ON the DISC" or something like that, you can only enable or disable it and specify format for various types of devices. Default device type does not play here, you are precisely the configured default device type substitution tape backup.

  • How can I connect rman usig linux

    Hi friends

    How can I connect rman using linux enterprice

    This is due to another also called linux program rman. To invoke the Oracle rman has provided, you must specify the full path to the binary file or make sure, $ORACLE_HOME/bin in $PATH at first:

    $ORACLE_HOME/bin/rman target /
    

    Best regards

    Maxim

  • RMAN script exit shell after backup

    Hello

    I have the following on AIX 6.1, Oracle 11.2.0.1.0 script:

    export ORACLE_HOME=/oracle/medprod/product/11.2.0/dbhome_1
    export ORACLE_SID = MEDPROD
    export PATH = $ORACLE_HOME/bin: $PATH
    Export LOG_DIR = / home/medinous/backup/logs
    Export LOG_FILE = $LOG_DIR/medprod_daily_backup_ ' date of +%d%m%Y%X'.log
    RMAN target / catalog log rman/rman@rman = $LOG_FILE < < EOF
    *{*
    Run the medinous_daily script.
    *}*
    "exit";
    EXIT;
    EXPRESSIONS OF FOLKLORE


    and:

    printing stored script: medinous_daily
    +{+
    allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt) ';
    allocate channel t2 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt) ';
    allocate channel t3 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt) ';
    database backup in format "medinous_dailybackup_ % d_ % s_ %t ';
    backup format 'medinous_dailyarchbackup_ % d_ % s_ %t' archivelog all not saved 1 time;
    cross-checking of backup;
    delete noprompt obsolete;
    delete expired backup noprompt.
    delete noprompt expired archivelog all;
    output channel t1;
    output channel t2;
    output channel t3;
    +}+


    For some reason, the rman, on demand via crontab script was not released after successful backup, the process just to stay alive, even if there is a command explicitly to leave at the end.


    Any idea?

    Dula

    Have you tried with a block of the RACE:

    run
    {
    execute script medinous_daily;
    }
    exit;
    

Maybe you are looking for

  • Many download lead to crash firefox cannot remove

    Hello I downloaded the files of 1300 at the same time via firefox, which lead to firefox to crash and every time I start the download resume and fails.I tried to enter via safe mode, but I could ' t remove the download queue.

  • lost sparsebundle password

    Hello! I have zero factory my mac pro and reinstalled OS X El Capitan, after I backed up all my animals, now my problem is that when I try to backup my new stuff in time capsule via time machine, he asked me to give my macbook pros sparsebundle passw

  • HP p6540y: card mother P6540y

    I have a hp with Windows 7 p6540y upgraded to Windows free 10. I need new motherboard. Can I just replace with exact same Board and I will have any problems with the Windows license?

  • HP Pavilion Notebook PC g6: drivers of laptop HP Pavilion g6 2275se

    Hi all I need all drivers for my laptop HP Pavilion Notebook PC 2275Se g6. HP Support assistance has not detected any drivers and I need the drivers following as soon as POSSIBLE. (1) USB (2) Ethernet (3) SM BUS controller (4) PCI device Product name

  • Using Windows backup or Restore Wizard

    If I backed up the selected files (Documents and settings, programs and Windows operating system) on a secondary hard drive, why records are not visible on the disc, on which they have been saved? I see icons on the correct backup drive backup, but t