Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Oracle ³£Óüà¿ØSQL

1.¼à¿ØÊÂÀýµÄµÈ´ý£º
         select event,sum(decode(wait_time,0,0,1)) prev, sum(decode(wait_time,0,1,0)) curr,count(*)
from v$session_wait
group by event order by 4;
2.»Ø¹ö¶ÎµÄÕùÓÃÇé¿ö£º
select name,waits,gets,waits/gets ratio from v$rollstat a,v$rollname b where a.usn=b.usn;
3.¼à¿Ø±í¿Õ¼äµÄI/O±ÈÀý£º
select df.tablespace_name name,df.file_name "file",f.phyrds pyr,f.phyblkrd pbr,f.phywrts pyw,
f.phyblkwrt pbw
from v$filestat f,dba_data_files df
where f.file#=df.file_id
4.¼à¿ÕÎļþϵͳµÄI/O±ÈÀý£º
select substr(a.file#,1,2) "#",substr(a.name,1,30) "name",a.status,a.bytes,
b.phyrds,b.phywrts
from v$datafile a,v$filestat b
where a.file#=b.file#
5.ÔÚij¸öÓû§ÏÂÕÒËùÓеÄË÷Òý£º
select user_indexes.table_name, user_indexes.index_name,uniqueness, column_name
from user_ind_columns, user_indexes
where user_ind_columns.index_name = user_indexes.index_name
and user_ind_columns.table_name = user_indexes.table_name
order by user_indexes.table_type, user_indexes.table_name,
user_indexes.index_name, column_position;
6. ¼à¿Ø SGA µÄÃüÖÐÂÊ
select a.value + b.value "logical_reads", c.value "phys_reads",
round(100 * ((a.value+b.value)-c.value) / (a.value+b.value)) "BUFFER HIT RATIO"
from v$sysstat a, v$sysstat b, v$sysstat c
where a.statistic# = 38 and b.statistic# = 39
and c.statistic# = 40;
7. ¼à¿Ø SGA ÖÐ×ֵ仺³åÇøµÄÃüÖÐÂÊ
select parameter, gets,Getmisses , getmisses/(gets+getmisses)*100 "miss ratio",
(1-(sum(getmisses)/ (sum(gets)+sum(getmisses))))*100 "Hit ratio"
from v$rowcache
where gets+getmisses <>0
group by parameter, gets, getmisses;
8. ¼à¿Ø SGA Öй²Ïí»º´æÇøµÄÃüÖÐÂÊ£¬Ó¦¸ÃСÓÚ1%
select sum(pins) "Total Pins", sum(reloads) "Total Reloads",
sum(reloads)/sum(pins) *100 libcache
from v$librarycache;
select sum(pinhits-reloads)/sum(pins) "hit radio",sum(reloads)/sum(pins) "reload perc


Ïà¹ØÎĵµ£º

Oracle blobÀàÐÍ Êµ¼ù

BLOBµÄº¬Òå¡¡¡¡
      BLOB (binary large object)£¬¶þ½øÖÆ´ó¶ÔÏó£¬ÊÇÒ»¸ö¿ÉÒÔ´æ´¢¶þ½øÖÆÎļþµÄÈÝÆ÷¡£
¡¡¡¡ÔÚ¼ÆËã»úÖУ¬BLOB³£³£ÊÇÊý¾Ý¿âÖÐÓÃÀ´´æ´¢¶þ½øÖÆÎļþµÄ×Ö¶ÎÀàÐÍ¡£
¡¡¡¡BLOBÊÇÒ»¸ö´óÎļþ£¬µäÐ͵ÄBLOBÊÇÒ»ÕÅͼƬ»òÒ»¸öÉùÒôÎļþ£¬ÓÉÓÚËüÃǵijߴ磬±ØÐëʹÓÃÌØÊâµÄ·½Ê½À´´¦Àí£¨ÀýÈ磺ÉÏ´«¡ ......

Oracle DBLinkµÄʹÓÃ


ÔÚ×öÓ¦ÓÃϵͳ¿ª·¢Ê±£¬ÎÒÃÇ»áÓöµ½Ò»¸öÎÊÌ⣬¾ÍÊÇÎÒÃÇÓ¦ÓÃϵͳÓÐЩÊý¾ÝÐèÒª´ÓÆäËûÊý¾Ý¿âµÄijһÕűíÄõ½Êý¾Ý£¬ÄÇÎÒÃÇÓ¦¸ÃÔõô°ì£¿±ÈÈ磺×Ó¹«Ë¾µÄÏúÊÛϵͳÐèÒª´Ó¹ãÖÝ×ܲ¿ÈËÁ¦×ÊÔ´¹ÜÀíϵͳµÄÊý¾Ý¿âµ±ÖлñÈ¡×îеÄÓû§ÐÅÏ¢£¬ÄÇÎÒÃÇÓ¦¸ÃÔõôʵÏÖ£¿ÊµÏÖÏÖÔÚµÄ×ö·¨Óкܶ࣬¿ÉÒÔͨ¹ýWebService·½Ê½»ñÈ¡£¬µ«¿ª·¢³É±¾»¹ÊDZȽϸߣ¬¼ÙÉè ......

OracleÖвéѯ±íµÄ´óСºÍ±í¿Õ¼äµÄ´óС

ÓÐÁ½ÖÖº¬ÒåµÄ±í´óС¡£Ò»ÖÖÊÇ·ÖÅä¸øÒ»¸ö±íµÄÎïÀí¿Õ¼äÊýÁ¿£¬¶ø²»¹Ü¿Õ¼äÊÇ·ñ±»Ê¹Ó᣿ÉÒÔÕâÑù²éѯ»ñµÃ×Ö½ÚÊý£º
select segment_name, bytes
from user_segments
where segment_type = 'TABLE';
»òÕß
   Select Segment_Name,Sum(bytes)/1024/1024 from User_Extents Group By Segment_Name
ÁíÒ»ÖÖ±íʵ¼ÊÊ¹Ó ......

oracleѧϰ±Ê¼Ç1 ¼òµ¥³£Ê¶

Ä¿Ç°Ö÷Á÷Êý¾Ý¿â£º
       ΢Èí£ºsql serverºÍaccess
       ÈðµäMySql£ºAB¹«Ë¾mysql
       IBM¹«Ë¾£ºDB2¡¢
       ÃÀ¹úSybase¹«Ë¾£ºSybase
       IBM¹«Ë¾ ......

sql serverºÍoracleµÄÇø±ð

1£®OracleΪ¿Í»§¶Ë¿ªÆô»á»°ÓÐÁ½ÖÖ·½Ê½£º¹²Ïí·þÎñºÍרÓ÷þÎñ¡£ÔÚרÓ÷þÎñÇé¿öÏ£¬¼àÌýÆ÷ΪÁ¬½ÓÇëÇó´´½¨Ð½ø³Ì£¨Unix»·¾³ÏÂÊÇProcess£¬WindowsÏÂÎÒÏëÓ¦¸ÃÊÇThread°É£©£»¹²Ïí·þÎñÇé¿öÏ£¬¼àÌýÆ÷½«¿Í»§ÇëÇ󽻸øDispatcher£¬ÓÉDispatcher°²ÅŶà¿Í»§µÄ×÷Òµ¡£SQL ServerÔÚĬÈÏÇé¿öÏÂ×Ô¶¯Îª¿Í»§¶ËÁ¬½Ó´´½¨Ị̈߳¬µ±Óзdz£¶àµÄ¿Í ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ