易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle grant

oracle grant
授权语句--select * from dba_users; 查询数据库中的所有用户
--alter user TEST_SELECT account lock; 锁住用户
--alter user TEST_SELECT account unlock; 给用户解锁
--create user xujin identified by   xujin; 建立用户
--grant create tablespace to xujin; 授权
--grant select on tabel1 to xujin; 授权查询
--grant update on table1 to xujin;
--grant execute on procedure1 to xujin 授权存储过程
--grant update on table1 to xujin with grant option; 授权更新权限转移给xujin用户,许进用户可以继续授权;
--收回权限
--revoke select on table1 from xujin1; 收回查询select表的权限;
--revoke all on table1 from xujin;
/*grant connect to xujin;
revoke connect from xujin
grant select on xezf.cfg_alarm to xujin;
revoke select on xezf.cfg_alarm from xujin;*/
--select table_name,privilege from dba_tab_privs where grantee='xujin' 查询一个用户拥有的对象权限
--select * from dba_sys_privs where grantee='xujin' 查询一个用户拥有的系统权限
--select * from session_privs --当钱会话有效的系统权限
--角色
--create role xujin1;--建立xujin1角色
--grant insert on xezf.cfg_alarm to xujin1; 将插入表的信息
--revoke insert on xezf.cfg_alarm from xujin1; 收回xujin1角色的权限
--grant xujin1 to xujin ; 将角色的权限授权给xujin;
-- create role xujin2;
--grant xujin1 to xujin2; 将角色xujin1授权给xujin2;
--alter user xujin default xujin1,xujin2; 修改用户默认角色
-- DROP ROLE xujin1;删除角色1;
--select * from role_sys_privs where role=xujin1;
--查看许进1角色下有什么系统权限;
--select granted_role,admin_option from role_role_privs where role='xujin2';
--查看xujin1角色下面有什么角色权限
--select * from role_sys_privs where role='xujin2';
--select table_name,privilege from role_tab_privs where role='xujin1';
--select * from dba_role_privs where grantee='xujin' --查看用户下面有多少个角色;


相关文档:

Oracle游标使用总结

游标(CURSOR)也叫光标,在关系数据库中经常使用,在PL/SQL程序中可以用CURSOR与SELECT一起对表或者视图
中的数据进行查询并逐行读取。
         Oracle游标分为显示游标和隐式游标。
         显示游标(Explicit Cursor):在PL/SQL ......

深度对比Oracle与SQL Server

一般的公司通常会在他们的信息系统架构中引入多种数据库平台,同时引入三到四种不同的RDBMS解决方案的中大型公司也并不少见,当然这些公司里面的DBA们通常也需要同时拥有管理多种不同平台的技能了。
只在一种平台上展开工作的数据库专家们也通常会期待着在他们的下一份工作中能学到点不一样的东西,那些有勇气的人们则愿意 ......

关于myeclipse中的DB Browser连接Oracle数据库的问题

我的myeclipse是6.5版, oracle是10.2.0.1的中文版.
   myeclipse启动是英文的,DB Browser死活连不上oracle,报两个错误(具体不记得了).后来看了如下文章,知道了原因。
---------------------------------------------------------------------------------------------------------------------------
Hi,
a ......

Oracle 多行转列函数

Oracle中使用WMSYS.WM_CONCAT函数进行多行转列
原数据:
rank   name 
AA      NAME1
AA      NAME2
AA      NAME3 
BB      NAME4
BB      NAME5
SQL>select  trim(t.rank) as rank,
   &nbs ......

关于oracle的小知识

select trunc(sysdate ,'yyyy') from dual   --本年度第一天
              
select trunc(sysdate ,'mm') from dual     --本月第一天
           &nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号