oracle修改用户密码的方法
Oracle用户名及默认密码
修改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 |
|---|---|
|
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. |
|
(Optional) Maximum number of entries (user accounts) to permit in the file. |
|
(Optional) If , permits overwriting an existing password file. |
|
(Optional) If , passwords are treated as case-insensitive. |
- FILE
-
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.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
orapw
ORACLE_SID
ORACLE_HOME
/dbs
Windows
PWD
ORACLE_SID
.ora
ORACLE_HOME
\database
For example, for a database instance with the SID
orcldw
, the password file must be named
orapworcldw
on Linux and
PWDorcldw.ora
on Windows.In an Oracle Real Application Clusters environment on a platform that
requires an environment variable to be set to the path of the password
file, the environment variable for each instance must point to the same
password file.Caution:
It is critically important to the security of your system that you
protect your password file and the environment variables that identify
the location of the password file. Any user with access to these could
potentially compromise the security of the connection. - ENTRIES
-
This argument specifies the number of entries that you require the
password file to accept. This number corresponds to the number of
distinct users allowed to connect to the database as
SYSDBA
or
SYSOPER
. The actual number of allowable entries can be higher than the number of users, because the
ORAPWD
utility continues to assign password entries until an operating system
block is filled. For example, if your operating system block size is 512
bytes, it holds four password entries. The number of password entries
allocated is always a multiple of four.Entries can be reused as users are added to and removed from the password file. If you intend to specify
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
, and to allow the granting of
SYSDBA
and
SYSOPER
privileges to users, this argument is required.Caution:
When you exceed the allocated number of password entries, you must
create a new password file. To avoid this necessity, allocate more
entries than you think you will ever need. - FORCE
-
This argument, if set to
Y
, enables you to overwrite an existing password file. An error is
returned if a password file of the same name already exists and this
argument is omitted or set to
N
. - IGNORECASE
-
If this argument is set to
y
, passwords are case-insensitive. That is, case is ignored when
comparing the password that the user supplies during login with the
password in the password file.
oracle修改用户密码的方法的更多相关文章
- vcenter修改用户密码的方法
https://192.168.x.x:9443登录,必须用administrator@vsphere.local登录,不能用root用户登录. 主页-系统设置- Single Sing-On-用户和 ...
- 德邦总管 修改oracle数据库用户密码的方法
WIN+R打开运行窗口,输入cmd进入命令行: 输入sqlplus ,输入用户名,输入口令(如果是超级管理员SYS的话需在口令之后加上as sysdba)进入sql命令行: 连接成功后,输入“s ...
- 修改oracle数据库用户密码的方法
WIN+R打开运行窗口,输入cmd进入命令行: 输入sqlplus ,输入用户名,输入口令(如果是超级管理员SYS的话需在口令之后加上as sysdba)进入sql命令行: 连接成功后,输入“s ...
- oracle修改用户密码过期时间
Oracle默认在default概要文件中设置了“PASSWORD_LIFE_TIME=180天”,导致密码过期,程序无法使用,业务进程会提示无法连接数据库等字样. --查询默认密码过期时间 SELE ...
- oracle修改用户密码
1.使用oracle用户登录,连接数据库 [oracle@wuzj ~]$ sqlplus /nolog SQL*Plus: Release 10.2.0.1.0 - Production on Th ...
- Sqlserver 命令行方式修改 用户密码的方法
1. 之前写了一个 可以使用 ssms 的方式修改密码的情况 2. 还有办法是执行命令 exec sp_password null,'newpassword','sa' # sa 是用户名 newp ...
- oracle 修改用户密码
SYS用户是Oracle中权限最高的用户,而SYSTEM是一个用于数据库管理的用户.在数据库安装完之后,应立即修改SYS,SYSTEM这两个用户的密码,以保证数据库的安全. 安装完之后修改密码方法 c ...
- Oracle修改用户密码错误次数及解锁用户
ORACLE11g错误密码登录默认是10次,10次错误后用户将被锁定,如下: SQL> conn test/123456 ERROR: ORA-28000: the account is loc ...
- mysql修改用户密码的方法及命令
方法1: 用SET PASSWORD命令 首先登录MySQL. 格式:mysql> set password for 用户名@localhost = password('新密码'); 例子:my ...
- oracle修改用户密码操作
打开命令提示框输入以下内容: 1.输入:sqlplus /nolog //进入oralce控制台2.输入:conn /as sysdba //以管理员权限登录3.输入:alter user apps ...
随机推荐
- IM开发者的零基础通信技术入门(十三):为什么手机信号差?一文即懂!
[来源申明]本文引用了微信公众号"网优雇佣军"的<是谁偷走了我家的手机信号?>文章内容.为了更好的内容呈现,下文在引用和收录时内容有改动,转载时请注明原文来源信息,尊重 ...
- 给 Python 添加进度条 | 给小白的 tqdm 精炼实例!
给 Python 添加进度条 | 给小白的 tqdm 精炼实例! 假设我们有一个循环: for i in range(100): do_something() # 这里做某些事 假设 do_somet ...
- Solution -「ROI 2018」「LOJ #2850」无进位加法
\(\mathscr{Description}\) Link. 给定 \(\{a_n\}\),每次令某个 \(a_i\leftarrow a_i+1\),最终得到 \(\{b_n\}\),求 ...
- CDS标准视图:付款锁定原因描述 I_PaymentBlockingReasonText
视图名称:付款锁定原因描述 I_PaymentBlockingReasonText 视图类型:基础 视图代码: 点击查看代码 //Documentation about annotations can ...
- .NET 异步 /Task
老版本的写法经常是以BeginXXX, EndXXX, 或者xx.xxxAsycn(........) 新的支持 async异步关键字配合Task可读性和易用性比老板好多了. 新旧例子: using ...
- SpringBoot 集成腾讯云(对象存储、短信)
https://developer.aliyun.com/article/831473 https://blog.csdn.net/weixin_45626288/article/details/11 ...
- Graph DataBase介绍-图数据库
前言分析社会关系这类复杂图壮结构的海量数据,使用图形数据库(Graph DataBase)是最好的选择.– 作者:李祎 <程序员>介绍各种NoSQL 数据库的文章已经很多,不过大部分都是基 ...
- T480指纹识别支持
目标 通过指纹识别解锁slim-lock 环境 操作系统archlinux 桌面管理器slim 锁屏slimlock 硬件 Thinkpad T480 注: 指纹设备id, 06cb:009a 安装 ...
- 使用必读-使用Iceberg数据湖需要注意的点
一.开发注意事项 1.Iceberg选择合适的表版本 简述:Iceberg目前有两个表版本(V1和V2),根据数据选择合适的表版本. V1表只支持增量数据插入,适合做纯增量写入场景,如埋点数据. V2 ...
- WPF的Dispatcher类里的BeginInvoke,Invoke,InvokeAsync
原文地址:https://blog.csdn.net/niuge8905/article/details/81117989 深入了解 WPF Dispatcher 的工作原理(Invoke/Invok ...