修改oracle用户的密码有以下方法: 普通用户 (1)通过alter user语法来进行修改 ,这也是最常见的方式: (2) 第二种方式,是通过passWord命令来
修改oracle用户的密码有以下方法:
普通用户
(1)通过alter user语法来进行修改 ,这也是最常见的方式:
(2) 第二种方式,是通过passWord命令来修改:
从安全性角度来说 ,推荐大家通过第二种方式来修改用户密码,这样可防止明文密码泄露。
sys用户
另外关于sys用户密码,不要使用password以及alter user 方式去修改,原因主要如下:
(1) 当REMOTE_LOGIN_PASSWORDFILE参数设置为shared时,我们使用alter user 修改sys密码时,会报
ORA-28046: Password change for SYS disallowed error.
测试如下:
(2) 大多数内部递归sql都使用SYS用户。因此,如果您试图在数据库打开时使用ALTER USER语句更改此密码,则可能会导致死锁。
因此,对于sys用户我们需要使用orapwd来进行修改:
[oracle@orcl dbs]$ orapwd file='orapworcl' entries=5 force=y 这里注意等号左右不能有空格;
关于orapwd说明引用官网,如下:
Argument | Description |
---|---|
FILE
|
Name to assign to the password file. You must supply a complete path. If you supply only a file name, the file is written to the current directory. |
ENTRIES
|
(Optional) Maximum number of entries (user accounts) to permit in the file. |
FORCE
|
(Optional) If
y
, permits overwriting an existing password file.
|
IGNORECASE
|
(Optional) If
y
, passwords are treated as case-insensitive.
|
This argument sets the name of the password file being created. You must specify the full path name for the file. This argument is mandatory.
The file name required for the password file is operating system specific. Some operating systems require the password file to adhere to a specific fORMat and be located in a specific directory. Other operating systems allow the use of environment variables to specify the name and location of the password file.
Table 1-1 lists the required name and location for the password file on the UNIX, linux, and windows platforms. For other platforms, consult your platform-specific documentation.
Table 1-1 Required Password File Name and Location on UNIX, Linux, and Windows
Platform | Required Name | Required Location) |
---|---|---|
UNIX and Linux |
|
ORACLE_HOME
|
Windows |
|
ORACLE_HOME
|
--结束END--
本文标题: oracle修改用户密码的方法
本文链接: https://lsjlt.com/news/48946.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0