Datapump backup when scheduled through crontab doesnt work!

Hi Masters,
I had a script for taking export backup. I modified to take datapump backup instead of the conventinal export. And since then the cron job has stopped running.
The oriiginal script was:
#!/bin/bash
cd /opt/ora10gr2
. .profile
cd /backup/oracle10g/EBACKUP/scripts/daily_run/
kdat=`date +%d`
kmon=`date +%b`
while read i
do
touch /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
echo 'start time ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
date >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
exp system/manager@$i file='/backup/oracle10g/EBACKUP/db/daily_backup/dumps/'$i\_$kdat\_$kmon'.dmp' log=/backup/oracle10g/EBACKUP/db/daily_backup/logs/$i\_$kdat\_$kmon'.log' direct=y owner=sysadm statistics=none
echo 'backup successfully done for ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
echo 'end time ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
compress '/backup/oracle10g/EBACKUP/db/daily_backup/dumps/'$i\_$kdat\_$kmon'.dmp'
date >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
done < /backup/oracle10g/EBACKUP/scripts/daily_run/list_DB
The names of the databases were kept in a file list_DB.
After modification, the script looked like:
#!/bin/ksh
cd /opt/ora10gr2
. .profile
cd /backup/oracle10g/EBACKUP/scripts/daily_run/
kdat=`date +%d`
kmon=`date +%b`
while read i
do
touch /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
echo 'start time ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
date >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
expdp system/manager@$i DUMPFILE=$i\_$kdat\_$kmon'.dmp' LOGFILE=$i\_$kdat\_$kmon'.log' SCHEMAS=sysadm DIRECTORY=dumps JOB_NAME=daily_backup PARALLEL=4
echo 'backup successfully done for ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
echo 'end time ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
gzip '/backup/oracle10g/EBACKUP/db/daily_backup/'$i\_$kdat\_$kmon'.dmp'
date >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
done < /backup/oracle10g/EBACKUP/scripts/daily_run/list_DB
This modified scripts run when executed stand alone from command line. But doesnt run when executed through crontab.
Any help will be highly appreciated.
Thanks,
Anoop

Hi,
Two things I want to tell U.
1. Re-direct the CRON output to log file & check the logfile for ERRORS.
example :-
43 17 * * 1-4 /backup/oracle10g/EBACKUP/scripts/daily_run/exp_bkpdb_temp1.sh > /backup/oracle10g/EBACKUP/scripts/daily_run/cron_expdb.log
2. In command-line U have all the necessary PATH's set, hence it got executed. But when u execute the same script through CRON u have to manually set the PATH's in ur script.
Do the below in command line:-
echo $PATH
add the output of above command in ur script as below & try.
#!/bin/ksh
export PATH=<output here....>
- Elango R

Similar Messages

  • Backup scheduled through DB13 not working

    Hello,
    We are trying to schedule backup through DB13.But it got failed due to below error.Backup scheduled through DB13 was working fine last week.
    Job started
    Step 001 started (program RSDBAJOB, variant &0000000000174, user ID KHJS199)
    Execute logical command BRARCHIVE On host ppd-ora-ga2
    Parameters:-u / -jid LOG__20100927040000 -c force -p initGA2.sap -sd
    External communication error at program start (see system log)
    SAPXPG_START_XPG_LONG: sy-subrc ne 0
    destination = SAPXPG_DBDEST_PPD-ORA-GA2
    SXPG_STEP_XPG_START: execute_sapxpg: rc = 1.003
    SXPG_STEP_COMMAND_START: SXPG_STEP_XPG_START returned: 1.003
    SXPG_COMMAND_EXECUTE(LONG)
    <timestamp> = 20101014040033
    COMMANDNAME = BRARCHIVE
    ADDITIONAL_PARAMETERS =
    -u / -jid LOG__20100927040000 -c force -p initGA2.
    sap -sd
    LONG_PARAMS
    OPERATINGSYSTEM = ANYOS
    TARGETSYSTEM = ppd-ora-ga2
    DESTINATION = SAPXPG_DBDEST_PPD-ORA-GA2
    SY-SUBRC = 1003
    SXPG_COMMAND_EXECUTE failed for BRARCHIVE - Reason: program_start_error: For More Information, See SYS
    Job cancelled after system exception ERROR_MESSAGE
    We checked the RFC connection SAPXPG_DBDEST_PPD-ORA-GA2 and it is not working.
    For target host and gateway host,we have maintained their corresponding virtual host.
    Gateway is already installed on the server.
    Could you please help me out on this.
    Thanks,
    Gopi L

    Hello,
    Just to add some more information.
    We have 3 servers, X(Database + CI),Y(Dialog instance),Z(Dialog Instance).
    Server  X is the primary node and Y is the failover node.
    Gateway is already installed on Database server and I can verify it by giving ps -aef | grep gwrd.
    Thanks,
    Gopi L

  • How do u reboot the computer when the control pad doesnt work

    how do u reboot the macbook pro when the control pad doesnt work??? and does anyone know how to get the control pad to work i cant move the cursor??

    By "control pad" do you mean "trackpad?" If the trackpad has stopped working then press the Power button and hold it down for 5-10 seconds. This will shutdown the computer. Insert the installer disc then restart the computer. After the chime press and hold down the "C" key until the computer starts up and you see the spinning gear. Then:
    Repair the Hard Drive and Permissions
    After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.

  • My facetime doesnt work. If I call somone they see I call but when they accept it doesnt work and when they call me the green camera light turns on but no sound or pop up of the video chat screen appears, please help! Macbook pro user. MacBook Pro, OS X M

    My facetime doesnt work. If I call somone they see I call but when they accept it doesnt work and when they call me the green camera light turns on but no sound or pop up of the video chat screen appears, please help! Macbook pro user.
    MacBook Pro, OS X Mountain Lion

    I just wanted to follow this up by saying that you were entirely correct in your diagnosis of the situation.  My computer did have the faulty part you linked to.  I brought my laptop in and specifically told them to run that test, had it fail and then argued with the person at the genius bar and the manager.  Eventually they offered to have it sent out and have everything replaced for free of charge.  They did so mainly because I had complained about graphical issues almost every other time I had come in with problems and no one ran the test.  They should have caught this problem during my warranty, but they didn't, even though I mentioned the problem.
    Anyhow, after having the part replaced, I haven't had my computer crash a single time since, or had many of the issues mentioned above.  I've never had this experience before.  Even brand new, I got occasional crashes.  Hopefully this new trend continues.
    I do find that web browsing is still incredibly slow.  Web browsers just chug along at a slow pace, even though I have great internet speed.  Maybe I'll try just deleting my web browsers and reinstalling them...
    Anyhow, thank you for your help and knowledge Clinton.

  • Error code 1,iphone backup and restore,now phone doesnt work at all and apple not in any hurry to solve issue,only had phone 4 mths,wish id stuck with iphone3 and never upgraded

    what a nightmare,no phone for 3 days and no sign of any positive help from apple.done backup and restore as wifi on phone stopped working,error code 1 and now phone doesnt work at all,apple say other people having problem but havent heard of anyone else,really disappointed in way apple are keeping me hanging on,phone is only 4 mths old

    My iphone is only 6 months old and I am experiencing the same problems. I have already had to have the phone swapped once with a phone that has a blown speaker. (The apple store is 2.5hours away so I havent been able to go back to replace the replacement) Since I did the ios 5 update, my phone says NO SERVICE and drops calls. It was speratic but last night, same ERROR message as you. As you know, if forces you to restore which caused me to loose valuable information and documents. insert loud profanity here _________. lol

  • Is there warranty for when the sleep button doesnt work anymore?

    Am i able to get a new phone if my sleep button doesnt work anymore?

    If you still have the warranty, Apple will repair your phone.

  • What if my ipod touch says disable please connect to itunes but when i do it doesnt work?

    Well some one changed my ipod password and now its completely disabled.. everytime i put it to itunes like its says.. its doesnt work -___- please helpp!!

    Connect iPod touch into computer. Put the device in DFU Mode.
    Restore iPod touch in iTunes after put in DFU Mode.

  • Error in backup while scheduling through db13

    Hi all,
    Tape initialization is ok but when backup is starting then after few minutes it is giving the following error :
                                                                                    Detail log:                    bdwfsish.anp                                                                               
    BR051I BRBACKUP 6.20 (128)                                                                    
    BR055I Start of database backup: bdwfsish.anp 2007-09-25 23.55.31                             
    BR280I Time stamp 2007-09-25 23.55.35                                                         
    BR301E SQL error -1587 at location BrCtlCopy-1                                                
    ORA-01587: error during controlfile backup file copy                                          
    ORA-27091: skgfqio: unable to queue I/O                                                       
    ORA-27072: skgfdisp: I/O error                                                                
    SVR4 Error: 81: File descriptor in bad state                                                  
    Additional information: 1027                                                                  
    BR320E Copying of control file to /oracle/PRD/sapbackup/cntrlPRD.dbf failed                   
    BR314E Collection of information on database files failed                                     
    BR056I End of database backup: bdwfsish.anp 2007-09-25 23.55.35                               
    BR280I Time stamp 2007-09-25 23.55.35                                                         
    BR054I BRBACKUP terminated with errors                                                                               
    Please help me.
    Regards,
    Jitendra

    Hi Jitendra,
    Pls Import the SAPDBA role ( sapdba_role.sql) for this refer note  Note 134592.
    Hope this is useful
    Regards
    Umesh

  • Does anyone have any advice on how to fix a 6th generation classic, when the manual reset doesnt work either?

    Hey,
    Ive bought and ipod , without reading the description, silly me and it says the ipod wont turn on at all......ive tried the manual reset ( menu and middle button) still not working at all.
    I wondered if anyone had any advice, whether theres another way of making it work, or whether im going to have to go into an aple store and see what they can do?
    Thanks

    If you followed instructions from the apple support site: http://www.apple.com/support/ipod/five_rs/classic/
    and you have not been successful, it will be harder. You can always google your problem and watch the different links and youtube sessions explaining how to do it. If your iPod is dead, meaning nothing shows up on the screen when you attempt to revive it, then it could mean the battery is totally dead or other hardware issues that prevent a power up. Don't try to spend too mcuh money in reviving your classic outisde of the Apple route, you might just end up spending that amount plus having to go to the Apple store anyway. I would try to see if it can be revived on the cheap by just prowling the web and trying the different solutions, but please don't open up your iPod, the classic is notorious for being difficult to open without damaging your chrome cover or even the front faceplate. if you can't do anything and you really want to revive it, go to the store and weight your options cost wise. If your final solution is to say goodbye to the iPod and want to get a new one, Amazon offers the same ones for less and the warranty is exactly the same plus you'll have 30 days to return it instead of the standard 14 from the Apple store (no tax too), you'll still have to pay for shipping but at least you'll have longer to consider keeping it. If you want to get warranties longer than Apple and for cheaper, use SquareTrade, they are very afforable and they will restore your iPod to like new and will cover for shipping it both ways (check them out first to see if they still do).
    Hope htis will help

  • Reminder app - remind me when i get home doesnt work?

    In the commercial for iPhone 4S, it shows the new app “reminder” in use. Where you can make it remind you when you ie. come home. I have a 3Gs, however I don’t seem to be able to get this function to work. (And yes, I have activated it in “settings"). Is this just a 4S function? or??

    I am not sure if this works on the 3gs, but it certainly does on the 4 so I don't see why it shouldn't.
    Just go into Reminders, setup a new one and click Remind Me. You should then get the option to choose where you are reminded.. for example, remind me when I arrive home or remind me when I leave work.
    It may be worth checking you have a home and work address configured if required.

  • How do you make Firefox the default browser when the normal way doesnt work?

    Im trying completely from chrome after a friend showed my how much firefox has got its act together. However i cant for the life of me set it as the default browser. I have tried the "make firefox the default browser" button in firefox, which simply opens the windows default programs panel. Whenever i try to use the panel it simply sets the http protocol to nightly which isnt even installed!( http://puu.sh/2vJHM ) I think a possible fix would be to manually change the registry, but i wouldnt know where to start.

    Did you check the box on ''Options > Advanced > General >[X] "Always check to see if Firefox is the default browser on startup"?
    Have you restarted Firefox and if so, or when you do so, what does that section on the advanced Firefox options show?
    Have you tried restarting your system after setting the default browser using the second suggestion and, after restart, check the setting per the second suggestion to see if that setting is holding?
    Updating your Plugins would have no affect on the default browser question. It was something that you needed to do to avoid security issues online by using an out of date version of Java. Java is not involved in the default browser issue. That is why I separated it from the first part of the reply with a line and began with the word "Other".

  • How can i restore my iphone when my home button doesnt work

    My Iphone freezes on the enter passcode, and then decides to go of and comes back on. The only thing is, is that i cant restore my iphone since my home button isnt working.

    Did you try to connect to iTunes on your computer to restore?
    Use iTunes to restore your iOS device to factory settings - Apple Support

  • People Cannot Hear Me When I make Calls on iPhone 4, Bought a new iPhone 4, uploaded all of my own information from the backup, and it still doesnt work, help!

    I went in to apple, they couldnt figure it out, I am on AT&T so I was figuring on going into their store today and seeing if its something with the network, if not I am going back to apple, but this is literally a brand new phone i bought yesterday, not refurbished or anything, brand new, does anyone know why this isnt working? Everything else works fine, the mics both work, its just when I make calls or someone calls me the mic doesnt work.

    When you see the same issue on more than one hardware device, it means that the problem is likely to exist outside of the hardware.  Two things to investigate would be the software/firmware on the backup and issues with the cellular network.  It's probably safe to rule out the cellular network as well.
    First, make sure that you have imported copies of all the information (pictures, videos, documents) on the device.  Do this thorough itunes, and the applications (photographic and document processing) on your computer.  Perform a firmware update then restore the device as new.  If the problem persists, then you may actually have the worst luck and discovered two devices with an identical issue.
    Read each of the steps before initiating the DFU.
    !.  Connect the iPhone to any computer running a fully updated version of iTunes.
    2. Press and hold both "home" and "sleep/wake" buttons
    3. After eight seconds let go of only the sleep/wake button.
    4. Keep holding the home button until you see a popup mesage in iTunes.
    5. Read all all the popups, then use iTunes to update the iPhone's software.
    If the popup fails to show, repeat steps 2 through 4

  • Scheduling a backup by running a script through crontab

    hello
    i want to take a backup by rman everyday at a specified time..it's just that i want to create a script and schedule a backup through crontab, so how do i do that?
    thanks for the help in advance..

    838579 wrote:
    hello
    i want to take a backup by rman everyday at a specified time..it's just that i want to create a script and schedule a backup through crontab, so how do i do that?
    thanks for the help in advance..What do you man "how do I do that"? Do you not know how to write a shell script? Do you not know how to use cron? What, exactly, do you need help with?

  • My iphone 4 wont download apps, says my storage is full, but when i delete photos/apps, its still says my storage is full. whenever i try to backup my phone, it doesnt work. anything i can do?

    my iphone 4 wont download apps, says my storage is full, but when i delete photos/apps, its still says my storage is full. whenever i try to backup my phone, it doesnt work. anything i can do?

    Go to Settings - General - Usage and see which apps are taking up a lot of space.
    In my experience, if you haven't cleaned out your Messages that is where a lot of space is consumed.

Maybe you are looking for

  • Dflt report in 6i and 10g

    Hi I am trying to get a tillslip to print correctly after converting from reports 6i to 10g. The problem i think is that the outputfile generated in the 6i version is diffrent from the output file in 10g. The 10g version looks similar to postscript w

  • No data in source system

    Hi at all, I extrakted initial data from source system and get a      warning "No data in source system". I checked the system and it is ok. Plz help me

  • How can I save multiple data coming in from my data string

    I am a newbie at labview. I have a scale connected to my RS 232 and made a VI to display the changing scale. I am trying to save the multiple changes as my weight varies but have been only able to save the last value. Is there a simple way to save al

  • HD video from iMovie looks awful when converted in iDVD

    Shot some 16:9 HD video and made a project in iMovie, then "shared" it to iDVD to create a standard-definition DVD. Unfortunately, the resulting DVD looks awful - far worse than a commercial standard-def DVD.  The image is very pixelated in a manner

  • Delete Query takes more time

    Hi, My database in 10g(10.2.0.4), I fire delete query which deletes 5 Lacs records from the table but it is taking more time to delete. My table and indexes on that table in Nologging mode, Database in Archive Log Mode. Can you please help to minize