欢迎来到之路教程(on itroad-com)
解决方案
重新创建密码文件如下:
1.设置ORACLE_HOME和ORACLE_SID
2.从sqlplus连接/作为sysdba
3. 如果 pfile 或者 spfile 中的“remote_login_passwordfile”参数值为 EXCLUSIVE,则必须关闭实例
4.重命名或者删除现有的密码文件orapw[SID]
5. 执行命令:
$ orapwd file=[ORACLE_HOME]/dbs/orapw[SID] password=[sys_password]
当 ASM 实例启动时,可以为 ASM 重新创建密码文件。
通常,对于普通的数据库实例,建议在修改密码文件之前先关闭数据库实例。
11.2可以使用asmcmd修改单实例环境的密码如下
$ export ORACLE_SID=+ASM $ asmcmd ASMCMD> passwd sys Enter old password (optional): ** Enter new password: **
在集群环境中
ASMCMD> orapwusr --modify --password sys Enter password: ** ASMCMD> exit
注意:这不适用于 SYSASM 权限。
如果我们曾经尝试更改普通或者 ASM 数据库实例的 SYS 密码,我们将收到如下错误:
SQL> password Changing password for SYS Old password: New password: Retype new password: ERROR: ORA-00600: internal error code, arguments: [15051], [], [], [], [], [], [], []
SQL> select INSTANCE_NAME from v$instance; INSTANCE_NAME ---------------- +ASM SQL> ALTER USER sys IDENTIFIED BY [new_password] REPLACE [old_password]; ALTER USER sys IDENTIFIED BY [new_password] REPLACE [old_password] * ERROR at line 1: ORA-01109: database not open
还可能出现以下错误:
SQL> alter user sys identified by ; alter user sys identified by * ERROR at line 1: ORA-01031: insufficient privileges
这些失败背后的原因是 - 密码应该是创建密码文件时提供的密码,还应该在所有实例上将 REMOTE_LOGIN_PASSWORDFILE 设置为 EXCLUSIVE。
如果要更改密码,则需要使用 orapwd 实用程序重新创建密码文件
日期:2020-09-17 00:11:30 来源:oir作者:oir