创建2个用户testA和testB,密码为testA、testB,
然后创建一个角色demo,并将建立连接、建表、建视图
及对scott用户的emp表的select等权限赋给该角色,
然后将该角色赋给testA和testB.
create user c##testA identified by testA;
create user c##testB identified by testB;
create role c##demo;
grant create session,create table,create view to c##demo;
grant select on c##scott.emp to c##demo;
grant c##demo to c##testA;
grant c##demo to c##testB;
本文介绍如何在数据库中创建用户testA和testB,并设置密码。随后创建角色demo,赋予创建会话、表和视图的权限,以及对scott用户的emp表进行查询的权限。最后,将此角色分配给两个用户。
348

被折叠的 条评论
为什么被折叠?



