1 / 9
文档名称:

数据库实验四报告.doc

格式:doc   大小:559KB   页数:9页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

数据库实验四报告.doc

上传人:1006108867 2018/11/24 文件大小:559 KB

下载得到文件列表

数据库实验四报告.doc

文档介绍

文档介绍:《数据库原理与应用》实验报告
实验名称:
班级:
学号:
姓名:
一、实验目的
(1)了解Oracle数据库中的用户管理,模式,权限管理和角色管理。
(2)掌握为用户分配权限的方法。
(3)了解为不同用户分配不同权限的目的及原因。
二、实验过程
,分别创建数据库内部用户user_one和user_two,创建时自己为用户分配帐户口令。
语句:
create user user_one
identified by 123456
default tablespace users
temporary tablespace temp
quota unlimited on users;
create user user_two
identified by 123456
default tablespace users
temporary tablespace temp
quota unlimited on users;
执行结果:

语句:
grant create session to user_one;
grant create session to user_two;
执行结果:
,在任何模式下删除表的权限,授予用户user_two可以在任何模式下创建表的权限,查询任何模式下表中数据的权限和在任何模式下创建视图的权限。
语句:
grant create table,drop any table to user_one;
grant create any table,create any view,select any table to user_two;
执行结果:
,写出相应的SQL语句验证为其授予的权限。(如果建立的表中有主键约束,需要预先授予user_one和user_two用户create any index的权限。)
语句:
create table t1 (a varchar2(10));
drop table ;
create table (b varchar2(10));
create view
as
select ,,ame,grade
from student,sc,course
where = and o=o and major='生物工程';
select ,,ame,grade
from student,sc,course
where = and o=o and major='生物工程';
执行结果:
,创建用户user_three,将角色权限DBA授予用户user_three,并将S、P、J、SPJ四张表导入到user_three模式下。
语句:
create user user_three