How to change the sys password of Oracle 10g ASM

Source: Internet
Author: User

The sys password of the Oracle 10g ASM instance sometimes needs to be modified. The modification method is to directly modify the password file of the ASM instance, which is different from that of the user in the database instance.

We cannot use the alter user command to modify the sys user password of the ASM database. The sys password of ASM can only be provided by the password file, and the value of REMOTE_LOGIN_PASSWORDFILE of the ASM instance is set to EXCLUSIVE.

If you use the alter user command to modify, A ORA-01031 error occurs. The procedure is as follows:

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

The following error also might occur:
SQL> alter user sys identified;
Alter user sys identified
*
ERROR at line 1:
ORA-01031: insufficient privileges

You can change the password by modifying the information in the password file. The operation is to use orapwd to recreate the password file.

1. Set ORACLE_HOME and ORACLE_SID to match the ASM instance.
2. Use sqlplus/as sysdba to connect to the ASM instance
3. If the value of remote_login_passwordfile is EXCLUSIVE, the ASM instance must be disabled.
4. Back up the current password file PWD <SID>. ora (In Windows)/orapw <SID> (in UNIX) and delete it.
5. Execute the following command to recreate the password file

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

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

Although the password file can be rebuilt at the startup of the ASM instance, it is recommended that you disable the database instance and the ASM instance before recreating it.

If the environment is oracle rac, the password files under each node need to be regenerated.

In Oracle 11.2, you can use asmcmd to modify the sys password of a single instance.

$ Export ORACLE_SID = + ASM
$ Asmcmd
ASMCMD> passwd sys
Enter old password (optional ):******
Enter new password :******

You can also use the asmcmd tool to modify the sys password of RAC.

ASMCMD> orapwusr -- modify -- password sys

Enter password :******
ASMCMD> exit

The key is that you need to close the database instance and ASM instance to change the sys password at 10 Gb. The change is to recreate the password file.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.