动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Oracle教程 ]的信息

本月文章推荐
.Oracle9i 数据库管理实务讲座(五.
.解决物化视图刷新过程中的约束冲.
.Inside Oracle9i Tablespace Man.
.在 RedHat 环境手工建立tunnel.
.linux日志管理(三).
.关于临时表(from metalink).
.Oracle安全性管理采取的基本措施.
.Oracle的TNS-12502错误原因及解决.
.Oracle 9iAS配置运行FORM、Report.
.神秘的 ORACLE DUAL.
.教会你掌握oracle外表.
.数据库人员手册之输出Oracle对象.
.Oracle 数据库集中复制方法逐步精.
.ORACLE SQL性能优化系列(七) .
.在Oracle中重新编译所有无效的存.
.教你在Windows环境下Kill掉Oracl.
.闪回查询(Flashback Query).
.如何自动获取Oracle数据库启动时.
.如何恢复一个只有完好数据文件的.
.实例讲解Oracle的快速删除和快速.

如何获得某个用户对某个对象的访问权限

发表日期:2008-2-9 |


    与权限相关的数据字典 SQL> select * from dict where table_name like '%PRIVS' or table_name like '%ROLE%'; TABLE_NAME                                                           COMMENTS
-----------------------------------------------------------------------------------------------
ALL_TAB_PRIVS All object grants where the user or public is grantee
ALL_TAB_PRIVS_MADE All object grants made by user or on user owned objects
ALL_TAB_PRIVS_RECD All object grants to user or public
DBA_SYS_PRIVS System privileges granted to users and roles
DBA_ROLES List of all roles in the database
DBA_ROLE_PRIVS Roles granted to users and to other roles
ROLE_ROLE_PRIVS Roles granted to other roles
ROLE_SYS_PRIVS System privileges granted to roles
ROLE_TAB_PRIVS Table privileges granted to roles
SESSION_PRIVS All privileges currently available to user
SESSION_ROLES All roles currently available to user
USER_SYS_PRIVS System privileges granted to current user
USER_TAB_PRIVS Grants on objects where current user is grantee, grantor, or owner     主要介绍***_TAB_PRIVS DBA_TAB_PRIVS:  Name                         Null?    Type
 ---------------------------- -------- ----------------------------
 GRANTEE                      NOT NULL VARCHAR2(30) <== Receiver of privilege
 OWNER                        NOT NULL VARCHAR2(30)
 TABLE_NAME                   NOT NULL VARCHAR2(30)
 GRANTOR                      NOT NULL VARCHAR2(30) <-- Giver of privilege
 PRIVILEGE                    NOT NULL VARCHAR2(40)
 GRANTABLE                             VARCHAR2(3) <-- Grantee has ability to grant privilege to others
    DBA_TAB_PRIVS 数据字典表纪录了所有数据库对象的授权情况,这些对象包括表,视图,存储过程等。利用这个视图可以生成数据库对象的权限脚本
    Oracle数据库权限主要分为2类:对象访问权限(tables, indexes, views...)  和 系统权限(create session, create table, create user...). DBA_TAB_PRIVS  只记录 对象访问权限。     其他相关视图: ALL_TAB_PRIVS  All object grants where the user or public is grantee
ALL_TAB_PRIVS_MADE All object grants made by user or on user owned objects
ALL_TAB_PRIVS_RECD All object grants to user or public
DBA_SYS_PRIVS  System privileges granted to users and roles
DBA_ROLES  List of all roles in the database
DBA_ROLE_PRIVS  Roles granted to users and to other roles
ROLE_ROLE_PRIVS  Roles granted to other roles
ROLE_SYS_PRIVS  System privileges granted to roles
ROLE_TAB_PRIVS  Table privileges granted to roles
SESSION_PRIVS  All privileges currently available to user
SESSION_ROLES  All roles currently available to user
USER_SYS_PRIVS  System privileges granted to current user
USER_TAB_PRIVS  Grants on objects where current user is grantee, grantor, or owner     获得用户的对象权限script UT1> l
  1  select   grantee,
  2           privilege,
  3           grantable  "Adm",
  4           owner,
  5           table_name
  6  from     sys.dba_tab_privs
  7  where    grantee  =  upper('&usernm')
  8* order by grantee, owner, table_name, privilege   GRANTEE      PRIVILEGE  Adm OWNER        TABLE_NAME
  ------------ ---------- --- ------------ -------------------------
  SEFIN        DELETE     NO  SYSTEM       SRW_FIELD
               INSERT     NO  SYSTEM       SRW_FIELD
               SELECT     NO  SYSTEM       SRW_FIELD
               UPDATE     NO  SYSTEM       SRW_FIELD  set echo off
 rem
 rem  19980729  M D Powell   New script.
 rem
 set verify off
 set pagesize 0
 set feedback off
 spool grt_&&owner._&&table_name..sql
 select 'REM  grants on &&owner..&&table_name'
 from sys.dual ;  select 'grant 'privilege' on 'lower(owner)'.'
         lower(table_name)' to 'grantee
         decode(grantable,'YES',' with grant option',NULL)
         ' ;'
 from   sys.dba_tab_privs
 where  owner      = upper('&&owner')
 and    table_name = upper('&&table_name')
 order by grantee, privilege ;  spool off
 undefine owner
 undefine table_name Sample output:  grant INDEX on jit.wo_master to EDSJIT ;
 grant INSERT on jit.wo_master to EDSJIT with grant option ;
 grant REFERENCES on jit.wo_master to EDSJIT ;
 grant SELECT on jit.wo_master to EDSJIT with grant option ;
 
    当在开发数据库上丢失了对象权限的时候,可以在产品数据库上运行该script获得丢失的授权脚本。 
上一篇:oracle10g初始化参数说明一 人气:579
下一篇:如何知道表记录最后被更新的时间 人气:623
浏览全部Oracle教程的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-9-5 Coppermine Photo Gallery v1.4.
2008-9-5 清松网络日记本 v2.4
2008-9-5 AyWeb企业网站管理系统 v2.3 bui
2008-9-5 美女写真小偷程序联盟 v3.0 buil
2008-9-5 老Y文章管理系统 v2.1
2008-9-5 SiteDynamic企业网站管理系统 v1
2008-9-5 MyCOM企业网站管理系统 v1.0 Bui
2008-9-5 乐风CMS影视版 2008
2008-9-5 幻影电影视频系统TvsCms v1.3 伪
2008-8-23 Mini WinMount V0.4
2008-8-23 Vista优化大师3.11正式版
2008-8-23 Wine 1.13
2008-8-23 KlipFolio 5.0 Build 5899-80
2008-8-23 Windows Sysinternals Desktops
2008-8-23 OneTap Movies1.2破解版
2008-8-23 AnnotaterPDF阅读1.1.503 破解版
2008-8-23 SoundMeter分贝测量仪 v1.0汉化破
2008-8-23 iDrum音乐节拍1.0破解版
  发表评论
姓 名: 验证码:
内 容:
站长工具:网站收录查询 | Google PR查询 | ALEXA排名查询 | CSS在线编辑器 | 广告代码 | Html转换js | js/vbs加密 | md5加密 | 进制转换
实用工具:汉字翻译拼音 | 符号对照表 | 个税计算 | 经典小工具 | 汉字简繁转换 | 普通单位换算 | 公制单位换算 | 生辰老黄历 | 国内电话区号 国家代码与域名缩写 | 文字加密解密 | 健康查询 | 万年历 | 汉字横竖排版 | 手机号码查询 | 计算器 | ip搜索
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号
ホームページ制作 不動産検索システム 求人情報
防水工事·改修工事 フットサル大会 探偵