- 论坛徽章:
- 0
|
我使用crontab -e db2inst1命令生成了一个自动调度任务,相应的/var/spool/cron/croantabs/db2inst1的内容如下:
15 09 * * 0,1,2,3,4,5,6 /home/db2inst1/back.db2
back.db2(已经变成可执行文件,且以db2inst1身份运行成功)的内容如下:
db2 terminate|db2 force application all|db2 backup db datanode to /home/db2inst1/databack
调度后出现错误,下面是mail中的内容:
From daemon Sat Jun 28 09:16:00 2003
Received: (from daemon@localhost) by syit_pri (AIX5.1/8.11.0/8.11.0) id h5S1G0N12718 for db2inst1; Sat, 28 Jun 2003 09:16:00 +0800
Date: Sat, 28 Jun 2003 09:16:00 +0800
From: daemon
Message-Id: <200306280116.h5S1G0N12718@syit_pri>;
To: db2inst1
Status: RO
/home/db2inst1/back.db2: db2: not found
/home/db2inst1/back.db2: db2: not found
/home/db2inst1/back.db2: db2: not found
*************************************************
Cron: The previous message is the standard output
and standard error of one of your cron commands.
应该是运行环境的问题,难道不是以db2inst1的身份调度改任务的吗?
另外,想请教一下,可以使root运行db2吗?如果能,怎么做?
谢过了,先。 |
|