RMAN script does not work as a cron job, but works when explicitly executed

Oracle 10 g 2 10.2.0.1, Oracle Enterprise Linux 4 U7.

I've added a task to crontab of the oracle user who looks like the following:
#ORACLE_HOME,ORACLE_SID and PATH are set in the user's profie
TAG=`date|awk '{print $1"_"$2"_"$3}'| tr [:lower:] [:upper:]`

echo "backup started on`date` "> /home/oracle/rman.log

rman target / LOG='/home/oracle/rman_run.log' << EOF

run{

sql 'aler system switch logfile';
backup full database tag='$TAG' include current controlfile;
delete noprompt obsolete;

}
exit;
EOF

echo "rman finished, returned $? " >> /home/oracle/rman.log
echo "Backup ended on `date` " >> /home/oracle/rman.log
the tracks work as expected but the rman command never works the inside of cron, it always returns code 1, but if I call the script itself from the command line
It works smoothly and the backup is performed.

what I am doing wrong?

what I am doing wrong?

no no no ORACLE_HOME and ORACLE_SID is defined in script
The script does not source in the script of environmental requirements

env | Tri o /tmp/capture.env

above indicates how deficient the script environment cron is really

Tags: Database

Similar Questions

  • Tiara startup script does not work when running file associated with

    Hello

    I have a startup script that works correctly with tiara itself, however when I open a file associated with tiara (tdms files) the startup script does not work.  Is it possible to ensure that the script runs without worrying?  Thanks for the help!

    Bala

    Hi Bala,

    Depending on your use case, I suggest you call the next VI, which comes with LabVIEW, after your purchase VI is the creation of the data file.  Just pass the data file path in the upper part of entry and your path to the VBScript file in less than entry.

    "C:\Program Files (x 86) \National Instruments\LabVIEW 2013\vi.lib\ExportToExcel\DIAdem report Assistant Start CSC.vi '.

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Why my scripts does not work when scheduled in the calendar?

    Hello

    I created scripts to start and stop onedrive using the "Tell" command

    When I plan their schedule they fail to run.  They were created as programs and work if I launch them manually.

    Is there something that I am missing?  Or is there a better way?

    PS: Scripts are the OneDrive to run after hours to prevent it completely hogging my bandwidth to broadband.

    If there is a better way to control the use of bandwidth for OneDrive I would be grateful.

    See you soon

    Memn

    A workflow schedule alarm will not work unless it is attached to a local calendar ("on my Mac"), instead of a network such as iCloud calendar.

  • Point culminating script does not work correctly

    I try to get the yellow filled rectangle to become visible behind the digital field when the numeric field is greater than "1". Can anyone help to see why my script does not work?

    https://Acrobat.com/#d=MJObRvA * l9tbFmrlHcMHUA

    Thank you

    -Don

    Hi Don,

    Your code does not work because because it is not actually executed. It's because of put you the code on the text box itself output event and this would require the user to move to that field and then leave the field and then run the code.

    I would recommend you change you form to add this code at the end of the code that runs your "addAttachment" button and then the form works as I expect.

    If (NumberOfAttachments.rawValue > 1) {}

    RectangleYellow.presence = "visible";

    }

    Hope this helps

    Malcolm

  • Describe in SQL script does not work as you wish

    Hello

    Could you please help me determine why this script does not work.
    He said that the date is not set.

    Thanks in advance


    set p_day_sh = & data_sh
    set p_rowid_sh = & rowid_sh
    declare
    date of p_day_sh;
    p_rowid_sh varchar2 (18);
    Start

    If & p_day_sh is not null then
    trains t update
    Set t.offdate = to_date ('& p_day_sh ',' DD-MM-YYYY HH24:MI:SS')
    where t.rowid = '& p_rowid_sh';
    commit;
    end if;
    end;

    Hello

    In a command SET, if the string to the right of the = sign contains spaces, then it must be in quotes: in the case otherwise, only the first group of characters, white space will be affected.
    For example:

    define p_day_sh = &data_sh
    

    If & data_sh has this value:

    11-06-2009 06:25:09
    

    then the DEFINE command is

    define p_day_sh = 11-06-2009 06:25:09
    

    and & p_day_sh Gets the value of the part to the workspace:

    11-06-2009
    

    Either eliminate the space, Alex has proposed, or place the chain on the right side of the sign = in double - quote:

    define p_day_sh = "&data_sh"
    

    The double quotes will not change the meaning if & data_sh contains no white space.

  • I have added a hyperlink which is a file video .mp4 but it does not work when I generate the document.

    I have added a hyperlink which is a file video .mp4 but it does not work when I generate the document.

    Hello

    Do you use the WebHelp for the CHM converter script? If so, this screenshot may seem reasonable. If this is not the case, this isn't out CHM.

  • slide show does not work when published

    I published my first site of Muse and it's great & works perfectly, except the custom slide show a shot.

    I downloaded, and then reuploaded my files of script and it still does not work. Its hosted on a non - BC server.

    Any ideas?

    Please refer to the suggestions in the following topic:

    My site does not work when I download on my Web host, but it's good in the preview. How can I fix it?

    http://forums.Adobe.com/message/4300529#4300529

    If you are sure that your files are uploaded properly and in the correct locations, it is likely a problem of permissions that relate to your scripts directory/files (suggestion #2).

  • Form does not work when it s poses in a movieclip


    I've isolated the problem and it s seems to be concentrated in the path "mcForm.skickat eq 'Yes' below: (the serverside script is done in Php).

    I t looks like that the form does not work when it s respondent in a movie clip called mcForm with a button send simply called 'send '.
    I have to place the form in a movieclip, because the shape is a good interpolation made by Laco interpolation method.

    Everything works fine if ["BOLD"] I have no place [/ bold] form in a movieclip.

    Here´s a part of the actionscript in the script main navigation.swf:

    If (mcForm.skickat eq 'Yes') {}
    gotoAndStop ("labelFinished");
    }

    Here´s actionscript code on the button 'Send' in mcForm in navigation.swf:
    on (release) {}
    loadVariables (" http://www.homesit.se/phpmail.php", "", "GET");
    _parent. Play (); This statement is not the problem.
    }

    The chronology in navigations.swf never reaches the label "finished."

    It works fine if I do not place shape to a movieclip in navigation.swf timeline:

    If (mcForm.skickat eq 'Yes') {//this path is the problem
    gotoAndStop ("labelFinished");
    }

    Here´s in php serverscript:
    (I have no problem here)

    <?
    $headline = "mail from your Homesite.
    $text = "$name sent email you from your homesite.
    It wrote:

    $message
    ";
    mail ($mymail, $headline, $text,
    "To: $email. (' \nReply-to:".$email);
    ECHO ("Send = Yes");
    ? >

    What could possible be wrong

    I appreciate every response.


    The root of the problem (look at the code you posted), it's that there is no event that determines what should happen when your data comes back from PHP. When you use loadvariables, you need an event for mcForm, like our:

    {mcForm.onData = function ()}
    do something
    }

    The problem according to what I see is that on your main timeline code checks the value of mcForm.skickat, but you do not seem to define this variable anywhere. The php script returns a variable named 'send', but I do not see anywhere skickat. If it is not set, its value will be always "not defined".

    To make things more efficient, you should really use loadVars and a reponsed instead of loadVariables Manager. When you use loadVariables, all variables in the clip are sent to your php script that transfer really just data loss. Using loadVars, you specify what vars to send, making the process more efficient. See the docs... everything is in there (with examples).

    BTW... This is the Flash Media Server forum. In the future, you might want to ask questions like this in the general flash or actionscript forum, you will get more answers (more people read on these forums)

  • As I installed Sierra, my Trusteer account to my Bank quit and does not work when I reinstall. Neither will Quickbooks!

    As I installed Sierra, my Trusteer account to my Bank quit and does not work when I reinstall. Neither will Quickbooks! Help!

    Trusteer (report) has caused a lot of problems Mac users such noted search Apple Support communities here.

  • Satellite A660 - Webcam does not work when using Skype

    I recently bought a Satellite A660-15J. I am running Windows 7 64 bit.

    I have the latest version of Skype (5.3.0.111).

    The integrated Webcam does not work when you run Skype. If I run the Toshiba Web Camera Application the webcam works fine. However, when I test it in Skype, I get a message saying "cannot start video. Try quitting other programs that use the webcam '.

    However, as far as I can tell there no other programs available. I have tried Skype with the Web Camera Application clised & open. I also confirmed that I do run the latest version of the program.

    One of the main reasons we have this laptop is to use Skype video... Help, please.

    Disable webcam application start-up and exit this application before you start Skype.

    I used Skype many different models of laptops, including friends A660 and it worked correctly.

    When you open Skype video settings is listed as default camera USB webcam?

  • The slide show feature does not work when I used my Apple TV new 4th gen. I have all the minimum requirements for Macbook and Macbook OSX the Airport express. The slide show starts and stops after that 7 photos are displayed on the TV. If I change the

    The slide show feature does not work when I used my Macbook with new Apple TV 4th gen. The slide show stops after that display 7 photos and display to select the options for the slide show is displayed on the screen. The selected interval was 5 seconds. If the interval is spent in 3 seconds the slide show would work for a time and then to display random images. Has worked with Apple on this issue Support Mike and he managed to reproduce the problem. Since I'm in the return period of 14 days for this product, I returned it to the Apple store

    Welcome to the Apple community.

    After returning, I'm not really clear on what your question.

  • Event does not work when I have my variable of variable mutual FUND!

    Hello

    I programmed a labview vi to add a field to a list view when a Boolean variable value is changed. I used a case Event (value change event) structure to determine if a variable value is changed, it works when I force the Boolean control with my mouse click, but it does not work when the value of the variable is modified by the mutual FUND. What should I use instead?

    Value change events are based on the interaction of the user (or the same ejection programmatically based on the value property node (signaling).)  It is not based on a control change via a regular, variable property node local, terminal or any other connecito0n programmatic or binding.

    You must simply query the variable and determine when it changes.  In this case, you can then use the node value property (signs) in the case of event fire.

  • Microsoft Pinball Arcade, everything works except the right flipper does not work when you run the game. __Keyboard is very good

    Microsoft Pinball Arcade, everything works except the right flipper does not work when you run the game.
    Keyboard is fine.  Is this a compatibility issue?

    ---------------

  • Sound does not work when it is connected to the TV with HDMI

    I have a HP Pavilion Notebook PC, DV7 - 6813EV, running windows 7 Home Premium 64-bit SP1. My problem is that I have no sound when connected to my TV HDMI connection and press. Please could someone help me? Thanks in advance

    Hello gematz,

    The sound does not work when it is connected to the TV via HDMI.

    Go to start.

    Type sound.

    Click sound

    On the playback tab, click with the right button on the HDMI interface, and then select set as default device.

    If you do not see the HDMI, right click and select devices see off, then set as default.

    I would like to know how everything goes.

  • Here's a strange. I have a HTML page with this time a wmv video. It works perfectly from a USB stick or SD card, but does not work when they are copied to the hard drive

    I have an HTML page created with web expression 4. It contains only a wmv video. It works perfectly when it is called from a USB stick or SD card, but does not work when they are copied to the hard drive. The results are the same with IE and Firefox. It don't make no difference if I use Media Player V9 or V11. He has no control on the page Media Player. Video and html files are in the same directory. Here is the code snippet:

    LIFT, DRAG, THRUST and GRAVITY










    If I run it on a machine with Win 7 there is no problem.

    Richard Grosser

    Hi Richard c. Grosser,.

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Microsoft Expression forums.

    http://social.expression.Microsoft.com/forums/en-us/categories

Maybe you are looking for