How to add, modify, delete users, and how to authorize

Source: Internet
Author: User

1. Create a database user using PL/SQL developer

CREATE USER LISI identified by LISI;

Explanation: Create User: Is the SQL keyword that creates the database user, followed by the user name;

Identified by: is the SQL keyword that sets the database password,

2, the permissions of the linked database to Lisi users

GRANT CONNECT to LISI;

Explanation: Grant:oracle Database authorization keyword, indicating the meaning of authorization

A default role for the Connect:oracle database, only the permissions on the linked database

3. Authorize the Scott user's rights to the Lisi user

GRANT SELECT on the EMP to LISI;

4. Reclaim User Rights

REVOKE SELECT on the EMP to LISI;

5, the increase of the table, delete, change the authority to authorize users and change the password

GRANT SELECT, INSERT, UPDATE, DROP on EMP to LISI;

Eg:select * from SCOTT. EMP;

6, the recovery of the form of the increase, deletion, authorization to change Authority

REVOKE SELECT, UPDATE, INSERT, DROP on EMP to LISI;

7. Change Password: Alter USER LISI identified by LISI321;

8. Delete database Users

DROP USER LISI; OR DROP user LISI CASCADE; (This will delete the table associated with the LISI user)

Permissions and roles in the database

9. View the database user's own permissions

SELECT * from Session_privs;

Session_privs: Is the dictionary table of the Oracle database, the dictionary table is actually the internal Oracle table (not created, the table already exists), and this table can see a lot of permissions, such as create users, delete users and so on.

10. View the roles owned by the database users themselves

SELECT * from User_role_privs;

10. See what permissions the Connect role has

SELECT * from Dba_sys_privs where grantee= ' CONNECT ';

11. How to create a database user and authorize a developer.

1) Create a database user

Create user Wangwu identified by WANGWU;

2) Assigning Permissions

Grant Connect,resource to Wangwu;

This allows Wang Wu to log in to the Oracle database, creating tables and related functions in the database for project development.



How to add, modify, delete users, and how to authorize

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.