Oracle user, role, and permissions-related actions

Source: Internet
Author: User
Tags sql error

1. Create user
Create user KD identified by 123456;
2. Grant permission to connect to the database
Grant connect to KD;
3, the Scott User's EMP table is authorized to KD can be queried
Grant SELECT on Scott.emp to KD;
Grant CREATE table to KD;
4. Reclaim Permissions
Revoke select on Scott.emp from KD;
5, the table additions and deletions to the authority authorized
Grant Select,inset,delete,update on scott.emp to KD;
Revoke select,inset,delete,update on scott.emp from KD;
6. Delete users
SQL Error: ORA-01940: Unable to delete the currently connected user
Exit is already connected to KD user before executing
Drop user KD;
Prompt: Error: ORA-01922: Must specify CASCADE to remove ' KD '
Drop user KD cascade;
7. View the permissions that the current user has
SELECT * from Session_privs;
8. View the roles owned by the current user
SELECT * from User_role_privs;
9. View all permissions for a role
SELECT * from Dba_sys_privs;
SELECT * from Dba_sys_privs where grantee= ' CONNECT ';
--create session

SELECT * from Dba_sys_privs where grantee= ' RESOURCE ';

/*
Create Trigger
Create sequence
Create type
CREATE PROCEDURE
Create cluster
Create operator
Create Indextype
CREATE table
*/

SELECT * from Dba_sys_privs where grantee= ' DBA ';
--With the highest privileges all permissions have

Create a developer and authorize:
Create user CURRY identified by 123456;
Create Connet,resource to CURRY;

10, the user unlocks
Alter user HR account unlock;
11. Modify User Password
Alter user HR identified by 123456;

Oracle user, role, and permissions-related actions

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.