Oracle Create user set permissions

Source: Internet
Author: User

(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

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.