Ways to modify Oracle database username and password _oracle

Source: Internet
Author: User
Tags commit sqlplus

Oracle database user name and password (Linux for example), the need for friends can refer to the next.

Preparatory work before modification:

Use the SSH tool to connect to the server as root
Then switch to Oracle User: Su-oracle (carriage return)
Using the Sqlplus Connection database: Sqlplus/nolog (carriage return)
Log on to SYS user as Administrator: Conn Sys/sys as SYSDBA (carriage return)
The database connection was successful and the preparation is complete.

Second, modify the user name.

After the database connection succeeds, continue typing after the sql> prompt:
First find the user needs to modify the user name: Select User#,name from user$;(carriage return)--such as: user# equals 66
You can now modify the user name: Update user$ set name= ' new user name ' where user#=66; (enter)
The system will prompt: 1 row updated. Description of the successful modification,
Re-enter: Commit; (enter) submit the changes.

Third, modify the user password.

After the database connection is successful, enter after the sql> prompt: ALTER user name identified by new password; (enter)
Re-enter: Commit; (enter) submit the changes can be made.

Other user's Supplementary method:

The specific procedures are as follows:

Sql*plus:release 9.2.0.5.0-production on Sunday November 21 13:32:34 2004

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Sql> Connect sys/oracle as Sysdba

is connected.

Sql> select Username,password from Dba_users;
USERNAME PASSWORD
------------------------------ ------------------------------
SYS 8a8f025737a9097a
SYSTEM 2D594E86F93B17A1
Dbsnmp E066D214D5421CCC
TOAD a1ba01cf0dd82695
Outln 4a3ba55e08595c81
Wmsys 7c9ba362f8314299
6 rows have been selected.

Sql> Connect system/oracle
is connected.

Sql> Connect sys/oracle as Sysdba
is connected.

Modify user System password to Manager
sql> alter user system identified by manager;
The user has changed.

Unlock Users
sql> alter user SYSTEM account unlock;
The user has changed.
Sql> select Username,password from Dba_users;

USERNAME PASSWORD
------------------------------ ------------------------------
SYS 8a8f025737a9097a
SYSTEM d4df7931ab130e37
Dbsnmp E066D214D5421CCC
TOAD a1ba01cf0dd82695
Outln 4a3ba55e08595c81
Wmsys 7c9ba362f8314299
6 rows have been selected.

Sql> Connect System/manager

is connected.
Then you can do whatever you want to do at this point.

Sql> Connect sys/oracle as Sysdba
is connected.

Modify user system password to previous value
sql> alter user system identified by values ' 2D594E86F93B17A1 ';
The user has changed.

Sql> Connect system/oracle
is connected.
Sql> Connect sys/oracle as Sysdba
is connected.
Sql> Connect System/manager
ERROR:
Ora-01017:invalid Username/password; Logon denied

Warning: You are no longer connected to ORACLE.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.