Create, Grant, and delete users in oracle

Source: Internet
Author: User


Oracle creates a user, grants permissions, and deletes a user. oracle creates a user. The table space USERS has no permissions. alter user Username quota unlimited on users;
// Create temporary tablespace test_temp tempfile 'e: /oracle/product/10.2.0/oradata/testserver/test_temp01.dbf 'size 32 m autoextend on next 32 m maxsize 2048 m extent management local; // create a data table space create tablespace test_data logging www.2cto.com datafile 'e: /oracle/product/10.2.0/oradata/testserver/test_data01.dbf 'size 32 m autoextend on next 32 m maxsize 2048 m extent management local; // create a user and specify the tablespace create user username identified by password default tablespace test_data temporary tablespace test_temp; Delete the user drop user username cascade; --- cascade // grant the user permission to grant connect, resource to username; // log on to the user later. Any created database objects belong to the test_temp and test_data tablespaces.
Specify the tablespace for each created object. Grant permissions to www.2cto.com: Assign permissions to user Sam to create tables, create sequences, create stored procedures, and create views. grant create table, create sequence, create view, create procedureto sam l remove user permissions -- remove permissions of user Sam to create views revoke create view from sam; l assign role permissions -- assign role manager to create tables and create sequence permissions grant create table, create sequence to manager; l remove user permissions -- remove the role manager permission to create a view revoke create table from manager; l assign the Select permission of the table to the user-assign the select permission of the user Sam on the tt table grant select on tt to sam; -- remove the select permission revoke select on tt from Sam on the tt table; l assign the Update permission of the table to the role www.2cto.com -- assign the Update permission of the table to the role Managergrant update on tt to manager; -- remove the table Update permission to the role Managerrevoke update on tt from manager; l assign the table Select permission to all users -- assign the table Select permission to all users grant the select on tt to public; -- remove the Select permission of the table to all users revoke select on tt from public; l assign the Select permission of the table to the user, and allow him to authorize others -- assign the Select permission of the table to the user Sam, grant select on tt to sam with grant option to others;

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.