I installed Oracle 11g. I didn't change the passwords for SYSTEM and SYS. However now I find that the default passwords do not work. Please help.
4 Answers
It is possible to connect to the database without specifying a password. Once you've done that you can then reset the passwords. I'm assuming that you've installed the database on your machine; if not you'll first need to connect to the machine the database is running on.
Ensure your user account is a member of the
dba
group. How you do this depends on what OS you are running.Enter
sqlplus / as sysdba
in a Command Prompt/shell/Terminal window as appropriate. This should log you in to the database as SYS.Once you're logged in, you can then enter
alter user SYS identified by "newpassword";
to reset the SYS password, and similarly for SYSTEM.
(Note: I haven't tried any of this on Oracle 12c; I'm assuming they haven't changed things since Oracle 11g.)

- 63,336
- 16
- 89
- 104
-
2@HannesdeJager: thanks for spotting the linkrot. I've got rid of the dead link. I've also removed the section about me not having tried it on Oracle 11, as I now have. I haven't tried it on Oracle 12, however... – Luke Woodward Dec 10 '13 at 22:40
-
3Works on 12c - just tested. – Duncan Jones Jun 18 '14 at 11:55
-
1worked for me too ( Oracle 11g Express Edition ) – ColorDeColor Aug 30 '14 at 07:34
-
why when i execute "Connect /as sysdba" command in SQL Command Line, it gave me an error of "ERROR TNS: Protocol adaptor error" ? – gumuruh Apr 19 '16 at 21:28
-
@gumuruh: either you're not connected to the machine the database is on, or the TNS listener isn't up. – Luke Woodward Apr 22 '16 at 22:03
-
okay @LukeWoodward, thanks for reminding me. I tried to revive my Services under the Management tool to enabled them all.... especially Oracle. :D – gumuruh Apr 23 '16 at 03:35
-
sqlplus / as sysdba Command not found I am using linux – skywalker Jun 03 '16 at 14:10
-
don't forget to "export ORACLE_SID=XE" before you run sqlplus – Pierluigi Vernetto Feb 02 '17 at 12:03
-
@gumuruh The command is sqlplus / as sysdba. It does not appear you have a space before the as. – Patrick O'Hara Feb 01 '18 at 18:41
-
I tried this and got `ORA-65040: operation not allowed from within a pluggable database`, I solved this by switching to root container `alter session set container=CDB$ROOT;` after which I was able to alter user. – keyhan Dec 30 '19 at 16:48
Login into the machine as oracle login user id( where oracle is installed)..
Add
ORACLE_HOME = <Oracle installation Directory>
in Environment variableOpen a command prompt
Change the directory to
%ORACLE_HOME%\bin
type the command
sqlplus /nolog
SQL>
connect /as sysdba
SQL>
alter user SYS identified by "newpassword";
One more check, while oracle installation and database confiuration assistant setup, if you configure any database then you might have given password and checked the same password for all other accounts.. If so, then you try with the password which you have given in your database configuration assistant setup.
Hope this will work for you..

- 5,783
- 15
- 70
- 117

- 557
- 6
- 7
Once installed in windows Followed the instructions starting from Run SQL Command Line (command prompt)
then... v. SQL> connect /as sysdba
Connected. [SQL prompt response]
vi. SQL> alter user SYS identified by "newpassword";
User altered. [SQL prompt response]
Thank you. This minimized a headache

- 51
- 1
- 2
actually during the installation process.it will prompt u to enter the password..At the last step of installation, a window will appear showing cloning database files..After copying,there will be a option..like password managament..there we hav to set our password..and user name will be default..

- 31
- 1