In oracle, how does one modify the user name and password ?, Oracle user name

Source: Internet
Author: User

In oracle, how does one modify the user name and password ?, Oracle user name

1. Take the Linux operating system as an example. Enter the command sqlplus/nolog to enter the oracle console, and enter conn/as sysdba. Enter the command as a DBA.

[oracle@vm-100-11-17-55 ~]$ sqlplus /nologSQL*Plus: Release 11.2.0.3.0 Production on Sun Feb 11 14:04:03 2018Copyright (c) 1982, 2011, Oracle.  All rights reserved.SQL> conn /as sysdba;Connected.

2. After the connection is successful, enter "select username from dba_users" to view the user list.

SQL> select username from dba_users;USERNAME------------------------------LIUXIANZHAOSNPRESNUATMAMMONUATBAITIAOUATACCOUNTUATINSURANCEUATLOANUATGFSMBUATCOMPANYUATFUNDUAT11 rows selected.

3. If you modify a user password, the format of the user password is:

Alter user Username identified by new password; (in the example of companyuat, change the password to companyuat)

SQL> alter user companyuat identified by companyuat;

User altered.

4. If the user is locked, unlock the user's lock status

SQL> ALTER USER companyuat ACCOUNT UNLOCK;

User altered.

Common commands: view all usernames in the Oracle database

View all users in the database, provided that you have dba permissions, such as sys, system

Select * from dba_users;

View All Users you can manage!

Select * from all_users;

View Current user information!

Select * from user_users;

Query the tables under your current user.

SELECT * FROM user_tables

Query the tables that can be accessed by your current user [that is, tables that can be accessed by yourself and other users]

SELECT * FROM all_tables

To query all the tables in the current database, you must have DBA permissions.

SELECT * FROM dba_tables

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.