账户锁定:ORA-28000: the account is locked

阅读更多
Caused by: java.sql.SQLException: ORA-28000: the account is locked

	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
	at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:645)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:299)
	at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:344)
	at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:148)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:545)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	... 23 more

oracle11g中默认在default概要文件中设置了"FAILED_LOGIN_ATTEMPTS=10次",当输入密码错误次数达到设置值将导致此,该用户会自动锁住。


1. 登陆oracle(管理员)  
普通用户:sqlplus username/password;
管理员:sqlplus sys/manager as sysdba;

2. 查询被锁用户
SQL> select username, account_status from dba_users where username='xxx';

3. 解锁用户
SQL> alter user xxx account unlock;

4. 查看用户限制登陆次数
SQL> select * from dba_profiles where RESOURCE_NAME='FAILED_LOGIN_ATTEMPTS';

5. 修改用户无论输入多少次都不会被锁定
SQL> alter profile default limit failed_login_attempts unlimited;

你可能感兴趣的:(oracle)