Oracle's users, permissions, and Roles

Source: Internet
Author: User

First, the user

1. Create user

Create user u password for AA.

sql> create user u identified by AA;

2. Give permissions to users

The user is not yet able to connect to the database and must be given some permissions.

Sql> Grant create session to U;

Authorization is successful.

Sql> Conn U/aa;

is connected.

Sql> Show User

USER is "U"

3. Change your password

sql> alter user u password expire;

The user has changed.

Sql> Conn U/aa;

ERROR:

ora-28001:the Password has expired

Change the password for u

New Password:

4. Lock user Account

sql> alter user U account lock;

Sql> Conn U/bb;

ERROR:

Ora-28000:the account is locked

5, the user unlocks

sql> alter user u account unlock;

Second, the Authority

The system permissions for a database are large, because having system permissions means that you can manipulate all the objects of the database system. The object permission means that only one particular object can be manipulated.

System permissions are not specific to a particular table, view database object, and so on. It is only for operations, can you create, delete, view, and so on. The object permission is only for a database object, it determines what a user can do about an object. such as whether you can view, delete, update and so on.

Third, the role

1. Create a role

sql> Create role role_u1;

The role has been created.

2. Assigning permissions to Roles

sql> grant drop any table to ROLE_U1;

Authorization is successful.

Sql> Grant role_u1 to song;

Authorization is successful.

Oracle's users, permissions, and Roles

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.