The problem is from root i run the script which will define all the env. var. all the needed things and the adabas utility for backup adabck will do its thing and dump the db to a file..all well but...
Why the hell is it giving an error from the cron.. it is loading all the same var. it is running the same script which loads all the same env. var. ... im not sure..
here is the moust simplified script i have used it was larger and more complex but when i started trouble shooting i eliminated all the parts and striped it down to the basic pars needed to run...
this is the backup script that fails... as you will c all the env. var.(sag.profile , assign.bsh) are loaded.. and they do work when i run it man.
Expand|Select|Wrap|Line Numbers
- #!/bin/sh
- db=DB2
- . /usr/local/bin/sag.profile
- db=DB2
- BCK001=/backup_disk2/db2.todisk
- export BCK001
- . /SAG/ada/db002/assign.bsh
- adabck DB=2 DUMP=* NEW_PLOG 2>&1
Your "cron" job on sun--
/usr/games/mydb2
produced the following output:
stty: : No such device or address
[Setting environment for Adabas Client]
[done]
[Setting environment for Adabas]
[done]
[Setting environment for Natural]
[done]
[Setting environment for Natural Security]
[done]
Reading Merlin Environment
/usr/games/mydb2: test: unknown operator a
ok i get the no stty... cant that be an issue can i redirect or what?
where did he get test? why don't i ever get this error when i run it manually?
i can c only ... stty is different... the env. i think is the same..(when manually running and from cron)..
This is the normal output when i run the script manually:
[Setting environment for Adabas Client]
[done]
[Setting environment for Adabas]
[done]
[Setting environment for Natural]
[done]
[Setting environment for Natural Security]
[done]
Reading Merlin Environment
%ADABCK-I-STARTED, 07-MAR-2010 12:36:42, Version 6.1.8.01 (Solaris 64Bit)
%ADABCK-I-DBON, database 2 accessed online
%ADABCK-I-BKSAVE, saving container ASSO1
........and so on...