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;