Oracle user management (1)

Source: Internet
Author: User

1. Create a user
Create user @ username identified by @ password
Example: create user aobama identified by future
A user named "aobama" is created, and the password of this user is "future ".
Note: The Administrator (DBA) permission is required for creating a user in Oracle, and the user's password must start with a letter.

2. Change User Password
A. change the password of the current user.
SQL> password Username
B. Modify passwords of other users (non-current users)
SQL> alter user Username identified by new password
Example: alter user aobama identified by benladeng
Note: The administrator privilege is required to change the password of a non-current user.

3. delete a user
SQL> drop user Username [cascade]
Note: You cannot delete yourself. If you delete a user who has already created a table, you need to add the parameter [cascade]

4. Grant a user the permission to log on to the database.
SQL> grant connect to user name
Example: grant connect to aobama

5. Assign resource permissions to a user
SQL> grant resource to user name

6. Authorize a user to access a table
SQL> grant select on table name to user name
Example: grant select on emp to benladeng
Select * from aobama. emp

7. revoke the permissions granted to a user
SQL> revoke select on emp from benladeng
Note: Only authorized persons can revoke permissions. That is, who gives and who revokes the bell)

8. Grant a user a certain permission and grant this permission to others.
SQL> grant select on table name to user name with grant option
Example: grant select on emp to aobama with grant option
At this time, the user aobama not only has the permission to query the emp table, but also has the permission granted to others.

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.