Can someone tell me how to prevent this?
stty: standard input: Invalid argument
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
I am running a cron job to run an SQl Query on an Oracle DB.
I can do a ./run_job.sh with no problem but sometimes Oracle returns a connection error when I use cron.
#!/bin/sh
source /home/reports/.bash_profile
source /home/reports/.bashrc
sqlplus login/password@instance
0 8,12,14,18 * * 1-5 /home/reports/cron/run_job.sh