ITPub博客

首页 > 数据库 > Oracle > 修改ASM sys用户密码方法

修改ASM sys用户密码方法

原创 Oracle 作者:charsi 时间:2016-08-08 12:15:27 0 删除 编辑
Oracle数据库从10g开始使用ASM,ASM实例正常情况下都是mount状态,所以如果使用password命令,或者alter user sys identified by xxx;去修改密码的话通常会报错,无法修改。

Oracle提供了修改ASM的方法,直接生成pwfile去修改,参考:How To Change ASM SYS PASSWORD ? (Doc ID 452076.1)

1. Set the ORACLE_HOME and ORACLE_SID to the ASM instance
2. connect /as sysdba from sqlplus
3. If the value of the "remote_login_passwordfile" parameter in the pfile or spfile is EXCLUSIVE, you must shutdown your instance 
4. RENAME or DELETE the existing password file PWD<SID>.ora( In Windows) / orapw<SID> ( in UNIX) 
5. Issue the command:

WINDOWS:
orapwd file=<ORACLE_HOME>/database/PWD<SID>.ora password=<sys_password>

UNIX:
orapwd file=<ORACLE_HOME>/dbs/orapw<SID> password=<sys_password>


在11g R2之后,还可以使用asmcmd命令去修改:
单机环境:

点击(此处)折叠或打开

  1. $ export ORACLE_SID=+ASM

  2. $ asmcmd

  3. ASMCMD> passwd sys
  4. Enter old password (optional): ******
  5. Enter new password: ******
集群RAC环境:

点击(此处)折叠或打开

  1. ASMCMD> orapwusr --modify --password sys

  2. Enter password: ******
  3. ASMCMD> exit


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

请登录后发表评论 登录
全部评论

注册时间:2010-05-04

  • 博文量
    96
  • 访问量
    406715