The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Executing SQLPLUS in UNIX Script from JAVA anooptech UNIX for Advanced & Expert Users 0 04-16-2008 08:53 AM
Need Unix script for executing oracle query ravi gongati Shell Programming and Scripting 14 03-24-2008 05:53 AM
Doubt on Executing unix commands in script Naresh Kumar Shell Programming and Scripting 2 06-05-2006 07:49 PM
Writing and executing a script in RTR implementation of UNIX mahajan.anubhav Shell Programming and Scripting 0 03-16-2006 05:20 AM
Executing a .dll from a Unix script BCarlson UNIX for Advanced & Expert Users 2 03-06-2006 07:30 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-08-2008
ganga.dharan ganga.dharan is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 41
Executing a Oracle SQL statement in a UNIX script

Hi All,

I need to select one column from a table based upon the passed in parameter.

I tried this:

sqlplus -silent $MISP_USER << EOF
set feedback off;
set verify off;
set sqlprompt ""

SELECT mail_flag
FROM dailyjobs
WHERE job_name = '$1';
exit 0
EOF
exit 0

and then i tried by executing vflag=`mailflag Load_Day1`

but it throws the error

echo $i
SP2-0306: Invalid option. Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] where <logon> ::= <username>[/<password>][@<connect_string>] | / SP2-0306: Invalid option. Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] where <logon> ::= <username>[/<password>][@<connect_string>] | / SP2-0306: Invalid option. Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] where <logon> ::= <username>[/<password>][@<connect_string>] | / SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus


Please help me to fix this issue.
Many Thanks.

Ganga
  #2 (permalink)  
Old 12-08-2008
SFNYC SFNYC is offline
Registered User
  
 

Join Date: Jun 2008
Location: New York City
Posts: 95
try this:

Code:
sqlplus -h
You'll see 'silent' is not a valid option.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0