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: Sinardy Xing <SinardyXing_at_bkgcomsvc.com>
Date: Tue, 11 May 2004 11:57:11 +0800
Message-ID: <7534CC34CD1D9F49BB05A00B9C6F20F401351A84@antares.bcsgroup.com.sg>


Hi Justin,

I have script and inside I do import tables, I don't want my script fail = import if the user accidentally key in wrong password, I mean at least = give them a few tries.

Well I have quite long script, I know if this is short script they can = run the script again, but before I do the import, I have many other = things that already done, many of them can't be run twice.

If really I can't test the password, I have to get rid the import from = the main program, let them run the import separately.

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:36
To: oracle-l_at_freelists.org
Subject: RE: Easy Question: Test Connection

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. =3D20

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
=3D3D 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?=3D3D3D20

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,
=3D3D3D20

How I test given password? (test connect) =3D3D3D20 example the logic is something like this =3D3D3D20 username=3D3D3D3Dsystem; =3D password=3D3D3D3Dmanager;
=3D3D3D20 if ORACLE_TEST_CONNECT(username, password) < 0 then

    echo Wrong id or(and) password
else

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

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

thanks so much
=3D3D3D20

Sinardy
=3D3D3D20
=3D3D3D20
=3D3D3D20
=3D3D3D20



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

----------------------------------------------------------------
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:54:09 CDT

Original text of this message

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