• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Change SYS user password for oracle database instance

By admin

If you have ever tried to change the SYS of a normal or ASM database instance Password, you would get errors as below :

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

The following error also might occur:

SQL> alter user sys identified by ;
alter user sys identified by 
*
ERROR at line 1:
ORA-01031: insufficient privileges
The reason behind these failures are – The password should be the one provided when the password file was created, also REMOTE_LOGIN_PASSWORDFILE should be set to EXCLUSIVE on all instances. If you want to change the password then you would need to recreate the password file using the orapwd utility

Solution

Recreate the password file as follows:
1. Set the ORACLE_HOME and ORACLE_SID
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 orapw[SID]
5. Issue the command:

$ orapwd file=[ORACLE_HOME]/dbs/orapw[SID] password=[sys_password]

The passwordfile can be recreated for ASM while ASM instance is up. Usually, for normal DB instances, it is recommended that DB instances be shutdown before changing the passwordfile. In 11.2 you can use asmcmd to change the password for single instance environment as follows

$ export ORACLE_SID=+ASM
$ asmcmd

ASMCMD> passwd sys
Enter old password (optional): ******
Enter new password: ******

In Cluster environment

ASMCMD> orapwusr --modify --password sys

Enter password: ******
ASMCMD> exit
NOTE: This is not applicable for SYSASM privilege.

Filed Under: oracle

Some more articles you might also be interested in …

  1. Oracle 11g – New ASM features
  2. How to Modify an Existing ASM Spfile in a RAC Environment
  3. What Happens and What to Do when the SPFILE has been Manually Modified
  4. Dynamic Oracle Net Server Tracing
  5. Oracle database : Basics about pfile and spfile
  6. Oracle ASM 12c – New Features with examples
  7. How to Configure Device File owner/group with udev rules
  8. Difference between using srvctl vs using sqlplus for start/stop one or more Oracle Database Instances
  9. ASM Fast Mirror Resync Feature – Example To Simulate Transient Disk Failure And Restore Disk
  10. How to get the Values Assigned by Default to a Profile in Oracle Database

You May Also Like

Primary Sidebar

Recent Posts

  • Beginners Guide to Oracle Database Vault
  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • How to Capture More Logs in /var/log/dmesg for CentOS/RHEL
  • Unable to Start RDMA Services on CentOS/RHEL 7
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary