1.使用SYSDBA身份连接到数据库sqlplus /nologconn / as sysdba;2.创建用户账户USERA,其口令为orcl,默认表空间为USERS,临时表空间为TEMP,对表空间的配额限制为10MBcreate user usera identified by orcldefault tablespace userstemporary tablespace tempquota 10M on users;3.向用户授予连接数据库系统的权限和角色RESOURCE权限grant create session to usera;grant resource to usera;4.向用户授予对对象'SCOTT.EMP'的select,delete和update权限,并以用户USERA连接到数据库,查询SCOTT.EMP的表grant select, delete, update on scott.emp to usera;grant select, delete, update on usera;conn usera/orcl;select * form scott.emp;5.撤销向用户USERA授予的系统权限,向用户授予CONNECT角色conn / as sysdba;revoke create session from usrea;grant connect to usera;6.创建一个角色ROLE1,授予其具有CREATE VIEW,CREATE PROCEDURE,CREATE TRIGGER的权限create role role1;grant create view, create procedure, create trigger to role1;7.将创建的角色ROLE1授权给USERAgrant role1 to usera;8.撤销USERA中的CREATE VIEW权限revoke create view from role1;

03-15 00:57