oracle修改用户密码的方法「建议收藏」

oracle修改用户密码的方法「建议收藏」修改oracle用户的密码有以下方法:普通用户(1)通过alteruser语法来进行修改,这也是最常见的方式:(2)第二种方式,是通过password命令来…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

修改oracle用户的密码有以下方法:

普通用户  

(1)通过alter user语法来进行修改 ,这也是最常见的方式:

oracle修改用户密码的方法「建议收藏」

(2) 第二种方式,是通过password命令来修改:

oracle修改用户密码的方法「建议收藏」

从安全性角度来说 ,推荐大家通过第二种方式来修改用户密码,这样可防止明文密码泄露。

sys用户

另外关于sys用户密码,不要使用password以及alter user 方式去修改,原因主要如下:

(1) 当REMOTE_LOGIN_PASSWORDFILE参数设置为shared时,我们使用alter user 修改sys密码时,会报

ORA-28046: Password change for SYS disallowed error.

测试如下:

oracle修改用户密码的方法「建议收藏」

(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.

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.

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

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.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/69902769/viewspace-2646974/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/69902769/viewspace-2646974/

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/164702.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)
blank

相关推荐

  • 5g端到端网络切片技术_5G网络切片的特征

    5g端到端网络切片技术_5G网络切片的特征1、网络切片的一些概念网络切片(Slice):基于客户化需求,可以被设计、部署、维护的逻辑网络,旨在满足特定的客户、业务、商业场景的业务特点及商业模式。网络切片实例(E2ESliceInstance-ESI):网络切片实例(Instance)是一个临时逻辑网络,跨多个技术域,包含:(1)组网络:”功能”(Function)即虚拟网元(终端、接入网、回传网、核心网、业务网络)及网管系统对应的资源;(2)存储、运算;(3)连接关系。2、网络切片原因:未来业务需求差异

  • 数仓分层理论_多元分层理论

    数仓分层理论_多元分层理论​数仓分层、元数据管理、数据质量管理

  • Unknown symbol alloc_etherdev_mqs错误处理方法

    Unknown symbol alloc_etherdev_mqs错误处理方法编译内核模块,并且安装时,出现以下错误:root@am335x-evm:~/modules#insmodwlan.ko[292.849701]wlan:disagreesaboutversionofsymbolalloc_etherdev_mqs[292.856774]wlan:Unknownsymbolalloc_etherdev_mqs(err-2…

    2022年10月25日
  • linux rzsz安装

    linux rzsz安装

  • jenkins自动触发构建_jenkins调用bat脚本

    jenkins自动触发构建_jenkins调用bat脚本前言跑自动化用例每次用手工点击jenkins出发自动化用例太麻烦了,我们希望能每天固定时间跑,这样就不用管了,坐等收测试报告结果就行。jenkins的定时任务是用的crontab语法定时构建语法

  • 哈佛幸福课笔记上篇「建议收藏」

    哈佛幸福课笔记上篇「建议收藏」改变一生的课:哈佛幸福课笔记上篇第1课什么是积极心理学?第2课为什么要学习积极心理学?第3课幸福是一种随机现象吗?第4课积极的环境能改变人第5课环境的力量第6课乐观主义第7课逆境还是机遇?第8课感激链接:哈佛大学公开课:幸福课.《哈佛幸福课》是改变我生活最大的一项事物,没有之一。我学习了5遍幸福课,并且用过去6年的时间去尝试它践行它,感觉完全改变了我的生活。第1课什么是积极心理学?1.享受安静2.这门课不光是传授信息,而且关于如何变形。重要的不仅仅是获得了什么信息,还是何形状

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号