| Lesson 6 | Changing the System Passwords |
| Objective | Change the passwords for the SYS and SYSTEM users. |
SYSDBA).Open a terminal or command prompt and log in using SQL*Plus:
sqlplus / as sysdba
Alternatively, if connecting remotely:
sqlplus sys@<TNS_ALIAS> as sysdba
You will need to provide the password.
Execute the following SQL command:
ALTER USER SYS IDENTIFIED BY new_password;
Replace new_password with the desired password for the SYS user.
Execute the following SQL command:
ALTER USER SYSTEM IDENTIFIED BY new_password;
Replace new_password with the desired password for the SYSTEM user.
Test the new passwords by connecting to the database:
sqlplus sys/new_password@<TNS_ALIAS> as sysdba
sqlplus system/new_password@<TNS_ALIAS>
PASSWORD_LIFE_TIME restrictions in the profile, ensure it is appropriately configured.
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
sqlplus / as sysdba SQL> ALTER USER SYS IDENTIFIED BY NewSysPassword123; SQL> ALTER USER SYSTEM IDENTIFIED BY NewSystemPassword123; SQL> exitBy following these steps, the passwords for the `SYS` and `SYSTEM` users in Oracle 19c can be updated securely.
SQL> CONNECT INTERNAL Connected. SQL> ALTER USER sys IDENTIFIED BY lampdesk; Statement processed. SQL> ALTER USER system IDENTIFIED BY dogtoad; Statement processed. SQL>