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

Oracle用户管理

--创建表空间
create tablespace 名称
(
datafile='路径\名称.ora',
size='50M',
autoextend='on'
)
/
--创建临时表空间
create temporary tablespace 名称
(
tempfile='路径\名称.ora',
size='50M',
autoextend='on'
)
/
--创建用户
create user 用户名  idtenified  by 密码
/
--为用户指定表空间与临时表空间
alter 用户名 default tablespace 表空间名
alter 用户名 temporary tablespace 临时表空间名
/
--为用户授权
Grant connect,resource,create session(连接),
dba, create table, create view, create trigger,
select any table, create sequence, create procedure, create role,
grant any privilege, drop any role,
create public synonym, drop public synonym,SELECT ANY DICTIONARY to 用户名
/
---或者直接赋予oracle提供的角色权限
grant resource,connect to 用户名
/
--修改用户密码
alter user 用户名 idtenified by 新密码
/
--让用户密码失效
alter user 用户名 password expire
/
 --锁住用户
alter user 用户名 account lock;
/
--释放用户
alter user 用户名 account  unlock;
/
--访问其他用户的表
grant select,delete,... on 用户名1.表 to 用户名2;
/
---回收权限
revoke select,delete,....on 用户名1.表 from 用户名2;


相关文档:

Oracle的优化器有两种优化方式(二)

15. /*+USE_CONCAT*/
对查询中的WHERE后面的OR条件进行转换为UNION  ALL的组合查询. (懵懂啊,先存着)
例如:
select /*+use_concat */ * from emp where deptno=10 OR empno=7788;
Execution Plan
----------------------------------------------------------
   0      S ......

Oracle复杂查询

1、查询两个日期之间的数据。
假设有表Table1,其创建表的sql语句为:
create table Table1(
StationID    NUMBER(10) Primary key,
Year           NUMBER(4)  not null,
Month        NUMBER(2)  n ......

Oracle Waits event:DB File Scattered Read

The DB File Scattered Read wait event generally indicates waits related to full table scans or fast
full index scans. As full table scans are pulled into memory, they are scattered throughout the
buffer cache, since it is usually unlikely that they fall into contiguous buffers. A large numb ......

linux上使用rlwrap 解决oracle可以上下键查看命令

linux 上的oracle sqlplus 不能利用 上, 下 键来查看命令,搜索到解决问题的办法,整理如下
安装软件rlwrap可以解决这个问题,该软件是用c写的程序
官方下载地址:http://utopia.knoware.nl/~hlub/uck/rlwrap/
安装过程:
我们也可以查看解压后的tar包,查看README帮助文件
shell>tar -zxvf rlwrap-0.36.tar.gz
sh ......

查看Oracle执行计划的几种方法

查看Oracle执行计划的几种方法
一、通过PL/SQL Dev工具
    1、直接File->New->Explain Plan Window,在窗口中执行sql可以查看计划结果。其中,Cost表示cpu的消耗,单位为n%,Cardinality表示执行的行数,等价Rows。
    2、先执行 EXPLAIN PLAN FOR   select * from tab ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号