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

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.

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修改用户密码的方法的更多相关文章

  1. vcenter修改用户密码的方法

    https://192.168.x.x:9443登录,必须用administrator@vsphere.local登录,不能用root用户登录. 主页-系统设置- Single Sing-On-用户和 ...

  2. 德邦总管 修改oracle数据库用户密码的方法

    WIN+R打开运行窗口,输入cmd进入命令行: 输入sqlplus ,输入用户名,输入口令(如果是超级管理员SYS的话需在口令之后加上as sysdba)进入sql命令行:    连接成功后,输入“s ...

  3. 修改oracle数据库用户密码的方法

    WIN+R打开运行窗口,输入cmd进入命令行: 输入sqlplus ,输入用户名,输入口令(如果是超级管理员SYS的话需在口令之后加上as sysdba)进入sql命令行:    连接成功后,输入“s ...

  4. oracle修改用户密码过期时间

    Oracle默认在default概要文件中设置了“PASSWORD_LIFE_TIME=180天”,导致密码过期,程序无法使用,业务进程会提示无法连接数据库等字样. --查询默认密码过期时间 SELE ...

  5. oracle修改用户密码

    1.使用oracle用户登录,连接数据库 [oracle@wuzj ~]$ sqlplus /nolog SQL*Plus: Release 10.2.0.1.0 - Production on Th ...

  6. Sqlserver 命令行方式修改 用户密码的方法

    1. 之前写了一个 可以使用  ssms 的方式修改密码的情况 2. 还有办法是执行命令 exec sp_password null,'newpassword','sa' # sa 是用户名 newp ...

  7. oracle 修改用户密码

    SYS用户是Oracle中权限最高的用户,而SYSTEM是一个用于数据库管理的用户.在数据库安装完之后,应立即修改SYS,SYSTEM这两个用户的密码,以保证数据库的安全. 安装完之后修改密码方法 c ...

  8. Oracle修改用户密码错误次数及解锁用户

    ORACLE11g错误密码登录默认是10次,10次错误后用户将被锁定,如下: SQL> conn test/123456 ERROR: ORA-28000: the account is loc ...

  9. mysql修改用户密码的方法及命令

    方法1: 用SET PASSWORD命令 首先登录MySQL. 格式:mysql> set password for 用户名@localhost = password('新密码'); 例子:my ...

  10. oracle修改用户密码操作

    打开命令提示框输入以下内容: 1.输入:sqlplus /nolog //进入oralce控制台2.输入:conn /as sysdba //以管理员权限登录3.输入:alter user apps ...

随机推荐

  1. R语言画图常用参数

    plot(x,xlab = "degree",ylab = "number of nodes",main = "mRNA degree distrib ...

  2. 函数 | Go语言

    函数 不支持命名参数与默认值 可变参数 求多个int的和 func IntSum(x ...int) { sum := 0 for _, v := range x { sum += v } retur ...

  3. Windows安全加固(二)

    三.本地安全策略用户权限分配 1. 使用windows+R打开运行,输入"secpol.msc"打开本地安全策略->本地策略->用户权限分配->找到"拒 ...

  4. 隐藏zsh前面用户名或者主机名

    1. zshrc 修改 vim ~/.zshrc文件,在文件底部增加: prompt_context() {} 只保留用户名,隐藏主机名 prompt_context() { if [[ " ...

  5. GRPC-JAVA

    近一年来一直在用公司内wiki进行技术调研以及记录,后期有时间将逐步迁移至博客园 参考资料: https://github.com/grpc/grpc-java https://www.cnblogs ...

  6. C#中如何使用异步编程

    在 C# 中,异步编程主要通过 async 和 await 关键字来实现.异步编程的目的是让程序在执行耗时操作(如 I/O 操作.网络请求等)时不会阻塞主线程,从而提高程序的性能. 1. 异步编程的核 ...

  7. springboot-总结列表

    一.Spring Boot 具有以下特点: 1. 独立运行的 Spring 项目 Spring Boot 可以以 jar 包的形式独立运行,Spring Boot 项目只需通过命令" jav ...

  8. ElasticSearch(1)---Logstash同步Mysql数据到ElasticSearch

    1. 单机部署-场景描述 elasticsearch只用过,没有部署或者维护过,从头完整走一遍,记录下,原创实战,有需要的朋友参考下. 2 . 解决方案 特别说下,以前win7下安装的3台虚拟机,没有 ...

  9. 一镜到底,通过Llama大模型架构图看透transformers原理

    一镜到底,通过Llama大模型架构图看透transformers原理 Llama Nuts and Bolts是Github上使用Go语言从零重写Llama3.1 8B-Instruct模型推理过程( ...

  10. 从0到1构建开源 vue-uniapp-template:使用 UniApp + Vue3 + TypeScript 和 VSCoe、CLI 开发跨平台移动端脚手架

    作者主页: 有来技术 开源项目: youlai-mall︱vue3-element-admin︱youlai-boot︱vue-uniapp-template 仓库主页: GitCode︱ Gitee ...