-
May182012
命令版:
[root@oracle ~]# ps -ef | grep httpd
[root@oracle ~]# ps -ef|grep httpd|grep -v grep|awk ‘{print “kill -9 “$2}’|sh
kill -9 1708
kill -9 1711
kill -9 1712
kill -9 1713
kill -9 1714
kill -9 1715
kill -9 1716
需要杀掉某一类进程的时候,如何批量杀掉这些进程,使用awk命令是很好的选择。
ps -ef|grep aaa|grep -v grep|awk ‘{print “kill -9 ” $2}...阅读全文
-
May152012
错误提示:
hecking operating system package requirements …
Check complete. The overall result of this check is: Not executed <<<<
OUI-11108: Packages information not specified.
Recommendation: Install the required packages before continuing with the installation.
=======================================================================
原因
由...阅读全文
-
May022012
1.下载 rhel-server-6.0-i386-boot.iso
ed2k://|file|rhel-server-6.0-i386-boot.iso|193564672|060813a630095f5c7c3ad0a628f76ae7|/
2.用 UltraISO 打开 rhel-server-6.0-i386-boot.iso,点击 “启动” — “写入硬盘映像…”,写入方式USB-HDD+,使U盘成为启动U盘.
3.将 rhel-server-6.1-i386-dvd.iso 复制到U盘中重命名为rhel-server-6.0-i386-dvd.iso
—R...阅读全文
-
Apr262012
查询语句的别名就是视图
可以将复杂的语句变得简单,可以保护数据,
create view as select……;
create or replace view as select ……;
drop view ;
user_views 存放在该数据字典中
select ename,dname,sal,grade from emp join dept using(deptno)
保护数据 read only 试图只读
SQL> create or replace view ve2 as select * from emp with read only;
从11g...阅读全文
-
Apr262012
加速访问行的速度
提高select的速度 会减慢insert update的速度
全表扫描:扫描玩所有的行,再返回需要的行
根据rowid扫描:只适合连续的行进行扫描
索引扫描:建立索引资料库,
建立索引
create index on
create unique index on ….
create bitmap index on …
user_indexes
user_ind_columns 和索引相关的2个数据字典
索引的禁用和启用
alter index te_sa_i ...阅读全文
-
Apr262012
create table
alter table
drop table
truncate table
表:由行和列构成,是存储数据的载体
库
用户
表
表空间 数据文件
段
区
内存块 硬盘块
用户下的表 用户.表 scott.emp 不是数据库下的表
一个用户下有了表(也叫做对象),那个用户就叫做schema(模式) schema的名字就是用户名
表也是对象的一种 用户.
用户.对象 用户后...阅读全文
-
Apr262012
谁的工资最高
SQL> select max(sal) from emp;
select max(sal) from emp;
MAX(SAL)
———-
5000
SQL> select ename from emp where sal=5000;
select ename from emp where sal=5000;
ENAME
——————–
KING
SQL>
select …. from where column | exprt (select ….from …)
在select语句中使用()调用...阅读全文
-
Apr262012
最好用on的方式做多表查询
找表中的列是否满足等值条件,是否满足不等的条件。
表中记录的值有一个值相同,就可以做等值连接,即使列名不同。用 on
表中记录的值与另一个列值满足 > = select ename,sal,grade from emp,salgrade where emp.sal between salgrade.losal and salgrade.hisal;
两种写法
SQL> select ename,sal,grade from emp join salgrade on emp.sal betw...阅读全文