How to run rman with cron under RHEL3?

I am exhausted with all my options and knowledge with this. Tried 2 days with all possibilities, but failed. I have a Oracle 10g r2 (10.2.0.2) on a RHEL3 box. I wrote an orabackup.sh file as
rman target sys/pw@backup nocatalog <<EOF
run
{ backup as backupset incremental level 1 cumulative device type disk tag 'Thu_full_bkup%LEVEL_1'  database;
recover copy of database;
backup device type disk tag 'Thu_full_bkup%LEVEL_1' archivelog all not backed up;
delete noprompt obsolete device type disk;
exit
EOF
I have tried this with cron (crontab) under both oracle and root env with $PATH containing the $ORACLE_HOME/bin as the first. The cron job under the crontab is as
44 17 * * * "/home/oracle/orabackup.sh >> /home/oracle/rmanbk.log 2>&1". And it kept returning with either "RMAN: command not found" or the "/bin/sh: line 1: /home/oracle/orabackup.sh >> /home/oracle/rmanbk.log 2>&1: No such file or directory". I had included su - oracle -c in the either script or cron job with or without quote, but result the same error. Does not matter the cron phrase was /home/oracle or without it. Some sites suggested to enter the #!/bin/sh as the first line of the script, tried that and failed too. So what exact I should phrase both the script and cron to let it run automatically. I could run the script manually under either oracle and root env.

I'll try to rephrase. There are (at least) three cases:
1. When you login with a terminal (e.g. with telnet, ssh) then the file ".bash_profile" is run automatically if your default shell is bash (check $SHELL to verify). In this case your personally-configured $PATH will be known with no effort on your side.
2. When a script is run by cron through crontab, then no login script is run automatically. In that case, you need to explicitly tell the script to run your login script, i.e. ".bash_profile". Otherwise, $PATH will not include $ORACLE_HOME/bin.
3. This case was not discussed before in this thread: When cron runs a job following "at" or "batch" commands, then the job will know all exported variables that were defined in the executing session. This shows that running a script with "at" is not a sufficient test before letting it run through crontab.
I may have not been perfectly correct here. It's best if you read the manuals for "bash", "at", and "cron" to know all about the subject.

Similar Messages

  • Running rman with virtual tape speed too low(500KB/s approx)

    Hey guys, I run rman with mhvtl. but the backup speed is too low(500kB/s).
    the mhvtl debugging prints indicate that the block size is 64kB and the scsi command is running synchronous.
    does any one know how to speed up this backup operation?<smiley image='anim_crazy.gif'/>
    Thanks.
    <b>my system:</b>
    linux kernel 2.6.18
    mhvtl 0.18.17
    oracle10
    obtool 10.2
    <b>rman configure:</b>
    RMAN> show all;
    using target database control file instead of recovery catalog
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
    CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup1/ctl_%F';
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
    CONFIGURE DEVICE TYPE 'SBT_TAPE' BACKUP TYPE TO BACKUPSET PARALLELISM 1;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/backup1/backup_%U';
    CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/backup2/backup_%U';
    CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' MAXOPENFILES 1 PARMS '';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/oracle/oracle/product/10.2.0/db_1/dbs/snapcf_orcl.f'; # default

    skoczo wrote:What services could i disable?
    anything you don't need at startup.
    If you disable systemd service from startup, you will lose some kind of functionality, and you should try to figure out yourself whether you need that functionality of not.
    If you use pulseaudio (I assume you do, since it looks like you're using gnome), you can safely disable alsa-restore.service and alsa-store.service, as pulseaudio will restore audio levels by itself.
    I've masked systemd-vconsole-setup.service myself (disabling isn't enought), since I rarely use virtual console on ttys. I don't have correct keymap on ttys but that's not a big deal for me.
    I don't think you need all those @backlight services either. I've personally masked all but one on my system.
    e4rat will most likely reduce your start up time greatly, although it's a bit of a hassle to set up.
    systemd-readahead might also help, but you should test it for yourself.
    I'm also thinking you could probably optimize your initramfs a bit, as 11s is quite long for loading kernel. At least make sure you have 'autodetect' hook enabled in mkinitcpio.conf.
    Also you can use lz4hc for compressing initramfs (COMPRESSION="lz4" and COMPRESSION_OPTIONS="-9" in mkinitcpio.conf), which should be faster on decompression than other algorithms.
    There are some more tips in arch wiki, if you didn't check it out already

  • How to run applications with options in IDEs like Netbeans

    Hi, I'm new to the Netbeans IDE and I'm wondering how to run applications with options.
    Normally I'd enter the following in the command line:
    java -Djavax.net.ssl.keyStore=mykeystore -Djavax.net.ssl.keyStorePassword="..." TLSServer
    java  -Djavax.net.ssl.trustStore=mytruststore -Djavax.net.ssl.trustStorePassword="..." TLSClient localhostProblem is, I've no idea how to do the same thing in IDE's like Netbeans and I can't any settings to add options like "-Djavax.net.ssl.keyStore=mykeystore" before running the application. Any help will be appreciated.
    Message was edited by:
    Wolfgard

    Right-click the project, click properties, clicl run, and add parameters to VM Options.

  • How to run etherape with ordinary user?

    hi
    when run etherape show this massege:
    No capture device found or insufficient privileges.
    Only file replay will be available.
    EtherApe must be run with administrative privileges (e.g. root) to enable live capture.
    Pcap error: no suitable device found
    i create group etherape with this ownership
    ┌─[root@mymind] - [/etc] - [Sat Feb 04, 12:02]
    └─[$] <> groupadd etherape
    ┌─[root@mymind] - [/etc] - [Sat Feb 04, 12:02]
    └─[$] <> chgrp etherape /usr/bin/etherape
    and add my user to this groups
    ┌─[root@mymind] - [/etc] - [Sat Feb 04, 12:02]
    └─[$] <> usermod -G root,network,http,mysql,dbus,mem,bin,daemon,gdm,audio,video,rfkill,wheel,disk,sys,etherape mostafa
    how to run etherape with ordinary user(without root privilege)?
    Last edited by mostafasedaghat (2012-02-03 20:37:44)

    mostafasedaghat wrote:how to run etherape with ordinary user(without root privilege)?
    You can't. It requires root to set network card attributes, which can only be set with administrative priviledges. But it should be no problem to start it with sudo.

  • How to run FSG with ADI..

    Hi
    Can any one guide me how to run FSG with ADI..?
    regards
    Ahsan

    Pl post details of OS, database and EBS versions. Pl see if MOS Doc 131505.1(The Beauty of FSG in ADI) can help.
    More information will be present in the manuals for your Apps release at http://www.oracle.com/technetwork/documentation/applications-167706.html
    HTH
    Srini

  • Cron job : how to run scripts as cron job

    Hi friend,
    Sorry one very small question ..
    Can someone tell me how can i run scripts as cron job .. on HP UX.
    thanks
    ashish

    Hi Ashish,
    open one telnet session.
    crontab -e
    then give the periodicity day and time
    like below
    05 00 * * 1-6  /usr/local/bin/database_backup.sh
    and now create the script file with the command or script to execute.
    Regards
    Ashok Dalai

  • How to run tasks with priority?

    Hello everyone,
    I want to run tasks with priority, i.e. among several simultaneous running tasks, the task with the higher priority will have more chances to occupy CPU time. I have the following 2 issues dealing with the implementation of such feature.
    - To define each task as a thread or as a method? How to change the priority of each task dynamically when they are running?
    - The priority feature of Java thread does not meet my requirement, since I can not define priority precisely. For example, I want to define that a task with priority A will occupy CPU time 3 times than a task with priority B.
    I am wondering whether I can find similar open source projects or tutorials?
    Thanks in advance,
    George

    how to run autoconfig with out effecting database
    or
    which mode i have to run What do you mean by not affecting the database?
    The database and the database listener should be up and running when you run AutoConfig on the Application/Database tier nodes.
    Please see (Autoconfig FAQ [ID 218089.1]) -- Which files / profile options get changed when I run AutoConfig?
    Thanks,
    Hussein

  • How to run servlet with tomcat

    I have a probrom that how can I run servlet with tomcat?
    I have new a folder classes in webapps\root\WEB-INF\,and put the .class
    programme in it ,but http://localhost:8080/servlet/HelloWorldExample
    can't run ,it give me a error than http:404 not found.
    could you tell me how i can solve the problem.
    Thank u very much.

    Hi,
    Make sure the class is in classpath or in WEB-INF/classes folder and make an entry for servlet tag in web.xml in WEB-INF folder.
    Regards

  • How to Run Rman in silent mode

    when i run rman command to connect with the database then I get the following information message,
    Recovery Manager: Release 10.2.0.1.0 - Production on Wed Mar 26 15:38:45 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: MYDB (DBID=2563653631)
    Can i avoid this message and run it in silent mode ?

    On Windows, I am able to use this command :
    rman < rman_backup_script.rmn > rman_backup.Logwhere the script file rman_backup_script.rmn contains
    connect target /
    backup database plus archivelog;The backup does run. It creates backupsets. It also creates rman_backup.Log which
    contains these output lines :
    Recovery Manager: Release 10.2.0.3.0 - Production on Sat Mar 29 23:11:28 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    RMAN>
    connected to target database: OR10G2DB (DBID=138573118)
    RMAN>
    Starting backup at 29-MAR-08
    current log archivedand do so on.
    No screen output at all.

  • JDB: How to run jdb with sun.* classes.

    I'm attempting to run jdb and step through various classes in sun.*. I run jdb with the sourcepath set to the unzipped contents of the Sun Community License source code that I downloaded (jdb and source code version 1.3.1). However, every time I get to an internal Java API call, the "step" method skips over the call. I can do a "stop in" by specifying the particular internal Java method that I want to stop in and "list" will show me the Java code (which means that it is seeing the Java source). However, typing "step" at this point runs to the end of any of the Java internal methods and back to my own code.
    Is there a way that I can instruct the debugger that I really want to step into the Java internal classes?
    Thanks,
    Kevin Regan
    [email protected]

    Oh yeah, I'm hoping for my first Duke Dollars!
    You must issue an "exclude none" command to jdb
    to be able to trace sun.*
    In fact if you type "exclude" you can see that
    java.*,javax.*,sun.*,com.sun.*
    are excluded from steping by default in jdb(1.4.x)
    -Cameron Elliott
    [email protected]

  • How to Run 3.1 Servers under different account

    I have waded through all the install PDFS, and still do not see this - how can I change the account that runs the different services?
    In R2 you could change the account in the various services from Local System to another account, where is this done now?
    Is this now just done in one place, the SIA, and ALL services run under this one account?
    but in the ADMIN PDF, there's this on page 133
    "In the CCM, select the node on which the servers runs, then update the password or account."
    I see that there is an account here, but I cannot change it, and when I stop the node, then the whole page dies.
    I need to run the CR job server with a single SQL account that has SELECT rights to the data.
    TIA
    Rick

    If I wanted yet another SIA, would I use 8410? Then 9410? What if one of these ports are in use?
    This feels very random, is there a way to methodically select which port to choose?
    And now there's no option (that I can find) to add a Crystal Reports Job Server.
    I have tried to add every server in every Service Category, and there is no Job Server or Crystal Reports Job Server that is obvious.
    Where is this hiding?
    Thanks again
    Rick

  • I need a PPT for user how to run reports with perfomance

    Hai BW guys...
    For our end-users we need one slide that gives them some hints/tips on how they should run the reports for best performance (e.g. extract as few records as possible).
    I know there is some SAP material in relation to this on sdn.sap.com. Could you make me a slide with some hint and tips for fastest report execution for end-users ?
    Plz help me out

    Hi
    Check the following links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/828d9590-0201-0010-95a7-ea8cf8814b94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ec20a990-0201-0010-f291-d1d039975e41
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a249a990-0201-0010-e18e-b2f5ed135497
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bc4fa990-0201-0010-588e-ca4e63050d6d
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b931a890-0201-0010-268d-a7bedf8aa720
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f0aca990-0201-0010-0380-f3aac4127a57
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3541a990-0201-0010-f1ae-b24b72690df7
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2642ab90-0201-0010-9193-d59de66cbab4
    http://searchsap.techtarget.com/searchSAP/downloads/chapter-august.pdf
    http://searchsap.techtarget.com/featuredTopic/0,290042,sid21_gci1121728,00.html?bucket=REF
    It will be useful to prepare your endusers
    Regards
    Ganesh N

  • How to run IE with administrator privileges on limited user account?

    Hello,
    I have a domain user who needs to access a certain web application on the internet using IE and to do so we have to add this website to IE Trusted Sites Zone and also allow Pop-ups, the issue now is that the domain user has a limited account on this PC (Windows
    8.1) and changing these settings is not available. I only have (General-Connections-Programs) taps available under IE Internet Options for this user.

     web application is not working just like before. Did i miss something?  
    Not necessarily.  Some users have a problem with security packages which are "protecting" their registry.  Also, during a beta I discovered that elevation of the Internet Options dialog and trying to do a RIES had resulted in the
    Administrator's Profile being nuked, not the one that was being targeted.  Perhaps you are seeing a symptom from something like that? 
    FWIW I would run ProcMon to find out what is going on.  It would be best if you had two cases, one which worked and one which was the problem case.  Then you could save both traces as .PML files and open them later to compare them in two separate
    ProcMon tasks.  That way you can just filter coarsely to find a significant divergence in the two traces and then refine your analysis from there.  Otherwise, if you don't have a clear hypothesis to test or know exactly what you are looking for you
    could try using the  Category Is Write  filter.  That would show changes which were being done in both the Registry and File system.
    Good luck
    Robert Aldwinckle

  • How to run portal with business intelligence installation?

    i have a system suse linux enterprise edition 7.3. and my hardware is p4 cpu 1 gb memory and 80 gb hdd.
    i installed oracle9ias r2(9.0.2) . my installation is "business intelligence".but my aim is to run oracle9iportal."
    my directory structure is
    /opt/oracle/infrastructure
    /opt/oracle/applicationserver
    /opt/oracle/appserver
    one infrastructure and two applicationserver on one host.
    i read the Oracle9i Application Server Administrator's Guide
    Release 2 (9.0.2)
    i have some questions
    1-You can install multiple application server installations and infrastructures on the same host. Each must have its own Oracle home.
    if so why do i need to change all times "@ORACLE_HOME" path according to others.? is there another solution
    2-which steps do i follow to run portal?
    3-must i run infrastructure structure before starting application server ?
    best regards
    1-

    Hi Dharani,
    Please check this thread.
    How will do the connectivity with SAP and Non Sap System
    Also ensure you avoid cross-posting. This has been mentioned to you multiple times earlier.
    Cheers,
    Sandeep Tudumu

  • How to run report with selected data in form?

    Hi,
    Imagine I have a form with a Data block with this inside :
    Code | Name
    1 | Product1
    2 | Product2
    I want to run a report that will only select these 2 records from the table "product".
    I manage to run a report from forms, but it's a pre-defiined report that will always display the same things. (all the table)
    Maybe it's with the paramlist, would you have an exemple or tutorial about that?
    Edit : When I create the report object in the form, I can give the source Data Block, but how to use in the report Data Model?
    Edited by: Danicela on 24 avr. 2009 10:41

    One way to achieve this is to use a "temporary" ID-table.
    Create a table with just two columns RUN_ID and ID
    Then, in forms before starting the report, create a new RUN_ID, e.g. by using a sequence and then, for every record in your block, create a record with the RUN_ID and the record's PK-column-value, in your case this might look like
    RUN_ID  ID
    4711     1
    4711     2Commit that data in Forms (e.g. with using an autonomous transaction).
    Now, pass the RUN_ID as a parameter to the report, and in reports, restrict your query like
    SELECT ..
      FROM YOURTABLE
    WHERE ID IN (SELECT ID
                    FROM ID_TABLE
                   WHERE RUN_ID=:PARAM_RUN_ID
                 )To be clean, delete the data with the run_id in the AFTER-REPORT-trigger of the report.

Maybe you are looking for

  • New mac user need help!

    my computer is acting funny and i was wondering if there was anyway to restore it like when i first got it

  • No High Quality Setting for HDV 1080i on QT Export?

    hello. a quick question. when exporting a footage from fce as a quicktime movie in hdv 1080i format, why is it that there is no section for quality settings? because it automatically puts "medium" next to the quality button, whereas i'd naturally wou

  • Thank You, Steve

    Dear Steve -- Thank you for offering to give us early IPhone adopters a $100 Apple Store credit. That is very kind of you because you have nothing to apologize for. People buy electronic and other high-end purchases (like cars, furniture, cell phones

  • HT2538 what do I do once it starts a single tone and rest again single tone and rests and repeats ?

    what do I do once it starts a single tone and rest again single tone and rests and repeats ?

  • HV20 Live Capture

    Is there any way to capture HDV live from a canon HV20? I know you could not in Final Cut Express, but I cant get it to work. I set the audio/video settings pane device control preset to non-controlable but it still wont let me capture live without a