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

How to change oracle database password

下次还敢
Release: 2024-04-18 15:36:15
Original
1116 people have browsed it

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>
Copy after login
  • For example:
<code>sqlplus scott/tiger@orcl</code>
Copy after login
  • Enter the following command:
<code>ALTER USER 用户名 IDENTIFIED BY 新密码;</code>
Copy after login
  • For example:
<code>ALTER USER scott IDENTIFIED BY newpassword;</code>
Copy after login

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>
Copy after login
  • For example:
<code>ALTER SYSTEM SET PASSWORD = newpassword;</code>
Copy after login

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

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template