RE: looks like oracle changed how sqlplus -s /nolog works in 10.2.0.3

From: Herring Dave - dherri <Dave.Herring_at_acxiom.com>
Date: Fri, 11 Jan 2008 14:16:33 -0600
Message-ID: <7ED53A68952D3B4C9540B4EFA5C76E360417F43E@CWYMSX04.Corp.Acxiom.net>


Works fine for me:

% sqlplus -s /nolog <<EOF
> connect $LOGINPASSWORD
> SELECT *
> FROM v\$version;
> EXIT
> EOF
BANNER



Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Linux: Version 10.2.0.3.0 - Production NLSRTL Version 10.2.0.3.0 - Production

5 rows selected.

I'm curious what you mean by "you get your prompt set up with user_at_database", when you use the "-s" option its silent, so you don't see anything.

Dave


Dave Herring | A c x i o m M I C S / C S O

630-944-4762 office | 630-430-5988 wireless | 630-944-4898 fax

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of ryan_gaffuri_at_comcast.net
Sent: Friday, January 11, 2008 9:29 AM
To: oracle-l_at_freelists.org
Subject: looks like oracle changed how sqlplus -s /nolog works in 10.2.0.3

Looks like when you log into sqlplus in 10.2.0.3 you get your prompt set up with user_at_database. You used to have to write a login.sql script to do this. However, this appears to have broken a standard way to log into sqlplus from a unix shell. For years I have used...

sqlplus -s /nolog << EOF
  conn ${LOGINPASSWORD}
EOF Try it. You just hang when you log in.

Also the following is necessary without -s

sqlplus /nolog << EOF
  conn ${LOGINPASSWORD}
  conn ${LOGINPASSWORD}
EOF First conn it takes your variable as a variable for the prompt, the second time logs you in.

Rather annoying. I have been on projects where I Have had tons of code written the first way with -s /nolog that would have to be changed.

anyone have a workaround to get -s /nolog to work?

--
http://www.freelists.org/webpage/oracle-l


***************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.
****************************************************************************

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 11 2008 - 14:16:33 CST

Original text of this message