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. com.mysql.cj.jdbc.Driver和com.mysql.jdbc.Driver的区别

    今天写东西测试的时候发现一个问题,如下: application.yml中数据源是这样配置的: 第一反应就是记忆中连接mysql的驱动不都是com.mysql.jdbc.Driver吗?com.mys ...

  2. TIBCO Jaspersoft Studio-6.12.2连接mysql时显示时区问题

    TIBCO Jaspersoft Studio-6.12.2创建mysql型的Data Adapter, 在进行连接test时弹出显示时区问题,如下图所示: 解决办法: 在Data Adapter W ...

  3. ANOSIM分析

    ANOSIM分析(analysis of similarities)即相似性分析,主要用于分析高维数据组间相似性,为数据间差异显著性评价提供依据.在一些高维数据分析中,需要使用PCA.PCoA.NMD ...

  4. 2022 年万圣节 Github 彩蛋

    记录每年 Github 万圣节彩蛋,也记录有来项目成长历程. 2022 万圣节彩蛋 2021 万圣节彩蛋 2020 万圣节彩蛋

  5. 深入解析子查询(SUBQUERY):增强 SQL 查询灵活性的强大工具

    title: 深入解析子查询(SUBQUERY):增强 SQL 查询灵活性的强大工具 date: 2025/1/12 updated: 2025/1/12 author: cmdragon excer ...

  6. mac文件目录结构

    详解MAC硬盘中各个文件夹 详解MAC硬盘中各个文件夹 打开Macintosh HD你会发现内中有四个文件夹 分别有--应用程序(Applications).系统(System).用户(User).资 ...

  7. 阿里的DataV和QuickBi区别

    首先说下DataV吧 分为老版和新版(二者之间没有什么太大的差别,存在的基本都是组件上的配置或是更多不同组件的新增,但是如果你是在项目上进行开发,你首先要知道客户用的DataV用的是什么版本,如果你们 ...

  8. OI 超几何函数与Gosper算法入门

    前言 据说这个东西是 19~20 初世纪数学研究的重大成果与主要研究方向.但是很可惜,由于世界形势的变化,以德国为中心的的超几何函数.椭圆函数研究开始没落于集中于美国.苏联的数学研究飞向. 第一章 定 ...

  9. spark-sql查询Iceberg时处理流程

    1.查询表结构 show create table data_lake_ods.test CREATE TABLE spark_catalog.data_lake_ods.test ( `user_n ...

  10. Luogu P5298 PKUWC2018 Minimax 题解 [ 紫 ] [ 树形 dp ] [ 线段树合并 ] [ 概率 dp ]

    Minimax:线段树合并优化 dp 好题. 树形 dp 因为要求出每一个值的出现概率,首先我们可以想到一个很暴力的 dp 式子. 定义 \(dp_{i,j}\) 表示在节点 \(i\) 时,权值 \ ...