Oracle Learning notes-User management

Source: Internet
Author: User

1: Create User

Create user username identified by password;

Note: The password starts with a letter

2: Change Password

yourself: Password

Others: Password username (System administrator can change others)

3: Delete User

Drop user username [cascade]

DBA authority to remove

Note: If the user you want to delete has created a table, take a parameter cascade when deleting it; (delete his table too)

4: Grant Permissions

Grant connect (one role) to username

Grant Select (All) in table to username permissions

Revoke permissions:

Revoke select (All) on the test from username

Maintenance Permissions:

Want to give a user permissions, users can give others

Eage:

--If object permission is added with GRANT option

Grant SELECT on TableName to username with GRANT option

--If the system permissions

Grant Connect (System permissions) to username with admin option

? : If SYS has CAOZQ permissions recycled, will the following users with CAOZQ authorization have permission?

Personalities!!

5: Permissions

System permissions: User-related permissions to the database

Creste Session permissions (with this permission to log in to the database)

Object permissions: User permission to manipulate data objects from other users

6: The Role

Predefined roles (System comes with):

Custom roles (user-set):

Connect: General Role

DBA role: role with maximum permissions

Resource: You can create tables in any table space

(Data Objects: tables, views, functions, stored procedures ...) )

The user you just created does not have any permissions (there is no permission to log on to Oracle),

7: User password Management (profile)

(1): Account lockout

Specify the maximum number of users to enter the password \ Lockout time

Create profile file

Create Profile lock-account (profile name) limit failed_login_attempts 3 (three attempts) Password_lock_time 2 (Locked for two days);

To grant the profile file to the user

alter user username profile Lock_account;

(2) Unlocking

ALTER user username account unlock;

(3) Termination password (how often the user does not change the password, the password expires)

Create profile profile_name limit password_life_time 10 (10 days expires) Password_grace_time 2 (Grace two days) ;

To grant the profile file to the user

alter user username profile Lock_account;

(4) Password history (user password cannot be used old password)

Create profile password_history limit password_life_time password_grace_time 2 Password_reuse_time 10 (old password is not allowed within 10 days)

(5) Delete profile:

Drop profile Password_history (name) [Cascade] related to all deleted


Oracle Learning notes-User management

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.