Home  >  Article  >  Database  >  How to change oracle database password

How to change oracle database password

下次还敢
下次还敢Original
2024-04-18 15:36:151049browse

How to change Oracle database password? Update the password using the ALTER USER command through SQL*Plus. Modify the password in the Security tab through Oracle Enterprise Manager (OEM). When you have SYSDBA authority, change the password with the ALTER SYSTEM command.

How to change oracle database password

How to change the Oracle database password

To change the Oracle database password, you can use the following steps:

1. Use the SQL*Plus tool

  • to open a command prompt or terminal.
  • Connect to Oracle database:
<code>sqlplus 用户名/旧密码@数据库名</code>
  • For example:
<code>sqlplus scott/tiger@orcl</code>
  • Enter the following command:
<code>ALTER USER 用户名 IDENTIFIED BY 新密码;</code>
  • For example:
<code>ALTER USER scott IDENTIFIED BY newpassword;</code>

2. Use Oracle Enterprise Manager (OEM)

  • to log in to the OEM console.
  • In the navigation pane, expand the "Database" node.
  • Select the database for which you want to change the password.
  • Right-click on the database and select "Properties".
  • In the Security tab, enter your new password.
  • Click Apply and OK to save changes.

3. Use the ALTER SYSTEM command

If you have SYSDBA permissions, you can use the ALTER SYSTEM command:

  • In SQL *Plus Enter the following command:
<code>ALTER SYSTEM SET PASSWORD = 新密码;</code>
  • For example:
<code>ALTER SYSTEM SET PASSWORD = newpassword;</code>

After changing the password, use the new password to reconnect to the database:

<code>sqlplus 用户名/新密码@数据库名</code>

The above is the detailed content of How to change oracle database password. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn