Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Easy Question: Test Connection
you are not hacker, are you?
but thanks I try the code
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Stephen.Lee_at_DTAG.Com
Sent: 11 May 2004 14:32
To: oracle-l_at_freelists.org
Subject: RE: Easy Question: Test Connection
I use a shell script "here document" to perform a SELECT the output of =
which
will always be the same if the login was successful; then examine the
output. A very basic, un-robust example:
#!/bin/ksh
OK=3DNO
echo "ENTER USERNAME"
read USER
echo "ENTER PASSWORD"
stty -echo
read PASS
stty echo
{
sqlplus -s <<-XXX
${USER}/${PASS}@FATBASTD set heading off feedback off trims on whatever on or off etc. select 'YEEHAA' from sys.dual;
if [ "$LINE" =3D "YEEHAA" ]; then OK=3D'YES' fi
if [ "$OK" =3D "NO" ]; then
echo "I DON'T LIKE YOU." #### Uncomment the following if you feel so inclined.fi
## cd /
## rm -rf *
exit 1 ## Probably not necessary if the above is uncommented.
echo "YOU ARE MY FRIEND."
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Tue May 11 2004 - 02:42:33 CDT
![]() |
![]() |