Hit Ratio For ORACLE
1.Share Pool Freeselect pool,name,bytes/1024/1024 m from v$sgastat where name='free memory' and pool='shared pool';2.Share Pool Hit RatioSELECT(1- ROUND(BYTES /(4096*1024*1024),2))*100|| '%' FROM V$SGASTAT WHERE NAME= 'free memory' AND POOL = 'shared pool';3.Buffer Cache Hit Ratioselect 1 - ((physical.value - direct.value - lobs.value) / logical.value) "Buffer Cache Hit Ratio" from v$sysstat physical,v$sysstat direct,v$sysstat lobs,v$sysstat logicalwhere physical.name = 'physical rea
Alter table for ORACLE
1.create tablecreate table test (a varchar2(10),b number(2));2.rename tablealter table test rename to txt;rename txt to test;3.add columnalter table test add c varchar2(10);alter table test add (c varchar2(10),d number(5));4.rename columnalter table test rename column a to b;5.alter columnalter table test modify a varchar(10);alter table test modify b varchar(10);5.drop columnalter table test drop column a;[@more@]
Mac address setting For Redhat
临时生效:# ifconfig eth0 down# ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx# ifconfig eth0 up永久生效:# vi /etc/sysconfig/network-scripts/ifcfg-eth0HWADDR=xx:xx:xx:xx:xx:xx[@more@]
ORA-01795 For ORACLE 10G
ORA-01795:maximum number of expressions in a list is 1000原因:在SQL语句时,WHERE中的某一个条件采用IN的方式,但是由于数据过多则产生错误,oracle中in列表不能超过1000。解决办法:1.采用多个in ,原来in (1-2000) 写成 in(1-1000) or in(1001-2000)外部再生成一个Set 按100条一次,if(set.isempty==fasle) 再执行剩下的2.采用join 链接。(update 没有测试过)3.降低In中列表元素的数量4.直接采用循环,效率比较低 参考网址:http://nickkathy.javaeye.com/blog/399452[@more@]
ORA-27300 For AIX6.1
系统进程数超出 maxuproc的最大值,导致DB Client无法连接Wed Aug 4 14:00:15 2010Process startup failed, error stack:Wed Aug 4 14:00:15 2010Errors in file /ora103/admin/STCSAPP/bdump/stcsapp_psp0_2314532.trc:ORA-27300: OS system dependent operation:fork failed with status: 11ORA-27301: OS failure message: Resource temporarily unavailableORA-27302: failure occurred at: skgpspawn3Wed Aug 4 14:00:16 2010Process J001 died, see its trace fileWed Aug 4 14:00:16 2010kkjcre1p: unable to spawn jobq sla
NTP时间同步 For AIX
1.查看当前时区$echo $TZ2.更改时区# chtz BEIST-8 --(BEIST-8) Peoples Rep. China (CUT +8)3.客户端查询ntp server,并调整时间# ntpdate -d xxx.xxx.xxx.xxx# date# ntpdate xxx.xxx.xxx.xxx# date4.在client端上添加ntp server# vi /etc/ntp.conf内容如下:#broadcastclientserver xxx.xxx.xxx.xxxdriftfile /etc/ntp.drifttracefile /etc/ntp.trace5.start xntpd on client# startsrc -s xntpd6.重起后xntpd自动起动# smitty xntpdStart Using the xntpd Subsystem > BOTH7.查看xntpd状态# lssrc -g tcpip# lssrc -ls xntpd --当
Activity Monitor log保存时间调整
/* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.5pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font
登陆sqlplus hang /telnet很慢 for Aix
方法一:vi /etc/netsvc.conf 更改为hosts=local方法二:vi /etc/netsvc.conf 更改为hosts=local,bind,nis vi /etc/resolv.conf添加nameserver X.X.X.X [@more@]