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.

Similar Messages

  • Scheduling RMAN script on windows

    I want to schedule the following full database backup script to run every night at 10pm. Can anyone guide me how I can schedule it on windows OS but please don't suggest OEM as currently I have it scheduled thought OEM only.
    run
    allocate channel ch1 type disk format 'f:\backup\full_db_%D_%T.bak';
    backup database;
    }

    You can try to use DBMS_SCHEDULER. Following messages should help.
    Re: need backup script
    Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files

  • TREX startup/shutdown script for Windows 2003

    Hi ,
    I am looking for a script that would do a startup/shutdown of TREX servers/services on  Windows 2003.  I am not sure if I have posted this on the right forum.  Also, why is the TREX hanging and going into a dormant mode when not used?
    Is there a SAP note for the above.
    Would really appreciate any assistance.
    Thank you.
    Ramesh Srinivasan.

    Hi again,
    sorry my bad, I misunderstood your question. Indeed what the script does now is wait for the different components of BIEE to start and stop, whatever time they take for that. On my system (a dual-quad DL380 with 64GB RAM) the whole process still takes about 4 min. However this should not be too much of a pb to you since this BI reboot operations should really be exceptional, not much more frequent than system or database reboots in fact.
    On the other hand the BI processes restart from within Fusion Middleware Control are much more frequent and should be much quicker (about a couple dozen seconds).
    Maybe by looking at the startup logs (/var/log/obiee-start.log) you may identify some time-consuming operation. I remember that during initial setup I had some long timeouts when the managed server tried to contact the admin server on port 7001 and could not for whatever reason (firewall for instance). One thing to do might be to watch the startup process in real time by monitoring the log file (tail -f /var/log/obiee-start.log).
    Hope this helps,
    Chris

  • Adding *SAP Gui Scripting* in windows 2003

    Hi,
    we r devloped some z programs, and it is displayed properly in client desktp (XP). But it is not displyed properly in (OS) Windows 2003 server.
    So i added SAP Gui Scripting through Gui instalation and it displyed ok. But at same time my SAP Logon pad will hide from my desktop.
    So again i installed my SAP gui with
    1. SAP Gui Suite
    2. R/3 Add-on
    3. General Add-on
    Again same problem that is not visible when i am adding SAP Gui Scripting saplogon pad will automatically hide from my desktop.
    GUI version 7.10
    What could be resons?
    Regards
    Edited by: manoj nayak on Apr 6, 2010 9:51 AM
    Edited by: manoj nayak on Apr 6, 2010 10:18 AM

    Hi,
    Can u give more information how to troubleshot this one?
    And why after install (add) of SAP GUI SCRIPT SAP logon pad will automatically remove from desktop?
    Error:
    The system cannot find the file specified.
    Destination:
    C:\Program Files (x86)\SAP\FrontEnd\sapgui\wwi\wwilabel.exe
    Error-Code:
    2147024894
    Any idea?
    Regards.

  • Rman script in windows

    hi .
    I dont know how can i write RMAN script in windowse,
    please help me.

    Create a script, say backup.cmd : the following backs up the controlfile, entire DB, all archivelogs and deletes backed up archivelogs :
    run { allocate channel d1 type disk;
          configure controlfile autobackup on;
          backup database plus archivelog delete input;
    }then, at OS prompt
    C:\> set ORACLE_SID=<your SID>
    C:\> rman target /
    RMAN> @backup.cmd

  • Scheduling Rman backup in windows

    Hi all,
    I need to configure backup in Rman using the task scheduler in windows. I have placed 2 scripts 1 is batch file and 2nd is sql file with the below contents. When i ran the batch file the process is only getting logged into RMAN prompt but not executing the sql statements, how can i schedule it?
    Version: 9i
    OS: Windows server 2003
    Bat file
    rman target=sys/oracle@orcl1
    @'d:\oracle\rman\backup.sql'
    sql file
    run
    backup archivelog all;
    delete noprompt obsolete;
    }

    user10724679 wrote:
    Hi all,
    I need to configure backup in Rman using the task scheduler in windows. I have placed 2 scripts 1 is batch file and 2nd is sql file with the below contents. When i ran the batch file the process is only getting logged into RMAN prompt but not executing the sql statements, how can i schedule it?
    Version: 9i
    OS: Windows server 2003
    Bat file
    rman target=sys/oracle@orcl1
    @'d:\oracle\rman\backup.sql'
    sql file
    run
    backup archivelog all;
    delete noprompt obsolete;
    }Change it like below and it will work
    Bat file
    rman target=sys/oracle@orcl1 @'d:\oracle\rman\backup.sql'

  • Export scripts automation windows 2003 server

    i want some automatic export scripts that run a specific time on daily basis
    My platform is windows
    My Database is oracle 10g
    Please help

    1002643 wrote:
    i want some automatic export scripts that run a specific time on daily basis
    My platform is windows
    My Database is oracle 10g
    Please helpcreate *bat file & schedule using AT utility                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Can we schedule rman backup in windows platform??

    My question is about my backup settings
    the idea is to all on windows platform
    a complete weekly backup (compressed backupset level 0)
    a daily (comulative) incremental backup (same, level 1)
    a hourly (differential) incremental backup (level1)
    could you please tell me if the following examples will fit my needs,
    thanks to you all

    user10896195 wrote:
    a complete weekly backup (compressed backupset level 0)
    a daily (comulative) incremental backup (same, level 1)
    a hourly (differential) incremental backup (level1)
    this scenario i wanna createYour certainly can if you choose to do so.
    I think most people are content with a inc 0 once a week, an inc 1 the other 6 days. Daily backup of archivelogs, with deletion of archivelogs after 'n' backups. It really all depends on your service level (time to recover) requirements.

  • Schedule and windows 2003 "net use"

    ver 10.2.0.2
    lastest patch 9
    windows 2003
    trying to get the scheduler to work with a batch file that uses NET USE etc..
    for ex
    net use q: \\workstation\sharename mypass /user:domain_admin
    I have tried to put this in a BATCH file
    begin
    dbms_scheduler.drop_job('t1');
    dbms_scheduler.purge_log;
    dbms_scheduler.create_job
    ('t1',
    job_action=>'C:\WINDOWS\system32\cmd.exe',
    number_of_arguments=>3,
    job_type=>'executable',
    enabled=>false,
    auto_drop=>false);
    dbms_scheduler.set_job_argument_value('t1',1,'/q');
    dbms_scheduler.set_job_argument_value('t1',2,'/c');
    dbms_scheduler.set_job_argument_value('t1',3,'e:\move_net\see.bat');
    dbms_scheduler.enable('t1');
    dbms_lock.sleep(3);
    commit;
    end;
    pl/sql procedure successfully completed.
    see.bat
    net use q: \\workstation\sharename mypass /user:domain_admin
    go into OEM
    look at the job status: SUCCEEDED
    look that the history find
    Details     STANDARD_ERROR="System error 1312 has occurred. A specified logon session does not exist. It may already have been terminated. The system cannot find the drive specified."
    now I have look high and low in metalink..really did not see an answer.
    I know what the answer is if I was on unix, but nothing on windows 2003
    I have made sure i got all the rights to extjob.exe etc
    I have change the job to reflect
    1= /q
    2=/c
    3=c:\windows\system32\net.exe use q: \\workstation\share mypass /user:domain_admin
    when i do this,
    I get a new error
    ORA-27369: job of type EXECUTABLE failed with exit code: The system cannot find the file specified. STANDARD_ERROR="System error 1312 has occurred. A specified logon session does not exist. It may already have been terminated. "
    just wonder if anyone has used NET USE...
    thanks
    p-

    Hi,
    Try to start OracleJobScheduler<SID> Windows service and try again.
    Start->Run->services.msc
    (This service is disabled by default)

  • Using scheduler to directly execute rman script stored in recovery catalog

    Hi everyone, I usually automate my rman backups using either cron or dbms_scheduler to call my rman scripts stored in a NIX sh file.  Everything works fine but does anyone know how/if it's possible to call an rman script stored in the recovery catalog. Lets say I create a script in the catalog:
    RMAN> create script showall
    comment 'just an example for demonstration'
    SHOW ALL;
    Can I use dbms_scheduler to call that script directly? If so how and if not then how can I schedule this or any catalog stored script stored in the rman catalog.  Searched all over the place but everything seems to point to having to leave Oracle to call either a .sh or .bat file.
    Regards,
    Dave

    Hi Greg, think you are definately on the right track mate.  Based on what you put I found this at:
    http://www.oracle-base.com/articles/12c/scheduler-enhancements-12cr1.php
    It has the entire rman script in the pl/sql block but going to see if I can modify what's on that page and use what you put so instead of executing the entire script it will run something like:
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB(
    job_name => 'RMAN_SHOW_ALL',
    job_type => 'EXECUTABLE',
    job_action => 'RMAN TARGET / CATALOG rman/password@ your_cat run {execute script showall;}'
    END;
    Or something similar with times etc for execution if possible as the mechanics are the same. Believe though that using the job_action parameter will be the answer and allow me to automate my daily etc backups at night.
    Will let you know once it's done and mark as correct answer.
    Dave

  • 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.

  • RMAN script gives error when scheduled

    Hi,
    I have this rman script....
    run {
    allocate channel 'dev_0' type 'sbt_tape'
    parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=TPRD,OB2BARLIST=test TPRD)';
    backup incremental level <incr_level>
    format 'test TPRD<TPRD_%s:%t:%p>.dbf'
    database;
    backup
    format 'test TPRD<TPRD_%s:%t:%p>.dbf'
    archivelog all;
    backup
    format 'test TPRD<TPRD_%s:%t:%p>.dbf'
    current controlfile;
    When this script is executed to run at the present moment, it gives no problems. However, when this script is scheduled and when executed at the scheduled time, it gives the following error:
    RMAN> CONNECT TARGET *
    2> run {
    3> allocate channel 'dev_0' type 'sbt_tape'
    4> parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=TPRD,OB2BARLIST=test TPRD,OB2BARHOSTNAME=+server.com+)';
    5> backup incremental level
    6> format
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "format": expecting one of: "equal, integer"
    RMAN-01007: at line 6 column 1 file: C:/ob2.cmdfile.12274.c1e9.rman
    [Major] From: ob2rman@+server.com+ "TPRD" Time: 2-11-2009 13:35:16
    The database reported error while performing requested operation.
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "format": expecting one of: "equal, integer"
    RMAN-01007: at line 6 column 1 file: C:/ob2.cmdfile.12274.c1e9.rman
    [Major] From: ob2rman@+server.com+ "TPRD" Time: 2-11-2009 13:35:16
    Oracle Recovery Manager completed with errors.
    Does anyone know what the problem is and why it only gives the error when it is scheduled and not otherwise?
    Thanks in advance.

    Hi user629987,
    The error comes from the following line
    backup incremental level <incr_level>(found "format": expecting one of: "equal, integer"
    see link:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96565/rcmsynta9.htm#78484)
    Can you replace it with
    backup incremental level 0and retry?
    Might be you have to adjust your format string to avoid <, > and : characters.
    Regards,
    Tycho

  • Can we convert Scheduled tasks in Windows 2003 to Windows 2008 Automatically

    Can we convert Scheduled tasks in Windows 2003 to Windows 2008 Automatically. what is the simpler way to convert it

    ... so migration of scheduled tasks from windows 2003 to windows 2008 is not possible.
    sainath anal
    If that is true, then what is the following TechNet article discussing?
    http://technet.microsoft.com/en-us/library/dd363704(v=ws.10).aspx
    Excerpt:
    Task Scheduler Backward Compatible Module Status
    Applies To: Windows Server 2008 R2
    The backward compatibility module is used by Task Scheduler to register and run tasks that were created to run on Windows Server 2003, Windows XP, and Windows 2000.

  • Batch script to test if Oracle instance is up on windows 2003

    I create the batch job from command line to test the oracle 10g, if the instance is up return oracle_sid is ready, this is running on windows 2003, test.bat
    =======================================
    @echo off
    set ORACLE_SID=TESTDB
    echo sqlplus DBAUSER/PASSWORD@%ORACLE_SID% > 1.sql
    echo set echo off feed off pages 0 >> 1.sql
    echo whenever sqlerror exit sql.sqlcode >> 1.sql
    echo select * from global_name; >> 1.sql
    echo exit; >> 1.sql
    sqlplus -s /nolog @1.sql >NUL:
    IF {%ERRORLEVEL%} == {0} (
    echo %ORACLE_SID% is ready
    )else(
    echo %ORACLE_SID% is not ready.
    echo End of script
    =======================================
    But it seems always display both lines oracle_sid is ready and not ready, do you know how to fix it?

    This may satisfy your needs for Windows. You will have to modify the settings for your environment. Obviously, this is not an exhaustive test, but the process should provide a cursory status of your database.
    @echo off
    setlocal
    set oracle_home=E:\oracle\product\10.2
    set path=E:\oracle\product\10.2\bin
    set oracle_sid=orcl10
    echo conn / as sysdba
    echo set head off feed off pages 0
    echo select status from v$instance;
    ) | sqlplus -s /nolog > %TEMP%\status.log
    for /f "tokens=3" %%i in ('%SystemRoot%\system32\find /c "OPEN" %TEMP%\status.log') do (
    if %%i == 1 (
    echo Database is OPEN
    ) ELSE (
    echo Databse does NOT appear to be OPEN
    for /f "tokens=4"  %%i in ('%SystemRoot%\system32\sc query oracleserviceorcl10 ^| %SystemRoot%\system32\find "STATE"') do echo %%i
    endlocal

  • 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

Maybe you are looking for

  • How to find out which abap queries were executed by a user

    Dear SAP Gurus, Is there a way to find out which abap queries were executed by an end user in the recent past?? 1.I tried using the t-code "stat" BUT: dont seem to be getting any results even though I put the start time almost 2 months back. 2.Also w

  • Copy and paste buffers not working correctly in iOS 8.1m

    Both iPads2's in my family arsenal are exhibiting what I believe to be a bug in the iOS8.1 (perhaps corrected by 8.1.1?), in the cut/copy & paste buffer stack. When invoking the operation to copy and paste data from one application to another, the pa

  • Superdrive Making Noise Over Music

    The Superdrive on my Dual 2.3 G5 has started making odd interference noise over any music that is being played from a disk. The noise is then imported into iTunes over the track. At first i thought it was an iTunes problem but it does it when audio i

  • Report timing out, "Too many records"

    I am using CR XIR2 with a univers that I created to run an inverntory report. The report works fine in the designer but when I go to run it from the CR Server It times out. (Very quickly).  If I put filters and only pull a subset of the data the repo

  • Display Vertical scroll bar by default

    I am not getting vertical scrollbar in JEditorPane.Here a sample Code. TRy to replace the image with available image of size greater than 800*400.(so that you will get a scrollbar). After running this code you will find that horizantal scrollbar appe