修改asm中的sys密码

前端之家收集整理的这篇文章主要介绍了修改asm中的sys密码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

直接修改报ORA-01109: database not open:

  1. [oracle@prodb2 admin]$ . oraenv
  2. ORACLE_SID = [prodb2] ? +ASM2
  3. [oracle@prodb2 admin]$ sqlplus / as sysdba
  4.  
  5. sql*Plus: Release 10.2.0.5.0 - Production on чǚϥ 7Ղ 6 02:24:48 2018
  6.  
  7. Copyright (c) 1982,2010,Oracle. All Rights Reserved.
  8.  
  9. Connected to:
  10. Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
  11. With the Partitioning,Real Application Clusters,OLAP,Data Mining
  12. and Real Application Testing options
  13.  
  14. sql>
  15. sql>
  16. sql> alter user sys identified by admin;
  17. alter user sys identified by admin
  18. *
  19. ERROR at line 1:
  20. ORA-01109: database not open

10g中修改密码需要修改密码文件

  1. cd $GRID_HOME/dbs
  2.  
  3. WINDOWS:
  4.  
  5. orapwd file=<ORACLE_HOME>/database/PWD<SID>.ora password=<sys_password>
  6.  
  7. UNIX:
  8.  
  9. orapwd file=<ORACLE_HOME>/dbs/orapw<SID> password=<sys_password>

测试:

  1. 节点2修改密码
  2. [oracle@prodb2 ~]$ cd $ORACLE_HOME/dbs
  3. [oracle@prodb2 dbs]$ orapwd file=orapw+ASM2 password=oracle force=y
  4. [oracle@prodb2 dbs]$ sqlplus sys/oracle@asm2 as sysdba
  5.  
  6. sql*Plus: Release 10.2.0.5.0 - Production on чǚϥ 7Ղ 6 02:43:25 2018
  7.  
  8. Copyright (c) 1982,Data Mining
  9. and Real Application Testing options
  10.  
  11. sql>
  12.  
  13. 节点1测试:
  14. [oracle@ocm1 admin]$ sqlplus sys/oracle@asm2 as sysdba
  15.  
  16. sql*Plus: Release 10.2.0.5.0 - Production on чǚϥ 7Ղ 6 02:45:31 2018
  17.  
  18. Copyright (c) 1982,Data Mining
  19. and Real Application Testing options
  20.  
  21. sql> show parameter remote_login_passwordfile
  22.  
  23. NAME TYPE VALUE
  24. ------------------------------------ ---------------------- ------------------------------
  25. remote_login_passwordfile string EXCLUSIVE

官方建议在修改密码关闭asm实例,测试中未关闭,远程连接正常。

11g中修改密码相对简单:
single instance:

  1. $ export ORACLE_SID=+ASM
  2.  
  3. $ asmcmd
  4.  
  5. ASMCMD> passwd sys
  6. Enter old password (optional):
  7. Enter new password: ******

Cluster environment

  1. ASMCMD> orapwusr --modify --password sys
  2.  
  3. Enter password:
  4. ASMCMD> exit

参考自:How To Change ASM SYS PASSWORD ? (文档 ID 452076.1)How to connect to ASM instance from a remote client (Oracle Net) (文档 ID 340277.1)

猜你在找的Oracle相关文章