(ext: http://www.cnblogs.com/yangy608/archive/2011/08/22/2148893.html)
Create user test identified by "test"--creating TEST users
Default Tablespace USERS
Temporary tablespace TEMP
Profile DEFAULT;
Grant Connect,create view, resource to TEST;
Grant unlimited tablespace to TEST;
--Administrator Authorization
Grant create session to test;--grants TEST user permission to create session, that is, login permission
Grant Unlimited session to test;--Grant TEST user permission to use tablespace
Grant CREATE table to test;--grants permissions for creating tables
Grant drop table to test;--grants permission to delete tables
Grant Insert table to test;--permissions for inserting tables
Grant Update table to test;--permissions to modify tables
Grant all to public;--this is more important, grant all permissions (all) for all users (public)
--oralce more strict rights management, ordinary users are also the default can not access each other
Grant SELECT on TableName to test;--Grant TEST user permission to view the specified table
Grant drop on TableName to test;--granting permission to delete table
Grant insert on TableName to test;--permission to be inserted
Grant update on TableName to test;--granting permission to modify tables
Grant Insert (ID) on tablename to TEST;
Grant Update (ID) on TableName to test;--grants insert and Modify permissions to specific fields of the specified table, note that only the INSERT and update
--Revoke permissions
Basic syntax with GRANT, keyword revoke
--View Permissions
SELECT * from user_sys_privs;--View all permissions for the current user
SELECT * from user_tab_privs;--View the user's permissions on the table
--table for the user of the action table
/* need to precede the table name with the user name, as follows */
--Permission passing
That is, user a grants permission to B,b to grant the permission of the operation to C again, with the following command:
Grant alert table on TableName to TEST with admin option;--keyword with admin option
Grant alert table on TableName to TEST with Grant option;--keyword with GRANT option effect similar to admin
--character
A role is a collection of permissions that can grant a role to a user
Create role myrole;--creating roles
Grant create session to myrole;--grants permission to create session Myrole
Grant Myrole to test;--the role of the TEST user Myrole
Drop role myrole; remove roles
/* But some permissions are not granted to the role, such as unlimited tablespace and the Any keyword */
Oracle Create user set permissions