您好:
expdp的路径也需要添加到cronjob里?还是expdp的路径必须指定到 path下?
非常感谢[/quote]
in your cronjob file, define PATH variable before any cron job. Say expdp is under /opt/oracle/bin, then this path must be included in the PATH
#my cronjob file
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/oracle/bin
# m h dom mon dow usercommand
.......
PATH is for corn job to look for executable. The default work directory is always user home dir unless aix specifies otherwise.
I would try replacing the parameters in ur script that specify path from relative to absolute
您好:
expdp的路径也需要添加到cronjob里?还是expdp的路径必须指定到 path下?
非常感谢[/quote]
in your cronjob file, define PATH variable before any cron job. Say expdp is under /opt/oracle/bin, then this path must be included in the PATH
#my cronjob file
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/oracle/bin
# m h dom mon dow usercommand
.......[/quote]
I make my cronjob file like this,the directory limsdir is create myself and it's path is in the same path of the back.sh file,
but it's also can't work,are there any error in my file ? thanks a lot
#cronjob file
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/oracle/product/10g/db_1/bin;
(oracle/product/10g/db_1/bin is my oracle path)
10 * * * * /limsdb/exp/frepdatabase/back.sh;
# end file
# sh file
expdp system/lims directory=limsdir dumpfile=frep_dict`date +%Y%m%d`.dmp schemas=frep_dict version=10.2.0;
# end sh file