![]() |
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 |
| oracle connection from shell script | DILEEP410 | Shell Programming and Scripting | 4 | 07-01-2009 02:19 AM |
| sybase connection through shell-script | Amitabh | UNIX for Dummies Questions & Answers | 9 | 04-10-2009 10:34 PM |
| how to check DB connection in unix shell script | kmanivan82 | Shell Programming and Scripting | 1 | 10-31-2008 09:22 AM |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 03:06 AM |
| shell script- oracle connection problem | nattynatty | Shell Programming and Scripting | 4 | 08-14-2002 09:48 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Connection to database through shell script
Hi
when i am calling the shell script with two parameter like id and date it works fine.But the same shell script is call by java application it gives the error as shown below Code:
Thu Jan 8 04:13:22 EST 2009|The Get Segment Process Failed: SP2-0306:
Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
Code:
RUNID=$1 BUS_DT=$2 sleep 10 auth=`cat ..pass` STD_LOGFILE=/temp/logs DT=`date +%Y%m%d:%H%M%I` returnedvalue=`sqlplus -s $auth <<EOF set serveroutput on WHENEVER SQLERROR EXIT 1 exec mapping_runid_to_segment($1) set serveroutput OFF EXIT; EOF` |
|
||||
|
Please, be more specific about your questions.
I can see no JAVA here. Only shell (might be something else as shell...) script that seems to be calling sqlplus. By the way: you can call a script from the sqlplus using command line... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|