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

Oracle 查看用户权限以及索引

1.查看所有用户
     select * from all_users; -------查看所有的用户
     select * from user_users; --------查看当前用户
2.查看用户或角色系统权限:
     select * from user_sys_privs; --------查看当前用户的权限
3.查看角色所包含的权限
     select * from role_sys_privs;   -------
4.查看用户对象权限
     select * from all_tab_privs;   --------查看所用的用户的可操作表权限
     select * from user_tab_privs; --------查看当前用户的表可操作权限
5.查看用户或角色所拥有的角色
     select * from user_role_privs;   ------查看当前用户的角色
查看表的约束条件包含:主键 外键。 以及索引
select * from user_constraints where TABLE_NAME='?';    -----查看某一个表的约束
select constraint_type,constraint_name,search_condition from all_constraints
where table_name='?';
select * from user_cons_columns where TABLE_NAME='?';   -----某一个约束的构成
select index_name,index_type,status,blevel from user_indexes where table_name = '?';   -----查看某一个表的所有索引
SELECT table_name, index_name, column_name, column_position from user_ind_columns WHERE table_name='?';    ----查看索引的构成


相关文档:

在oracle中关于树的sql

表task,字段id_,name_
id_的数据如下形式:
1
1.1
1.1.1
1.1.1.2
1.2
1.2.1
...
10
10.1
10.1.1
10.2.1
10.2.1.1
10.2.1.1.1
10.2.1.1.2
.......
注:“.”标识父子的关系。
现在通过id_查询树结构的效果,并且知道此节点是否为叶子节点leaf。。?
语句如下:
select
......

oracle 层次化查询

层次化查询:
select   [level],colomn,...from table
       [where where_clause]
       [   [start with start_condition]          [connect by prior prior_condition]&nbs ......

关于oracle的表空间,分区表,以及索引的总结


表空间:
Oracle的UNDOTBS01.DBF文件太大的解决办法
1、.禁止undo tablespace自动增长
alter   database   datafile   'full_path\undotbs01.dbf'   autoextend   off;
2.-- 创建一个新的小空间的undo tablespace
create undo tablespace undotBS2 datafile ......

在ORACLE得到某个表的主键字段名

select column_name from all_cons_columns cc
where owner='SSH'  --SSH为用户名称,要注意大小写
and table_name='SYS_DEPT' --SYS_DEPT为表名,注意大小写
and exists (select 'x' from all_constraints c
where c.owner = cc.owner
and c.constraint_name = cc.constraint_name
and c.constraint_type ='P' ......

oracle jobs批处理语句

--oracle jobs批处理命令参考
qlplus /nolog
connect sys/lee as sysdba
--以下两句在sys(即具有dba权限的用户)用户下执行
show parameter job_queue_processes;
alter system set job_queue_processes=10;
exit
sqlplus /nolog
connect jcy/jcy
ALTER TABLE T_OA_AFFICHE MODIFY (INPUT_TIME DATE);
ALTER TABLE ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号