oracle ORA-28000: 帐户被锁定错误频繁出现
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26858852/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ORA-28000: the account is locked error getting frequently
提问by Thush
I am getting the error :
我收到错误:
ORA-28000: the account is locked
Is this a DB Issue?When I unlock user account using the command ALTER USER username ACCOUNT UNLOCK
temporarily it will be OK. Then after some time the same account lock happens again.
这是数据库问题吗?当我ALTER USER username ACCOUNT UNLOCK
暂时使用命令解锁用户帐户时,它会没问题。然后一段时间后再次发生相同的帐户锁定。
The database using is oracle XE
使用的数据库是oracle XE
Does anybody else have the same issue?
有没有其他人有同样的问题?
采纳答案by Varun Jain
One of the reasons of your problem could be the password policy you are using.
问题的原因之一可能是您使用的密码策略。
And if there is no such policy of yours then check your settings for the password properties in the DEFAULT
profile with the following query:
如果您没有这样的政策,请DEFAULT
使用以下查询检查配置文件中密码属性的设置:
SELECT resource_name, limit
FROM dba_profiles
WHERE profile = 'DEFAULT'
AND resource_type = 'PASSWORD';
And If required, you just need to change the PASSWORD_LIFE_TIME
to unlimited
with the following query:
如果需要,您只需使用以下查询更改PASSWORD_LIFE_TIME
to unlimited
:
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
And this Linkmight be helpful for your problem.
此链接可能对您的问题有所帮助。
回答by Dharmendra Singh
Way to unlock the user :
解锁用户的方法:
$ sqlplus /nolog
SQL > conn sys as sysdba
SQL > ALTER USER USER_NAME ACCOUNT UNLOCK;
and open new terminal
并打开新终端
SQL > sqlplus / as sysdba
connected
SQL > conn username/password //which username u gave before unlock
- it will ask new
password:password
- it will ask re-type
password:password
- press enter u will get loggedin
- 它会问新的
password:password
- 它会要求重新输入
password:password
- 按回车你会登录
回答by Pedro Ghilardi
Here other solution to only unlock the blocked user. From your command prompt log as SYSDBA:
这里其他解决方案只解锁被阻止的用户。从您的命令提示符以 SYSDBA 身份登录:
sqlplus "/ as sysdba"
Then type the following command:
然后键入以下命令:
alter user <your_username> account unlock;
回答by Anshu Mishra
I have faced this similar issue and resolved it by using following steps :
我遇到过这个类似的问题,并通过使用以下步骤解决了它:
- Open windows command prompt.
- Login using the command
sqlplus "/ as sysdba"
- Then executed the command
alter user HR identified by password account unlock
Please note, thepassword
is the password that I have used.
By using above steps you can connect to Oracle Database as user HR with the password password.
- 打开 Windows 命令提示符。
- 使用命令登录
sqlplus "/ as sysdba"
- 然后执行命令
alter user HR identified by password account unlock
请注意,这password
是我使用过的密码。
通过使用上述步骤,您可以使用密码 password 作为用户 HR 连接到 Oracle 数据库。
回答by Ravi
Login to SQL Plus client on the oracle database server machine.
在 oracle 数据库服务器机器上登录 SQL Plus 客户端。
enter user-name: system
输入用户名:system
enter password: password[Only if, if you have not changed your default password while DB installation]
输入密码:密码[仅当,如果您在安装数据库时未更改默认密码]
press enter. after which, you will be seeing the connection status.
按回车键。之后,您将看到连接状态。
Now,
现在,
SQL> ALTER USER [USER_NAME] ACCOUNT UNLOCK;
press enter.
按回车键。
you will be seeing message: user altered.
您将看到消息: user altered.
Now try login with the user name on db client[sqldeveloper].
现在尝试使用 db client[sqldeveloper] 上的用户名登录。
回答by Imtiyaz Ali
Check the PASSWORD_LOCK_TIME
parameter. If it is set to 1 then you won't be able to unlock the password for 1 day even after you issue the alter user unlock
command.
检查PASSWORD_LOCK_TIME
参数。如果它设置为 1,那么即使在您发出alter user unlock
命令后 1 天内您也无法解锁密码。
回答by Srikant Patra
Solution 01
解决方案01
Account Unlock by using below query :
使用以下查询解锁帐户:
SQL> select USERNAME,ACCOUNT_STATUS from dba_users where username='ABCD_DEV';
USERNAME ACCOUNT_STATUS
-------------------- --------------------------------
ABCD_DEV LOCKED
SQL> alter user ABCD_DEV account unlock;
User altered.
SQL> select USERNAME,ACCOUNT_STATUS from dba_users where username='ABCD_DEV';
USERNAME ACCOUNT_STATUS
-------------------- --------------------------------
ABCD_DEV OPEN
Solution 02
解决方案02
Check PASSWORD_LIFE_TIME
parameter by using below query :
PASSWORD_LIFE_TIME
使用以下查询检查参数:
SELECT resource_name, limit FROM dba_profiles WHERE profile = 'DEFAULT' AND resource_type = 'PASSWORD';
RESOURCE_NAME LIMIT
-------------------------------- ------------------------------
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LIFE_TIME 10
PASSWORD_REUSE_TIME 10
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_FUNCTION NULL
PASSWORD_LOCK_TIME 1
PASSWORD_GRACE_TIME 7
INACTIVE_ACCOUNT_TIME UNLIMITED
Change the parameter using below query
使用以下查询更改参数
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;