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;
相关文档:
输入参数:str ——要截取的字符串, ch——要查找的字符串
截取ch之前(不包括ch)的字符串: substr(str, 0, instr(str, ch) - 1)
截取ch之后(不包括ch)的字符串: substr(str, , instr(str, ch) + 1, length(str)) ......
15. /*+USE_CONCAT*/
对查询中的WHERE后面的OR条件进行转换为UNION ALL的组合查询. (懵懂啊,先存着)
例如:
select /*+use_concat */ * from emp where deptno=10 OR empno=7788;
Execution Plan
----------------------------------------------------------
0 S ......
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 ......
有很多应用项目, 刚起步的时候用MYSQL数据库基本上能实现各种功能需求,随着应用用户的增多,数据量的增加,MYSQL渐渐地出现不堪重负的情况:连接很慢甚至宕机,于是就有把数据从MYSQL迁到ORACLE的需求,应用程序也要相应做一些修改。本人总结出以下几点注意事项,希望对大家有所帮助。
1.自动增长的数据类型处理
MYSQL有 ......
Wait Problem Potential Fix Sequential Read Indicates many index reads—tune the code (especially joins) Scattered Read Indicates many full table scans—tune the code; cache small tables ......