SQL Oracle:如何设置用户密码未过期?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1766445/
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
Oracle: how to set user password unexpire?
提问by fvital
There is some construction
有一些建设
ALTER USER scott PASSWORD EXPIRE
But how can I similair set password to unexpired state?
但是如何将密码设置为未过期状态?
回答by RC.
The following statement causes a user's password to expire:
以下语句会导致用户的密码过期:
ALTER USER user PASSWORD EXPIRE;
If you cause a database user's password to expire with PASSWORD EXPIRE, then the user (or the DBA) must change the password before attempting to log in to the database following the expiration. Tools such as SQL*Plus allow the user to change the password on the first attempted login following the expiration.
如果您使用 PASSWORD EXPIRE 导致数据库用户的密码过期,则用户(或 DBA)必须在过期后尝试登录数据库之前更改密码。SQL*Plus 等工具允许用户在到期后第一次尝试登录时更改密码。
ALTER USER scott IDENTIFIED BY password;
Will set/reset the users password.
将设置/重置用户密码。
See the alter user docfor more info
有关详细信息,请参阅更改用户文档
回答by Philip Schlump
If you create a user using a profile like this:
如果您使用这样的配置文件创建用户:
CREATE PROFILE my_profile LIMIT
PASSWORD_LIFE_TIME 30;
ALTER USER scott PROFILE my_profile;
then you can change the password lifetime like this:
那么您可以像这样更改密码生命周期:
ALTER PROFILE my_profile LIMIT
PASSWORD_LIFE_TIME UNLIMITED;
I hope that helps.
我希望这有帮助。
回答by Shweta
While applying the new profile to the user,you should also check for resource limits are "turned on" for the database as a whole i.e.RESOURCE_LIMIT = TRUE
在将新配置文件应用于用户时,您还应该检查整个数据库的资源限制是否“打开” ieRESOURCE_LIMIT = TRUE
Let check the parameter value.
If in Case it is :
让我们检查参数值。
如果情况是:
SQL> show parameter resource_limit
NAME TYPE VALUE
------------------------------------ ----------- ---------
resource_limit boolean FALSE
Its mean resource limit is off,we ist have to enable it.
Use the ALTER SYSTEM statement to turn on resource limits.
SQL> ALTER SYSTEM SET RESOURCE_LIMIT = TRUE;
System altered.