Directory
1 run the cmd window as an administrator
2 starting sqlplus and typing a series of commands
3 Special attention
1 run the cmd window as an administrator
I installed the oracle11.2 version, Sqlplus.exe is located in the directory is: I:\app\Administrator\product\11.2.0\dbhome_1\BIN
To start the cmd command with the administrator, and then use the CD command to go to the bin directory in the Oracle installation root, in my case, I opened:
2 starting sqlplus and typing a series of commands
First open the sqlplus in a way that is not logged in, by typing the following command in the cmd window:
Sqlplus/nolog
To connect to the DB instance as a DBA, the command is:
Connect/as SYSDBA
I want to modify the SYS user's password to CJ, so I typed the following command (note that the last semicolon cannot be omitted):
ALTER user SYS identified by CJ;
I also want to modify the password for the system user to CJ, and I continue typing the command:
Alter user system identified by CJ;
Okay, now that you've successfully changed your password, you don't need to restart the Oracle service to log in with your new password.
3 Special attention
At the end of the ALTER command you must enter a semicolon, not omitted, otherwise the sqlplus will output 2, and the ALTER command is not executed,
oracle11g forgot sys password