Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> crontab error exp command, contab giving error on exp command
georgem
post Apr 24 2009, 08:52 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 6
Joined: 24-April 09
Member No.: 14,417



Hi
I am been facing as problem while i do my crontab
Below is a script made in root ie tst.sh
export EXPUSER
export EXPPWD

S=statistics=none
export S

G=grants=y
export G

C=constraints=y
export C

PATH=$PATH:/oracle/bin:$HOME/bin
export PATH

ORACLE_HOME=/oracle
export ORACLE_HOME

ORACLE_SID=orcl
export ORACLE_SID
# delete older dmp files
find /app/oracle/backup/dmpfiles -name '*.dmp*' -ctime +10 -exec rm {} \;
exp $EXPUSER/$EXPPWD file=car`date +"%d_%B_%Y_%H.%M"`.dmp log=carken.log owner=CARKEN $G $C $S;

which works fine when i type in root
./tst.sh

now i call the same file by crontab ie crontab -e
which gives me error exp command not found

could be pleae help me in this issue

Thanks for the support
Best Regards
George
Go to the top of the page
 
+Quote Post
michaelk
post Apr 24 2009, 10:19 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



cron has a very limited environment. I would use complete paths for all commands.
Go to the top of the page
 
+Quote Post
georgem
post Apr 24 2009, 11:07 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 6
Joined: 24-April 09
Member No.: 14,417



Thanks for the reply
could u please what could be the path of this exp syntax in oracle 10g
ie exp ---

Best Regards
George
Go to the top of the page
 
+Quote Post
michaelk
post Apr 24 2009, 07:17 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



Not an Oracle person but try
ORACLE_HOME/bin/exp
Go to the top of the page
 
+Quote Post
georgem
post Apr 25 2009, 07:50 AM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 6
Joined: 24-April 09
Member No.: 14,417



Thanks
Now i get this error while running crontab : could u please help me in this eror

$ORACLE_HOME/bin/exp exp $EXPUSER/$EXPPWD file=car`date +"%d_%B_%Y_%H.%M"`.dmp log=carken.log owner=CARKEN $G $C $S;

LRM-00108: invalid positional parameter value 'system/manager'

EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
Go to the top of the page
 
+Quote Post
michaelk
post Apr 25 2009, 08:46 AM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



I can not tell if the second exp in your posted command is a typo or an actual mistake but it should not be there.
That could be the reason for the error. I am not an Oracle user so my help is limited if there is another error in your statement other then a syntax.

$ORACLE_HOME/bin/exp $EXPUSER/ $EXPPWD file=car`date +"%d_%B_%Y_%H.%M"`.dmp log=carken.log owner=CARKEN $G $C $S;

Go to the top of the page
 
+Quote Post
georgem
post Apr 25 2009, 09:07 AM
Post #7


Whats this Lie-nix Thing?
*

Group: Members
Posts: 6
Joined: 24-April 09
Member No.: 14,417



Thanks Michel
it worked your solution was perfect.
i got to add 2 more solution to this crontab
1st step : Doing exp
2nd step : FTP it to different location
3rd step :Import the exp file

1st step is done through ur help
got to do 2nd and 3rd step
plese let me know if you have any solution to 2nd and 3rd step

Thanks Michel
Best Regards
George
Go to the top of the page
 
+Quote Post
michaelk
post Apr 25 2009, 12:53 PM
Post #8


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



There are many methods for transferring files. What is the operating system of the remote location.
I might suggest scp which is secure and is based on SSH. Now how do want to copy the files i.e. manual or via cron.
Go to the top of the page
 
+Quote Post
georgem
post Apr 25 2009, 11:25 PM
Post #9


Whats this Lie-nix Thing?
*

Group: Members
Posts: 6
Joined: 24-April 09
Member No.: 14,417



Thanks Michel for the reply
Linux version : Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
Transfer of files is from Linux(Main) to Linux(Remote Location)
Transfer of files is from Linux(Main) to Windows Xp(Remote Location)
I could wish the ftp transfer of files to be done automaticaly at a specified time through corntab.

Best Regards
George.
Go to the top of the page
 
+Quote Post
michaelk
post Apr 26 2009, 08:22 AM
Post #10


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



With ssh installed on the windows box and using public/private keys it would be simple to setup a cron job to transfer the files.
Go to the top of the page
 
+Quote Post
georgem
post Apr 26 2009, 08:29 AM
Post #11


Whats this Lie-nix Thing?
*

Group: Members
Posts: 6
Joined: 24-April 09
Member No.: 14,417



I have no idea at all about how to create FTP
Do Linux have any default FTP installed , How to check that
if u dont mind coud u give me some site address or some more points of how to do this FTP setup
Has ssh to be installed on window machine or linux machine
please give me some points about configuring FPT

Thanks and Best Regards
George
Go to the top of the page
 
+Quote Post
michaelk
post Apr 26 2009, 11:31 AM
Post #12


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



Regular FTP is not secure which is why you want to use SSL. http://filezilla-project.org/
I would not know if your systems have a server installed or if it is running.
Look at the command chkconfig --list

You you want to transfer files from linux to windows then you need to install a server.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th November 2017 - 04:23 AM