Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling 3 attempts while logging to SQL Plus

Sanjay Verma
Super Advisor

Disabling 3 attempts while logging to SQL Plus

Hi Friends,

When we first login to SQL Plus, it gives three attempts to login. I would like to disable it and set it to 1 attempt only. Will appreciate to know the way I can do this.

Regards,
Sanjay
Co-operation - The biggest chain reaction
5 REPLIES
T G Manikandan
Honored Contributor

Re: Disabling 3 attempts while logging to SQL Plus

The default profile is called the 'default'
So you can just do a
sql>alter profile default limit failed_login_attempts 6;
sql>alter user profile default

you can test this by creating a new profile instead of modifying the default one by
SQL> create profile prod_limit
limit failed_login_attempts 6;


SQL> create user abc identified by abcd
default tablespace temporary tablespace ;

SQL> grant create session to abc;
SQL> alter user abc profile prod_limit;


Thanks
Christian Gebhardt
Honored Contributor

Re: Disabling 3 attempts while logging to SQL Plus

Why ? Every User can type sqlplus again and has one more change.

As I know these three attempts are compiled in the sqlplus-binary, so there is no easy way to leave sqlplus after one attempt.

In a script you can use

sqlplus <user/passwd
EOF

then you have only one attempt.

Chris
Christian Gebhardt
Honored Contributor

Re: Disabling 3 attempts while logging to SQL Plus

If you change the profile in the database you disable the User in the database so nobody can login with this user.

Leaving sqlplus after three attempts does not disable the user in the database.

Chris
Sanjay Verma
Super Advisor

Re: Disabling 3 attempts while logging to SQL Plus

Hello TG & Everyone,
Is there a way I can make one attempt the default for every user?
~Sanjay
Co-operation - The biggest chain reaction
Bala_8
Frequent Advisor

Re: Disabling 3 attempts while logging to SQL Plus

Hi Sanjay,

This is referred as BUG-381695 by Oracle... a request for enhancement was requested by Oracle but it was rejected ... You can refer oracle sites to find details about this bug ..

There is no direct solution to achive this ...

U can try this:

Make users connect to the database using procedures/passing parameters ... when the first connections fails with the password passed as parameter, use WHENEVER SQL ERROR Exception and close the connection ...

this approach may be suitable for batch jobs like things but for every sqlplus connection by user you may not achieve the results ....

Look in the oracle sites for more info ...

cheers
-bala-