delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Date: | Thu, 16 Jan 2003 20:05:53 +0530 |
From: | Chiranth <Chiranth DOT m AT net-kraft DOT com> |
X-X-Sender: | Chiranth DOT m AT nkpl-252 |
To: | James Schnedar <jims AT nmmcc DOT com> |
cc: | cygwin AT cygwin DOT com |
Subject: | Re: cron, Oracle, and sqlplus |
In-Reply-To: | <3E1E117E.F8C2E56E@nmmcc.com> |
Message-ID: | <Pine.CYG.4.44.0301162001010.1816-100000@nkpl-252> |
X-System: | Cygwin on W2K |
MIME-Version: | 1.0 |
On Jan 9, James Schnedar wrote.... >I am experiencing a problem with running Oracle sqlplus within a shell >script using cron. The shell script runs correctly from the command >line, but once I add it to cron, the shell script will execute up until >the sqlplus command. Therefore, cron is working correctly as well, but >the addition of the sqlplus command causes it to hang. The sqlplus >session has started, but appears hung. > sqlplus needs some environment variables to be set, like ORACLE_HOME ( I am not sure what others). Andd cron does not set these variables while starting your process. Hence sqlplus hangs. Solution: Use the line #!/bin/bash as the first line of your shell script and define the required environment variables in your .bashrc file. Ig you are using the Korn shell, ensure that these variables are set in your .profile and use #!/bin/ksh as the first line of your shell script. It will ensure that the correct shell interpreter is invoked and the environment variables read appropriately. -- Chiranth M.C. Netkraft Pvt Ltd -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |