profile-oracle

I created a profile
create profile two_wrong limit failed_login_attempts 2;
alter user scott profile two_wrong;

SQL> conn scott/tige
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.

My concern is why it is automatically log out to oracle instead showing errors on two times
based on the profile created..
nobleitAsked:
Who is Participating?
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
It does exactly what it says it does.

Below is a complete test run
drop user bob cascade;
drop profile two_wrong;
create profile two_wrong limit failed_login_attempts 2;

create user bob identified by bob;
grant create session to bob;
alter user bob profile two_wrong;

set echo on
conn bob/bob
conn bob/pete
conn bob/pete
conn bob/bob



output of run
--------------------------------------------------
SQL> conn bob/bob
Connected.

Session altered.

SQL> conn bob/pete
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
SQL> conn bob/pete
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bob/bob
ERROR:
ORA-28000: the account is locked

Open in new window

0
 
slightwv (䄆 Netminder) Commented:
Typo or not?  Scott's password is tiger not tige
0
 
nobleitAuthor Commented:
I purpose did that..to test the profile...
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
slightwv (䄆 Netminder) Commented:
Ok, what did you expect to happen?

You limit to two failed logins.  After two failed, the account should become locked.

Try a failed one more time then try the right password.
0
 
nobleitAuthor Commented:
the issue is it is not allowing
it is automatically jumping out from oracle
0
 
slightwv (䄆 Netminder) Commented:
I'm not following.  What are you expecting to happen?

If a warning, I believe it's a different parameter.
0
 
slightwv (䄆 Netminder) Commented:
The docs.  Always start with the docs:

http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_6010.htm#sthref4886

FAILED_LOGIN_ATTEMPTS  Specify the number of failed attempts to log in to the user account before the account is locked. If you omit this clause, then the default is 10 times.
0
 
OP_ZaharinCommented:
hi nobleit,
- from memory i've read somehwere that if a login attempt in sqlplus fails while you have successful connected as another user, it will take you out of Oracle for security reason in 1st attempt. that is why the message appear: "Warning: You are no longer connected to ORACLE." however you are still in Sqlplus environment to attempt the login up to the failed_login_attempts settings before the user being locked.
0
 
slightwv (䄆 Netminder) Commented:
>>"Warning: You are no longer connected to ORACLE."

Is that what you meant? The above post is correct.  That is just a sqlplus message telling you you are no longer logged in to a database.
0
 
slightwv (䄆 Netminder) Commented:
Even in a 3GL language, you will likely get some sort of a 'not connected' message.
0
 
nobleitAuthor Commented:
Got it clarified thanks...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.