Home » SQL & PL/SQL » SQL & PL/SQL » account lock privileges
account lock privileges [message #397220] Thu, 09 April 2009 08:43 Go to next message
rs1969
Messages: 21
Registered: December 2007
Location: UK
Junior Member
Hi,

We have a requirement to lock a user account after 'x' number of failed login attempts. The password is checked against the encrypted password stored in a table.

Since a connect to the database is not requested, Oracle does not lock the account automatically after the failed login attempts. When I try to execute the statement 'ALTER USER xxx ACCOUNT LOCK' programmatically from a package procedure it fails with an insufficient privileges message. This is correct as ALTER USER privilege cannot be given to all users on the system.

How do I go about this?

Thanks
Re: account lock privileges [message #397222 is a reply to message #397220] Thu, 09 April 2009 09:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64119
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
We have a requirement to lock a user account after 'x' number of failed login attempts.

Use a profile.

Quote:
Since a connect to the database is not requested,

Why?

Quote:
When I try to execute the statement 'ALTER USER xxx ACCOUNT LOCK' programmatically from a package procedure it fails with an insufficient privileges message.

You must have ALTER USER directly granted to the owner.

Quote:
How do I go about this?

Request the connect and use Oracle profile features.

Regards
Michel

Re: account lock privileges [message #397223 is a reply to message #397220] Thu, 09 April 2009 09:06 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I would use the CREATE PROFILE command to create a user profile.

One of the parameters you can set is
Quote:
FAILED_LOGIN_ATTEMPTS Specify the number of failed attempts to log in to the user account before the account is locked.
Previous Topic: Search particular object used in any of my PL/SQL code (merged 3)
Next Topic: A question about SUM analytic function used with GROUP BY clause
Goto Forum:
  


Current Time: Tue Dec 06 06:18:20 CST 2016

Total time taken to generate the page: 0.08422 seconds