![]() |
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 |
| Connecting to oracle database from shell script | satyakiran | Shell Programming and Scripting | 8 | 07-03-2009 03:22 PM |
| Connecting to Oracle Database | dreams5617 | Shell Programming and Scripting | 4 | 05-02-2008 12:37 PM |
| Having A Problem Connecting to Oracle Using Cron | goodmis | UNIX for Dummies Questions & Answers | 1 | 03-20-2007 04:12 PM |
| Connecting to Oracle through unix shell scripts | guptan | UNIX for Advanced & Expert Users | 1 | 07-04-2005 12:16 PM |
| Connecting to a Oracle Db using SunOS | darmat0712 | UNIX for Dummies Questions & Answers | 2 | 03-03-2005 01:17 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Connecting to Oracle from Shell..What Am I doing Wrong
I have the following code in my shell script.
. /apps/oracli/xxxxx/xxxx/oraEnv.9.2.0 sqlplus -s $DB_USER/$DB_PWD@$DB_NAME > xx.html <<EOF I am passing DBuser and DBname from a config file and the password from user. Config File : export DB_USER=xxx; export DB_NAME=xxx; I am getting the usual error ERROR: ORA-01017: invalid username/password; logon denied 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 |
|
||||
|
use like this
user=xxxx
passwd=xxxx dbname=xxx sqlplus -s $user/$passwd@$dbname >test.sql <<END select * from dual; END It works for me,If u still get the error,then use /oracle/product/<yourversion>/bin/sqlplus -s $user/$passwd@$dbname >test.sql <<END Regards, cskumar |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|