TNS_ADMIN tells sqlplus where to find the tnsnames.ora file.
If you are using sqlplus from crontab, then a common cause of difficulty is:
- Wrong way
- ORACLE_SID or other Oracle connection information set incorrectly
- Run / login script that runs when you log in, which interferes with your cron
- Some script that you run from the command line when you log in to a system that sets up an Oracle environment that is not running in your crontab.
Check out these things and other elements related to the environment. I always need to go through several passes to get crontab and Oracle to work together.
source share