Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Easy Question: Test Connection

RE: Easy Question: Test Connection

From: Justin Cave (DDBC) <jcave_at_ddbcinc.com>
Date: Mon, 10 May 2004 21:36:17 -0600
Message-ID: <87E9F113CEF1D211A4C30090273018742BC8DB@ddbcinc.ddbc.local>


I know that the Oracle ODBC Driver DSN configuration screen has a "test connection" button. That actually goes and creates a connection with the username & password provided and catches the error. I'm reasonably confident that that's the only way to do this sort of thing.

What benefit is there in your approach? Rather than making a connection and catching the login error, you would have to connect with a hard-coded username & password, check the password, and then create a new connection 99% of the time when the password was correct. =20

Justin Cave
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Sinardy Xing Sent: Monday, May 10, 2004 9:26 PM
To: oracle-l_at_freelists.org
Subject: RE: Easy Question: Test Connection

Hi Justin,

I want have a loop to ask user for correct password before proceed with
=3D login.

I remember the Oracle GUI they have something like "test connection" the result either successful of not successful.

Sinardy

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Justin Cave (DDBC) Sent: 11 May 2004 11:21
To: oracle-l_at_freelists.org
Subject: RE: Easy Question: Test Connection

You would need to actually try to create a connection to the database with that user name & password. Why would you want to check the validity of a password other than when you are logging in?=3D3D20

Justin Cave
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Sinardy Xing Sent: Monday, May 10, 2004 8:58 PM
To: oracle-l_at_freelists.org
Subject: Easy Question: Test Connection

Hi all,
=3D3D20

How I test given password? (test connect) =3D3D20 example the logic is something like this =3D3D20 username=3D3D3Dsystem; = password=3D3D3Dmanager;
=3D3D20 if ORACLE_TEST_CONNECT(username, password) < 0 then

    echo Wrong id or(and) password
else

    exp username/password
endif;
=3D3D20
=3D3D20

How to test the given username or password?
=3D3D20
=3D3D20
=3D3D20

thanks so much
=3D3D20

Sinardy
=3D3D20
=3D3D20
=3D3D20
=3D3D20



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
-----------------------------------------------------------------


----------------------------------------------------------------
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
-----------------------------------------------------------------

----------------------------------------------------------------
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
-----------------------------------------------------------------


----------------------------------------------------------------
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 Mon May 10 2004 - 22:29:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US