《数据库原理与应用》实验报告实验名称:学号:班级:姓名:一、实验目的(1)了解 Oracle 数据库中的用户管理,模式,权限管理和角色管理
(2)掌握为用户分配权限的方法
(3)了解为不同用户分配不同权限的目的及原因
二、实验过程1.用系统帐户 sys 登录数据库,分别创建数据库内部用户 user_one 和 user_two,创建时自己为用户分配帐户口令
语句:create user user_oneidentified by 123456default tablespace userstemporary tablespace tempquota unlimited on users;create user user_twoidentified by 123456default tablespace userstemporary tablespace tempquota unlimited on users;执行结果:1 / 92.为了使两位用户登录数据库请为其授予相应的权限
语句:grant create session to user_one;grant create session to user_two;执行结果:3.授予用户user_one 在自己模式下创建表的权限,在任何模式下删除表的权限,授予用户 user_two 可以在任何模式下创建表的权限,查询任何模式下表中数据的权限和在任何模式下创建视图的权限
语句:grant create table,drop any table to user_one;grant create any table,create any view,select any table to user_two;执行结果:2 / 94.分别用 user_one 和 user_two 登录,写出相应的 SQL 语句验证为其授予的权限