![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell script query | max29583 | UNIX for Dummies Questions & Answers | 4 | 08-07-2008 06:09 AM |
| C Shell Script query | bpupdown | Shell Programming and Scripting | 1 | 05-13-2008 07:38 PM |
| executing a SQL query in shell script | lijju.mathew | Shell Programming and Scripting | 1 | 05-17-2007 11:29 AM |
| Query on a shell script logic | tipsy | Shell Programming and Scripting | 1 | 06-29-2006 05:38 PM |
| Connecting DB in the Shell Script to do SQL Query | mehuldoshi | UNIX for Advanced & Expert Users | 3 | 03-29-2003 12:47 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Patch query using shell script error
Hi All,
OS:AIX 5.3 I am using the following shell script for patch query but not getting the prompt to enter values for '&From_date' and '&TO_Date' in the patch query when called from the shell script as below: patch_query.sh ============ #!/usr/bin/ksh export DBALIST="xyz@xyz.com" export USER=apps export PWD=****** export SID=XYZ sqlplus "$USER/$PWD" <<! @patch_query.sql exit ! if [ `cat patch_query.alert|wc -l` -gt 0 ] then cat patch_query.alert -l patch_query.alert > patch_query.tmp mailx -s "Patch Query Alert for ${SID}" $DBALIST < patch_query.tmp fi patch_query.sql =============== set feed off set linesize 100 set pagesize 200 spool patch_query.alert select BUG_NUMBER "PATCH_NUMBER",to_char(creation_date,'DD-MON-YYYY HH24:MI:SS') CREATION_DATE from ad_bugs where to_char(creation_date,'DD-MON-YYYY HH24:MI:SS') between '&From_date' and '&TO_Date'; spool off; Error message: ============== $ /home/oraxyz $ ./patch_query.sh SQL*Plus: Release 10.2.0.3.0 - Production on Tue Oct 7 08:16:25 2008 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> Enter value for from_date: Enter value for to_date: User requested Interrupt or EOF detected. SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production With the Partitioning, OLAP and Data Mining options cat: 0652-050 Cannot open -l. $ /home/oraxyz $ could anyone please let me know how to do it? Thanks for your time! Regards, |