用户、概要文件、权限和角色的应用实例

用户、概要文件、权限和角色的应用实例

SQL>CREATE ROLE change identified by zhubajie;--建角色
sql>select * from dba_roles where role='CHANGE';
sql>grant select any table to change;
sql>select * from role_sys_privs where role='CHANGE';
SYS=>SQL>create user sudaji identified by szhouwang default tablespace pioneer_data  --建用戶
 temporary  tablespace pioneer_temp
 quota 38m on pioneer_data quota 28m on pioneer_indx
 profile pioneer_prof;
sys>grant  connect,resource,change to sudaji; --授权
sys>alter user sudaji default role all except change;  --只将角色change改为sudaji用户的非默认角色
SQL> select d.username,d.default_tablespace,d.temporary_tablespace,d.profile ,d.created from dba_users d where d.default_tablespace like 'PI%'; --验证
SQL> select username,tablespace_name,bytes/1024/1024 mb,max_bytes/1024/1024 "MAX MB" FROM DBA_TS_QUOTAS WHERE USERNAME='SUDAJI';-- 验证磁盘上限

注意:作为数据库管理员,在执行任何命令后,最好亲自验证一下(如通过数据字典查询一下)

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

«    2025年4月    »
123456
78910111213
14151617181920
21222324252627
282930
搜索
标签列表
网站分类
最新留言
    文章归档
    友情链接

    Powered By Z-BlogPHP 1.7.3

    Copyright Your WebSite.Some Rights Reserved.闽ICP备11018667号-2