Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

multiple database connections via cron

843853Sep 10 2001 — edited Sep 11 2001
i have a java command line application which runs on a unix box. in this app, i have to connect to 2 different oracle databases.

initially, i attempted connecting to these databases with the oracle thin driver, but it would only connect to one of the databases. so...i decided to use the oracle oci8 driver...and it connected to the 2 databases WONDERFULLY...when i ran the app manually :]

however, i need to be able to submit this application in a cron job to run every 10 minutes. with the thin driver (connecting to only one database), the app ran in the cron. with the oci8 driver, cron doesn't know where to find the tnsnames.ora file, and therefore will not connect to either database.

i have tried setting environment variables in the script (executed by the cron) that calls the java program, to see if that would remedy the issue, but so far, no luck. i have set the ORACLE_HOME var & the ORACLE_BASE var. i have checked my environment when i have run the program manually to see what other variables may have the vital information, but the only ones are the ORACLE_? variables...and they don't really even specify the correct location of the tnsnames.ora file.

has anyone else encountered or attempted this??? any suggestions?

thanks,
red
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2001
Added on Sep 10 2001
1 comment
432 views