Oracle passwords

Resetting

sql> ALTER USER [username] IDENTIFIED BY [password]

To Reset sys Password

(all actions from a local command line)

Prior to starting sqlplus, first set the oracle sid (shown here as xxxx) – where the oracle_sid is the name of the database you wish to amend.

Linux

TIP : If on linux, first execute “. oraenv ” which will set this sid and other necessary environment variables.

[oracle@DBNODE3 ~]$ . oraenv
ORACLE_SID = [oracle] ? PRESTIGE
The Oracle base for ORACLE_HOME=/opt/mnt1/app/oracle/product/11.2.0/dbhome_1 is /opt/mnt1

[oracle@DBNODE3 ~]$ sqlplus / as sysdba
sql> alter user [username] identified by [password]

Windows

start > run > cmd

SET ORACLE_SID=xxxx
sqlplus / AS sysdba

sql> ALTER USER sys IDENTIFIED BY [password]

xenserver – Unable to connect to server ” is not a valid URI

Using XenCentre, when connecting to one of a host, I was getting the error

Unable to connect to server '<server>' is not a valid URI

The server was still running and reachable via ping and responded to ssh.

Problem i then found was the root password was “mislaid” for this test hypervisor.

Resolution : reset the root password

  1. reboot machine.,
  2. at boot prompt, type menu.c32
  3. on the grub menu, select xe and press tab.
  4. a command string will then be shown.  Append “single”  (with no quotes)  after the word splash.
  5. XenServer will then boot to another cmd prompt.  Here reset the password using passwd.
  6. now reboot  :  #reboot

then back to Xencentre,

  1. right-click on the server > forget
  2. add back in the server with the new password.

How to change a password in Oracle

How to change a password in Oracle

Resetting

sql> ALTER USER [username] IDENTIFIED BY [password]

To Reset sys Password

(all actions from a local command line)

Prrior to starting sqlplus, first set the oracle sid (shown here as xxxx) – where the oracle_sid is the name of the database you wish to amend.

Linux

TIP : If on linux, first execute “. oraenv ” which will set this sid and other necessary environment variables.

[oracle@DBNODE3 ~]$ . oraenv
ORACLE_SID = [oracle] ? PRESTIGE
The Oracle base for ORACLE_HOME=/opt/mnt1/app/oracle/product/11.2.0/dbhome_1 is /opt/mnt1

[oracle@DBNODE3 ~]$ sqlplus / as sysdba
sql> alter user [username] identified by [password]

Windows

start > run > cmd

SET ORACLE_SID=xxxx
sqlplus / AS sysdba

sql> ALTER USER sys IDENTIFIED BY [password]