RMAN Script doesn't run in Crontab

Hi Guys,
I've this simply issue.
2 Scripts:
-rwxrwxrwx 1 oracle oinstall    292 2013-10-01 17:15 crt_stby_CMOVP.sh
-rw-r--r-- 1 oracle oinstall    180 2013-10-01 16:11 crt_stby_CMOVP.rcv
---- Details of crt_stby_CMOVP.sh
oracle@cmovel-db01:~/scripts$ cat crt_stby_CMOVP.sh
#!/bin/sh
export ORACLE_HOME=/app/oracle/product/11.2.3
rman target sys/mkesh01@cmovp catalog rman/rman@rman auxiliary  sys/mkesh01@cmovpdg  cmdfile=/home/oracle/scripts/crt_stby_CMOVP.rcv log='crt_stby_CMOVP.log'
---- Details of crt_stby_CMOVP.rcv
run
allocate channel prm1 type disk;
allocate auxiliary channel stby1 type disk;
DUPLICATE TARGET DATABASE
  FOR STANDBY
  FROM ACTIVE DATABASE
  DORECOVER
  NOFILENAMECHECK;
---- Crontab :
20 17 * * * /home/oracle/scripts/crt_stby_CMOVP.sh >>/dev/null 2>&1
Issue :
Nothing happens
But when I execute the script manually : It runs !!!
oracle@cmovel-db01:~/scripts$ ./crt_stby_CMOVP.sh
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>
If I check the log everything is working fine
Any idea what might be wrong !!!!
Txs for your help

Hi,
Check the crond service is up and running. Please also try restarting the service:
/etc/init.d/crond restart
Please check whether your cron jobs are functioning well at the OS level
eg:
---- Crontab :
20 17 * * *                   date >> /home/oracle/date.log               
Because I have had issues, where the cron jobs fail even though the services were up and running.
Thanks &
Best Regards,

Similar Messages

  • [Solved] TigerVNC Bootup and Shutdown Script doesn't run

    Hi to everyone:
    I'm followed step by step these instructions, but I'm getting this error:
    [root@localhost ~]# systemctl -l status vncserver@:1.service
    ● vncserver@:1.service - Remote desktop service (VNC)
    Loaded: error (Reason: Invalid argument)
    Active: inactive (dead)
    sep 15 21:13:47 localhost systemd[1]: [/etc/systemd/system/vncserver@:1.service:28] Executable path is not absolute, ignoring: x0vncserver -display :0 -passwordfile /home/user/.vnc/passwd
    sep 15 21:13:47 localhost systemd[1]: vncserver@:1.service lacks ExecStart setting. Refusing.
    [root@localhost ~]#
    What I'm doing wrong?
    Last edited by Ravenman (2014-09-21 15:24:55)

    R00KIE wrote:The two status lines tell you that your service file is not correct. Recheck your service file and fix it so that the first error goes away, at that time I suspect the second error will also go away.
    This is my service file:
    # The vncserver service unit file
    # 1. Copy this file to /etc/systemd/system/vncserver@:x.service
    # Note that x is the port number on which the vncserver will run. The default is 1 which
    # corresponds to port 5901. For a 2nd instance, use x=2 which corresponds to port 5902.
    # 2. Edit User=
    # ("User=foo")
    # 3. Edit and vncserver parameters appropriately
    # ("/usr/bin/vncserver %i -arg1 -arg2 -argn")
    # 4. Run `systemctl --system daemon-reload`
    # 5. Run `systemctl enable vncserver@:<display>.service`
    # DO NOT RUN THIS SERVICE if your local area network is untrusted!
    # See the wiki page for more on security
    # https://wiki.archlinux.org/index.php/Vncserver
    [Unit]
    Description=Remote desktop service (VNC)
    After=syslog.target network.target
    [Service]
    Type=forking
    User=user
    # Clean any existing files in /tmp/.X11-unix environment
    ExecStartPre=-/usr/bin/vncserver -kill %i
    ExecStart=x0vncserver -display :0 -passwordfile /home/usuario1/.vnc/passwd
    ExecStop=/usr/bin/vncserver -kill %i
    [Install]
    WantedBy=multi-user.target
    I can't find the mistake. Can you help me, please?

  • Scheduler with RMAN script

    hi,
    i have the following RMAN script:
    /*daily.sh*/
    run {
    allocate channel ch1 device type disk format '/rman/%d_%T_%p_%U' maxpiecesize 1G;
    backup
    incremental level 1 cumulative
    database
    plus archivelog delete input;
    backup current controlfile;
    backup spfile;
    release channel ch1;
    and also have the following scheduler script:
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB(
    job_name=>'BDOFFICE.INC_BACKUP',
    job_type => 'EXECUTABLE',
    job_action =>'/office/u01/daily.sh',
    start_date=>'28-NOV-06 02.18.00 PM',
    repeat_interval=>'TRUNC(SYSDATE+1)+14/24',
    /* after 1 days at 1:00 PM */
    comments => 'daily backup');
    END;
    how can i integrate these so that scheduler run the script automatically.
    plz give me the steps with example.
    thanks
    Message was edited by:
    bijitesh

    You can use the dbconsole to schedule your backup script. It is quite easy and you can have it show you the sql used to create the job.

  • Create a user who can run only 'rman script'

    Dear Friends ,
    I have created a 'rmanback; user who only can run the RMAN script only . I have created user like follwoing way :
    1)
    SQL> CREATE USER rmanback IDENTIFIED BY rmanback;
    User created.
    SQL> GRANT RECOVERY_CATALOG_OWNER TO rmanback;
    Grant succeeded.
    SQL> GRANT CONNECT, RESOURCE TO rmanback;
    Grant succeeded.
    2)
    And My rman script is :
    rman target rmanback/rmanback@orcl <<!
    run
    allocate channel t1 type disk;
    backup format 'df_%t_%s_%p'
    (database);}
    3) And I make a situation where sys user cannot enter the database using its password . For this reason i give the follwoing entry in "sqlnet.ora" :
    SQLNET.AUTHENTICATION_SERVICES=(NONE)
    Now when I run the script then it shows the follwing error :
    [oracle@localhost RMAN]$ sh rman.sh.copy
    Recovery Manager: Release 10.1.0.3.0 - Production
    Copyright (c) 1995, 2004, Oracle. All rights reserved.
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04005: error from target database:
    ORA-01031: insufficient privileges
    Now plz tell me where is the problem . If I make any mistake then plz inform me .....
    Thx
    -----

    SYSOPER is a privilege that is not enough for recovery manager. Talking about SYSOPER privileges to perform a backup/recover operation from a sqlplus prompt, SYSOPER can perform backup operations, but when recovery is required, the only kind of recover it can perform is a complete recover, if the user requires any kind of incomplete recover it won't be possible since SYSOPER cannot issue neither of until time|change|cancel|controlfile operations, which require the user to connect with the SYSDBA role.
    If you attempt to connect to the database by means of recovery manager with an account with SYSOPER role, you will get the following error:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS===============
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04005: error from target database:
    ORA-01031: insufficient privilegesFor the OP, there is no way to create some sort of operator accout, since this will have to connect as SYSDBA to perform all operations required by recovery manager, you will absolutely have to rethink your security strategy, and as I previously posted, you should use OS authentication and protect access to the host server.
    ~ Madrid
    http://hrivera99.blogspot.com/

  • Running scripts doesn't end correct

    When running many scriptlines the job run through, but it never finish. SQLDeveloper accept cancel, but the scripts operation still runs (Running Script message on message line).
    Does SQLDeveloper count lines the scripts cover, or does it count a scripts from start to next ; as one line?
    I've tried different sizes here, and somewhere between 2500 - 5000 lines is the critical number. This is about 500-1000 scripts.

    Looks like a java problem. Log file claims "lock deadlock; thread 'SQL Worksheet Execution Thread' blocked" and the lists a lot of java issues

  • RMAN script doesnt exit shell after backup

    Hi,
    I've the following script on AIX 6.1, Oracle 11.2.0.1.0:
    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 +%d%m%Y%X`.log
    rman target / catalog rman/rman@rman log=$LOG_FILE <<EOF
    execute script medinous_daily;
    exit;
    EXIT;
    EOF
    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)';
    backup format 'medinous_dailybackup_%d_%s_%t'  database;
    backup  format 'medinous_dailyarchbackup_%d_%s_%t' archivelog all not backed up 1 times;
    crosscheck backup;
    delete noprompt obsolete;
    delete noprompt expired backup;
    delete noprompt expired archivelog all;
    release channel t1;
    release channel t2;
    release channel t3;
    +}+
    For some reason, the rman script, scheduled via crontab doesn't exit after successful backup, the process just remain alive, even though there's an explicit exit command at the end.
    Any idea?
    dula

    No, the script actully executes successfully. The problem is that after executing, the process does'nt die, it doesnt exit rman:
    channel t1: finished piece 1 at 28-DEC-10
    piece handle=prodarchbackup_PROD_666_738921153 tag=TAG20101228T075233 comment=API Version 2.0,MMS Version 5.5.2.0
    channel t1: backup set complete, elapsed time: 00:00:03
    channel t2: finished piece 1 at 28-DEC-10
    piece handle=prodarchbackup_PROD_667_738921153 tag=TAG20101228T075233 comment=API Version 2.0,MMS Version 5.5.2.0
    channel t2: backup set complete, elapsed time: 00:00:03
    channel t3: finished piece 1 at 28-DEC-10
    piece handle=prodarchbackup_PROD_668_738921153 tag=TAG20101228T075233 comment=API Version 2.0,MMS Version 5.5.2.0
    channel t3: backup set complete, elapsed time: 00:00:03
    Finished backup at 28-DEC-10
    Starting Control File and SPFILE Autobackup at 28-DEC-10
    piece handle=c-148294895-20101228-00 comment=API Version 2.0,MMS Version 5.5.2.0
    Finished Control File and SPFILE Autobackup at 28-DEC-10
    released channel: t1
    released channel: t2
    released channel: t3
    *<< I expect the rman shell script to exit at this point and 'die' >>>>*

  • RMAN script for Unix

    We have decided to abandon user managed hot backups and go with RMAN. Could you critizize the following approach and see if we are missing anything? I am making whole database backup and controlfile and archivelogs. I am using RMAN catalog.
    In a Unix script setting all of the environment variables and then
    connect target ********
    connect catalog *********
    configure snapshot controlfile to '${ORACLE_HOME}/snapshot_${ORACLE_SID}_${TIMESTAMP}_ctl';
    run {
    allocate channel c1 type disk;
    allocate channel c2 type disk;
    allocate channel c3 type disk;
    backup database plus archivelogs;
    release channel c1;
    release channel c2;
    p.s. control file autobackup is on
    Also, I have these questions:
    1. How do I direct the output of this backup to a file?
    2. Is there a way to check for errors within this file to see if the backup went ok?
    3. Would anyone have a unix shell script example of the above?
    4. How do I make sure that catalog is synched with control file and what is on the file system?
    5. Is it customary to delete archive logs via RMAN script if, say, my policy is to keep it on the file system for 7 days?
    thank you for any input!

    Hi,
    You didnot mention the db version, assumed it's 10g.
    If you planned to schedule this job at os level, you might use crontab (unix). The snapshot controlfile config can set with catalog once, so it's not needed to include in your backup script. Like wise your retention can set as "recovery window of 7 days".
    1. How do I direct the output of this backup to a file?
    ==> inside rman script you might use the following command,
    set log to '/home/oracle/rmanbkp.log';
    2. Is there a way to check for errors within this file to see if the backup went ok?
    ==> you might check in the logfile for ORA- and RMAN- errors.
    3. Would anyone have a unix shell script example of the above?
    I use to schedule this job either by OEM or crontab using rman script file.
    4. How do I make sure that catalog is synched with control file and what is on the file system?
    RMAN will do auto sync with controlfile.
    5. Is it customary to delete archive logs via RMAN script if, say, my policy is to keep it on the file system for 7 days?
    Upon successful backup you may delete the archivelogs or you might decide to keep it for 7 days and then delete by applying "delete obsolete" command.
    Thanks,
    Nirmal

  • Help needed with rman script

    Hi guys,
    I need you help in creating rman scripts.
    my plan is the following:
    - at night i would like to make a backup of the database, archivelogs, control file and spfile. then delete the archivelogs on disk.
    - during the day i would like to make every hour, a backup level 1, archivelogs and crontrol file.
    my questions are:
    for the night backup is the following script ok?
    run {
    set command id to 'xxx';
    allocate channel t1 type 'SBT_TAPE';
    allocate channel t2 type 'SBT_TAPE';
    BACKUP INCREMENTAL LEVEL 0 DATABASE;
    sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
    change archivelog all;
    backup archivelog all delete input;
    backup current controlfile;
    BACKUP SPFILE;
    release channel t1;
    release channel t2;
    and for the daily backup (run on every hour) what do you think about this? is it ok?
    run {
    set command id to 'xxx';
    allocate channel t1 type 'SBT_TAPE';
    allocate channel t2 type 'SBT_TAPE';
    BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
    sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
    backup archivelog all not backed up 1 times;
    backup current controlfile;
    release channel t1;
    release channel t2;
    please help.
    Message was edited.

    Hi Alanm,
    Right now the DB is generating many archives, that doesn't mean that we cant adapt the script in the future if less archives are generated.
    By saying "You don't have to make the archive log script an incremental 1 backup" you mean that, since we are already making a backup at night to the archives, theres no need to make them also during the incremental 1?
    and for the rest, do you thing the script is ok?

  • "A script is already running" while attempting to run more than one item

    We upgrade recently to ODT 11.2.0.3.20. Since then, attempting to run more than one item from the Solution Explorer (by selecting the items, right-clicking, and selecting "Run") results in a popup error of "Oracle Developer Tools. A script is already running". If many items are selected it results in many error messages and only a random few of the items are actually executed on the server. Also, choosing "Run On" now results in it prompting for the target database for each item selected (rather than once for all items selected like it used to). This all used to work fine in the earlier release we were using. Has anyone else run into this? Any fixes? We used to use multi-select and "Run" or "Run On" to deploy multiple items at once, but this no longer works -- doing one at a time works, but if you have hundreds of items to run, this quickly becomes unusable.
    Thanks for any insight.
    - Josh

    cshay wrote:
    I don't believe that the intention was for you to be able to run a bunch of scripts one after the other. Often there are dependencies between scripts anyway and so you you have to order them. Because we're generally deploying a large set of stored procedures (and not just one-time scripts) the order doesn't really matter -- even if a stored procedure gets created before one it depends on, once all the SPs are on the server, the ones that are "invalid" will compile correctly once you execute them.
    I think a lot of people are creating master scripts that references child scripts using the "@" sql plus syntax.... have you tried that?
    I'll give that a try as a work around. Only issue I have with that solution is every time we add or remove something from the solution, we also have to update the script.
    We are doing a lot of enhancements to our script generation in the coming year. Keep an eye out for a beta to test.
    Like I said, this used to work fine in the older versions of ODT. It seems like the new version is attempting to execute multiple items at once on the same connection simultaneously, thus resulting in the "A script is already running" error. The old version used to be smart enough to execute them one at a time -- so something changed in a more recent version to completely break "Run" and "Run On" when you have more than one item highlighted (even just highlighting 2 items and choosing "Run" runs the first item, but then gives the error for the second item).
    Christian- Josh

  • Powershell Startup script is not running on client machine

    Hi,
    We have a OU which has some computer accounts. We have a powershell script which sets the value of HKLM\system\currentcontrolset\services\usbstor  - start - 4. I created a GPO in which this script is set in startup mode. I have applied
    this GPO object to the OU. In parameter tab i have kept it blank. But this scrpit doesn't run all on any of the machines. I have checked the script running manually and it works.
    I have gone through the microsoft blog's and have performed in that way also but no output.
    1. What more setting i need to do on GPO object ? 
    2. Or where should keep the script in server sysvol folder ?
    Thanks

    Hello Amit,
    A couple of things to check:
    Do you put the Powershell scripts in appropriate tab when you are trying to configure your script?
    I believe it does not complete successfully because Powershell and related services is not started yet in start up process.
    You can run it successfully because you are logged on and all the related services are started. 
    Since you are trying to apply GPO to windows 7 and higher operating systems, you can apply registry settings using GPO preferences. More info:
    Configure a Registry Item
    Regards.
    Mahdi Tehrani   |  
      |  
    www.mahditehrani.ir
    Please click on Propose As Answer or to mark this post as
    and helpful for other people.
    This posting is provided AS-IS with no warranties, and confers no rights.
    How to query members of 'Local Administrators' group in all computers?

  • RMAN script errors out for some DB's

    I have a single RMAN script that uses env variables to execute RMAN for two databases. It runs fine. I cloned the two DB's (changed DBID's), all four are on the same host. Now I try to use same script for all four. I receive an error when trying to run against the cloned databases. Here is script:
    spool log to full.log append;
    connect catalog rman/xxxxxx@iasrman
    connect target /
    run {
    sql 'ALTER SYSTEM SWITCH LOGFILE';
    backup incremental level 0 database diskratio=0 plus archivelog delete input;
    And here is error, it stops same place everytime, input appreciated.
    Recovery Manager: Release 9.2.0.5.0 - 64bit Production
    RMAN>
    connected to recovery catalog database
    RMAN>
    connected to target database: PRSMQ02 (DBID=944525168)
    RMAN> 2> 3> 4>
    sql statement: ALTER SYSTEM SWITCH LOGFILE
    Starting backup at 30-MAY-07
    current log archived
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=20 devtype=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid=19 devtype=DISK
    allocated channel: ORA_DISK_3
    channel ORA_DISK_3: sid=18 devtype=DISK
    allocated channel: ORA_DISK_4
    channel ORA_DISK_4: sid=17 devtype=DISK
    allocated channel: ORA_DISK_5
    channel ORA_DISK_5: sid=11 devtype=DISK
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=25 recid=25 stamp=623931644
    channel ORA_DISK_1: starting piece 1 at 30-MAY-07
    channel ORA_DISK_2: starting archive log backupset
    channel ORA_DISK_2: specifying archive log(s) in backup set
    input archive log thread=1 sequence=26 recid=26 stamp=623931644
    channel ORA_DISK_2: starting piece 1 at 30-MAY-07
    channel ORA_DISK_1: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931649_s59_s1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
    channel ORA_DISK_1: deleting archive log(s)
    archive log filename=/q02/archive/prism/log_prsmq02_25.arc recid=25 stamp=623931644
    channel ORA_DISK_2: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931649_s60_s1 comment=NONE
    channel ORA_DISK_2: backup set complete, elapsed time: 00:00:02
    channel ORA_DISK_2: deleting archive log(s)
    archive log filename=/q02/archive/prism/log_prsmq02_26.arc recid=26 stamp=623931644
    Finished backup at 30-MAY-07
    Starting backup at 30-MAY-07
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    using channel ORA_DISK_4
    using channel ORA_DISK_5
    channel ORA_DISK_1: starting incremental level 0 datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00009 name=/q02/oradata01/prsmdata/Data_13.dbf
    input datafile fno=00016 name=/q02/oradata01/prsmdata/Data_20.dbf
    input datafile fno=00025 name=/q02/oradata01/prsmdata/Data_04.dbf
    input datafile fno=00005 name=/q02/oraindx01/prsmdata/Index_11.dbf
    input datafile fno=00020 name=/q02/oradata01/prsmdata/Tools02.dbf
    input datafile fno=00022 name=/q02/oraindx01/prsmdata/index_12.dbf
    channel ORA_DISK_1: starting piece 1 at 30-MAY-07
    channel ORA_DISK_2: starting incremental level 0 datafile backupset
    channel ORA_DISK_2: specifying datafile(s) in backupset
    input datafile fno=00010 name=/q02/oradata01/prsmdata/Data_14.dbf
    input datafile fno=00015 name=/q02/oradata01/prsmdata/Data_19.dbf
    input datafile fno=00024 name=/q02/oradata01/prsmdata/Data_03.dbf
    input datafile fno=00003 name=/q02/oratmp01/prsmdata/rbs01.dbf
    input datafile fno=00001 name=/q02/orasys01/prsmdata/system01.dbf
    input datafile fno=00012 name=/q02/orasys01/prsmdata/system02.dbf
    channel ORA_DISK_2: starting piece 1 at 30-MAY-07
    channel ORA_DISK_3: starting incremental level 0 datafile backupset
    channel ORA_DISK_3: specifying datafile(s) in backupset
    input datafile fno=00008 name=/q02/oradata01/prsmdata/Data_12.dbf
    input datafile fno=00014 name=/q02/oradata01/prsmdata/Data_18.dbf
    input datafile fno=00023 name=/q02/oradata01/prsmdata/Data_02.dbf
    input datafile fno=00028 name=/q02/oradata01/prsmdata/Data06.dbf
    input datafile fno=00019 name=/q02/oratmp01/prsmdata/rbs02.dbf
    input datafile fno=00021 name=/q02/orasys01/prsmdata/DRSYS.dbf
    channel ORA_DISK_3: starting piece 1 at 30-MAY-07
    channel ORA_DISK_4: starting incremental level 0 datafile backupset
    channel ORA_DISK_4: specifying datafile(s) in backupset
    input datafile fno=00007 name=/q02/oradata01/prsmdata/Data_11.dbf
    input datafile fno=00013 name=/q02/oradata01/prsmdata/Data_17.dbf
    input datafile fno=00018 name=/q02/oradata01/prsmdata/Data_01.dbf
    input datafile fno=00006 name=/q02/oradata01/prsmdata/Tools01.dbf
    input datafile fno=00002 name=/q02/oradata01/prsmdata/Users01.dbf
    input datafile fno=00026 name=/q02/oradata01/prsmdata/Data05.dbf
    channel ORA_DISK_4: starting piece 1 at 30-MAY-07
    channel ORA_DISK_5: starting incremental level 0 datafile backupset
    channel ORA_DISK_5: specifying datafile(s) in backupset
    input datafile fno=00004 name=/q02/oradata01/prsmdata/Data_15.dbf
    input datafile fno=00011 name=/q02/oradata01/prsmdata/Data_16.dbf
    input datafile fno=00017 name=/q02/oradata01/prsmdata/Data_22.dbf
    input datafile fno=00027 name=/q02/oradata01/prsmdata/Data_05.dbf
    channel ORA_DISK_5: starting piece 1 at 30-MAY-07
    channel ORA_DISK_1: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s1 comment=NONE
    channel ORA_DISK_1: starting piece 2 at 30-MAY-07
    channel ORA_DISK_2: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s1 comment=NONE
    channel ORA_DISK_2: starting piece 2 at 30-MAY-07
    channel ORA_DISK_3: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s1 comment=NONE
    channel ORA_DISK_3: starting piece 2 at 30-MAY-07
    channel ORA_DISK_4: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s1 comment=NONE
    channel ORA_DISK_4: starting piece 2 at 30-MAY-07
    channel ORA_DISK_5: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s1 comment=NONE
    channel ORA_DISK_5: starting piece 2 at 30-MAY-07
    channel ORA_DISK_2: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s2 comment=NONE
    channel ORA_DISK_2: starting piece 3 at 30-MAY-07
    channel ORA_DISK_1: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s2 comment=NONE
    channel ORA_DISK_1: starting piece 3 at 30-MAY-07
    channel ORA_DISK_4: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s2 comment=NONE
    channel ORA_DISK_4: starting piece 3 at 30-MAY-07
    channel ORA_DISK_5: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s2 comment=NONE
    channel ORA_DISK_5: starting piece 3 at 30-MAY-07
    channel ORA_DISK_3: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s2 comment=NONE
    channel ORA_DISK_3: starting piece 3 at 30-MAY-07
    channel ORA_DISK_2: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s3 comment=NONE
    channel ORA_DISK_2: starting piece 4 at 30-MAY-07
    channel ORA_DISK_4: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s3 comment=NONE
    channel ORA_DISK_4: starting piece 4 at 30-MAY-07
    channel ORA_DISK_1: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s3 comment=NONE
    channel ORA_DISK_1: starting piece 4 at 30-MAY-07
    channel ORA_DISK_2: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s4 comment=NONE
    channel ORA_DISK_2: backup set complete, elapsed time: 00:53:23
    channel ORA_DISK_5: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s3 comment=NONE
    channel ORA_DISK_5: starting piece 4 at 30-MAY-07
    channel ORA_DISK_3: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s3 comment=NONE
    channel ORA_DISK_3: starting piece 4 at 30-MAY-07
    channel ORA_DISK_4: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s4 comment=NONE
    channel ORA_DISK_4: starting piece 5 at 30-MAY-07
    channel ORA_DISK_1: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s4 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:59:04
    channel ORA_DISK_3: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s4 comment=NONE
    channel ORA_DISK_3: backup set complete, elapsed time: 01:00:10
    channel ORA_DISK_5: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s4 comment=NONE
    channel ORA_DISK_5: backup set complete, elapsed time: 01:00:25
    channel ORA_DISK_4: finished piece 5 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s5 comment=NONE
    channel ORA_DISK_4: backup set complete, elapsed time: 01:01:40
    Finished backup at 30-MAY-07
    Starting backup at 30-MAY-07
    current log archived
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 05/30/2007 11:22:38
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE

    connect target /You need to inform the connection string to target database.
    Can to be explicitly or with 'export sid' in your script.

  • Schedule rman script in Windows 2003

    Oracle 10.2. I wrote a rman script and tried to schedule auto run in Windows 2003 server. I got this errors:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04005: error from target database:
    ORA-12560: TNS:protocol adapter error
    The batch file name: rman_backup.bat
    content: rman target / cmdfile rman_backup.rcv log rman_backup.log
    Here is how I set it up:
    go to Control Panel>Scheduled Tasks>Add Scheduled Task, find rman_backup.bat, choose the run time and finish it. When asking for user name and password, I supply the user which is in oracle dba group.
    But when it run, it just produced the above error and won't run.
    Please advise
    S.
    in SQLnet.log
    fatal NI connect error 12560, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=D:\oracle\product\10.2.0\db_1\bin\rman.exe)(HOST=W3TY5Z203)(USER=WELC))))
    VERSION INFORMATION:
         TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
         Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.4.0 - Production
    Time: 30-MAR-2010 11:27:00
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 530
    TNS-00530: Protocol adapter error
    nt secondary err code: 2
    nt OS err code: 0

    here is example of script we are using to backup database from windows scheduler:
    set oracle_home=d:\oracle\ora920
    set path=d:\perl\bin;d:\oracle\ora920\bin;c:\winnt;c:\WINDOWS\system32;
    set PERL5LIB=''
    set NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
    set TNS_ADMIN=d:\oracle\ora920\network\admin
    d:
    cd \scripts
    set oracle_sid=car
    rman target sys/car_$z3br4 catalog rman/oemrp_pwd@oemrp @rman_level0_car.rman > rman_level0_car.log
    perl email_log.pl "RMAN Level 0 Log" d:\scripts\rman_level0_car.log CARthis script backing up 9i database. 10g and 11g database we backing up via EM grid control.
    You can change this script to backup 10g or 11g databses as well.

  • What's wrong with this RMAN script?

    Hi,
    I have a rman script to back up the 8i database like the following:
    #!/bin/ksh
    if [ $# != 1 ]; then
    echo "Usage: $0 ORACLE_SID"
    exit
    fi
    ORACLE_SID=$1; export ORACLE_SID
    RMAN_LOC=/u1/rman_backup
    export ORACLE_HOME=/u2/oracle/8.1.7
    export PATH=$ORACLE_HOME/bin:$PATH
    echo "connect target /" > rman_backup.rcv
    echo "" >> rman_backup.rcv
    echo "configure controlfile autobackup on;" >> rman_backup.rcv
    echo "" >> rman_backup.rcv
    echo "configure controlfile autobackup format for device type disk to '${RMAN_LOC}/%F';" >
    rman_backup.rcvecho "" >> rman_backup.rcv
    echo "run {" >> rman_backup.rcv
    echo "allocate channel t1 type disk;" >> rman_backup.rcv
    echo "backup database format '${RMAN_LOC}/db_${ORACLE_SID}_%u';" >> rman_backup.rcv
    echo "}" >> rman_backup.rcv
    rman cmdfile rman_backup.rcv
    When I run it, I got the following error:
    RMAN> connect target /
    2>
    3> configure controlfile
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01005: syntax error: found "controlfile": expecting one of: "compatible"
    RMAN-01007: at line 3 column 11 file: rman_backup.rcv
    BTW, the same script is working fine with 9i db.
    Could someone help me?
    Thanks in advance,
    Helen

    Hello,
    there is no controlfile autobackup in 8i RMAN. You must copy controlfile on your own, e.g. SQL 'ALTER DATABASE BACKUP CONTROLFILE TO file_name' or use eqiv. rman command - please check documentation.
    Kind Regards, Piotr
    DBA OCP.

  • RMAN Script & RMAN Configuration

    Dear All,
    This is the first time i am using RMAN. i just wanted to execute the following RMAN script for a testing purpose, for this what are the RMAN configuration i must have to do before executing this script below:
    RMAN> run {
    shutdown immediate;
    startup mount;
    backup database;
    alter database open;
    }This is my current setup of RMAN
    RMAN> show all;
    RMAN configuration parameters for database with db_unique_name DP 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 CHANNEL DEVICE TYPE DISK FORMAT 'E:\RMAN\';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:\APP\10004\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFDP.ORA'; # defaultKindly advice me and give me a very clear study for this above parameters
    Regards
    HAMEED
    Once i execute that script i got this following error :
    +RMAN> run {+
    +2> shutdown immediate;+
    +3> startup mount;+
    +4> backup database;+
    +5> alter database open;+
    +6> };+
    database closed
    database dismounted
    Oracle instance shut down
    connected to target database (not started)
    Oracle instance started
    database mounted
    Total System Global Area     770019328 bytes
    Fixed Size                     1374780 bytes
    Variable Size                301991364 bytes
    Database Buffers             461373440 bytes
    Redo Buffers                   5279744 bytes
    Starting backup at 18-MAY-11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=134 device type=DISK
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00006 name=E:\APP\10004\ORADATA\DP\HAMEED01.DBF
    input datafile file number=00007 name=E:\APP\10004\ORADATA\DP\ABDUL01.DBF
    input datafile file number=00008 name=E:\APP\10004\ORADATA\DP\TEST01.DBF
    input datafile file number=00001 name=E:\APP\10004\ORADATA\DP\SYSTEM01.DBF
    input datafile file number=00002 name=E:\APP\10004\ORADATA\DP\SYSAUX01.DBF
    input datafile file number=00005 name=E:\APP\10004\ORADATA\DP\EXAMPLE01.DBF
    input datafile file number=00003 name=E:\APP\10004\ORADATA\DP\UNDOTBS01.DBF
    input datafile file number=00004 name=E:\APP\10004\ORADATA\DP\USERS01.DBF
    channel ORA_DISK_1: starting piece 1 at 18-MAY-11
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/18/2011 17:22:30
    ORA-19504: failed to create file "E:\RMAN\"
    ORA-27038: created file already exists
    OSD-04010: <create> option specified, file already exists
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    Edited by: Hameed on May 18, 2011 4:59 AM

    Dear Chinar, can you please varify this below ,, is it correct,, after given your setup i ran this script,,,
    Kindly advice me
    Regards
    HAMEED
    RMAN> run
    2> {
    3> backup current controlfile;
    4> }
    Starting backup at 18-MAY-11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=143 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 18-MAY-11
    channel ORA_DISK_1: finished piece 1 at 18-MAY-11
    piece handle=E:\RMAN\FULL_06MCLH66_1_1.BK tag=TAG20110518T180910 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 18-MAY-11
    Starting Control File Autobackup at 18-MAY-11
    piece handle=E:\RMAN\CFC-796596855-20110518-00 comment=NONE
    Finished Control File Autobackup at 18-MAY-11Edited by: Hameed on May 18, 2011 5:55 AM

  • RMAN Script is not allocating channels

    I have a customer who is running a Solaris Server with Oracle 9i and is trying to backup using an RMAN script to define the channels to back up to through Networker.
    The script is as follows:
    run {
    allocate channel t1 type "sbt_tape";
    allocate channel t2 type "sbt_tape";
    send 'NSR_ENV=(NSR_SERVER=XXXX,NSR_DATA_VOLUME_POOL=Default)';
    sql 'alter system archive log current';
    change archivelog all crosscheck;
    set command id to 'bkrs';
    backup
    filesperset 20
    archivelog all
    delete input;
    release channel t1;
    release channel t2;
    Normally there are 3 channel allocations, but for some reason this does not work. He can only get 1 channel to work at a time which is impacting Backup Performance.
    There are no errors logged in the log files which is also odd. The device parallelism is 4 under Networker
    The version of Networker is 7.1
    Anyone else had any similar issues - I have been scratching my head on this for a while, or if anyone has any ideas on how to troubleshoot this I would appreciate any help
    Thanks

    I have now found some error information. Please see below.
    RMAN-00571: ======================================
    RMAN-00569: ===== ERROR MESSAGE STACK FOLLOWS =====
    RMAN-00571: =======================================
    RMAN-03009: failure of allocate command on t1 channel at 04/08/2004 10:37:02
    ORA-19554: error allocating device, device type: SBT_TAPE, device name:
    ORA-27211: Failed to load Media Management Library
    Any help much appreciated !!!!!

Maybe you are looking for

  • SQLException Error in Log file

    Does anyone know of the following error, and how to fix this? I keep getting it in my engine log file like every 30 mn. Thank you, -Lilach --------------------------------------------- Error -----------------------------------------------------------

  • Oracle 8i with Windows ME

    Yikes! I have tried to install Oracle 8i Personal on Windows ME and get the following error: "Jrew has caused and error in JAVAI.DLL Jrew will now close.". I modified my win.ini [compatiblity95] jrew=0x00080000 and it STILL doesn't install. Any sugge

  • Help class import

    I am using Tomcat 3.2.1 to implement servlet and javabean, jsp application. My class path is /webapps/myapp/web-inf/classes/bean. I put two classes in bean folder(they are videocustomer and videoavail). Now i want to use object of videoavail within v

  • Where is the adapter repository website?

    Does anyone know where the integration repository website is for Oracle products?

  • Create query for enforcing relationships?

    Hello all, I have a task of "developing comparitive queries enforcing relationships between tables"? it is an Oracle db environment with a PeopleTools 8.48 front end so I am not really sure if I should pose this question here or under PeopleSoft foru