zoukankan      html  css  js  c++  java
  • 查询用户权限

    select (case
             when ((select count(*) from dba_users where username = '&Username') > 0) then
              dbms_metadata.get_ddl('USER', '&Username')
             else
              to_clob('   -- Note: User not found!')
           end) Extracted_DDL
      from dual
    UNION ALL
    select (case
             when ((select count(*)
                      from dba_ts_quotas
                     where username = '&Username') > 0) then
              dbms_metadata.get_granted_ddl('TABLESPACE_QUOTA', '&Username')
             else
              to_clob('   -- Note: No TS Quotas found!')
           end)
      from dual
    UNION ALL
    select (case
             when ((select count(*)
                      from dba_role_privs
                     where grantee = '&Username') > 0) then
              dbms_metadata.get_granted_ddl('ROLE_GRANT', '&Username')
             else
              to_clob('   -- Note: No granted Roles found!')
           end)
      from dual
    UNION ALL
    select (case
             when ((select count(*)
                      from dba_sys_privs
                     where grantee = '&Username') > 0) then
              dbms_metadata.get_granted_ddl('SYSTEM_GRANT', '&Username')
             else
              to_clob('   -- Note: No System Privileges found!')
           end)
      from dual
    UNION ALL
    select (case
             when ((select count(*)
                      from dba_tab_privs
                     where grantee = '&Username') > 0) then
              dbms_metadata.get_granted_ddl('OBJECT_GRANT', '&Username')
             else
              to_clob('   -- Note: No Object Privileges found!')
           end)
      from dual
  • 相关阅读:
    JavaScript 操作 Cookie
    Java监控文件夹变化
    Cookie与Session的区别
    常用插件
    Plugin 'org.springframework.boot:springbootmavenplugin:' not found
    mysql安装(windows)
    idea 安装社区版
    linux安装tomcat
    将克隆的项目上传到自己的github
    tomcat安装配置
  • 原文地址:https://www.cnblogs.com/wolil/p/6757346.html
Copyright © 2011-2022 走看看