Oracle is a software widely used in enterprise-level database management systems. When using the Oracle database, the system administrator needs to regularly maintain the security of the database. One of the important tasks is to regularly change the password of the database system administrator sys. . This article will introduce how to modify the sys password of the Oracle database.
Open a command prompt or terminal in the operating system and enter the following command:
sqlplus /nolog
This command will enter Oracle SQL* Plus environment.
Next, enter the following command to connect to the database:
conn /as sysdba
You need to enter the sysdba account and password of the current database. If the current account does not have permissions, you need to log in with an account with sysdba permissions.
After the connection is successful, enter the following command to change the password:
alter user sys identified by 新密码;
The new password is the new password that needs to be changed.
If the current password has expired, you need to change the password to a temporary password first, and then change it to a new password:
alter user sys identified by 临时密码 temporary; alter user sys identified by 新密码;
Execute After the above command, you can query whether the system account password has been modified successfully by using the following statement:
select * from dba_users where username='SYS';
If the password field in the query result has been modified to a new password, it means the modification is successful.
Summary
In enterprise-level database systems, the account and password of the database system administrator play a very important role. In order to ensure the security of the database, administrators need to change passwords frequently to avoid being intruded and attacked by hackers. This article introduces how to change the password of sys in Oracle database. I hope it will be helpful to readers.
The above is the detailed content of How to change the sys password of Oracle database. For more information, please follow other related articles on the PHP Chinese website!