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