Hi,
I have written one script which is connecting to the the database and generating one CSV, it is running fine when i ran it manually though it is throwing any warning but CSV is generating and working fine but same script when i have configured in crontab not working and giving error, kindly help.
script contents:
-----------------------------------
Script running successfully as below, running fine
$ sh test.sh
Session altered.
CSV generated
Crontab entry:
Error :
SP2-0310: unable to open file "csvgenerator.sql "
SP2-0042: unknown command "end" - rest of line ignored.
SP2-0103: Nothing in SQL buffer to run.
Note:
This post is the duplicated one and copying the same with new ID share/get knowledge , as my ID was banned yesterday due to the violation of rule.
have read the rules thoroughly and try to follow the same.
I have written one script which is connecting to the the database and generating one CSV, it is running fine when i ran it manually though it is throwing any warning but CSV is generating and working fine but same script when i have configured in crontab not working and giving error, kindly help.
script contents:
Code:
#!/bin/bash
sqlplus -s /nolog << EOF
CONNECT plmc/plmb@whb
@csvgenerator.sql
end;
/
EOF
Script running successfully as below, running fine
$ sh test.sh
Session altered.
CSV generated
Crontab entry:
Code:
06 00 * * * ksh ". ./.profile; /data2/users/cmw/PKG12/test_data.sh" > /tmp/testoutput.txt 2>&1
Error :
SP2-0310: unable to open file "csvgenerator.sql "
SP2-0042: unknown command "end" - rest of line ignored.
SP2-0103: Nothing in SQL buffer to run.
Note:
This post is the duplicated one and copying the same with new ID share/get knowledge , as my ID was banned yesterday due to the violation of rule.
have read the rules thoroughly and try to follow the same.