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

Oracle¶¯Ì¬ÐÔÄܱí

°´ÕÕOracleDocumentÖеÄÃèÊö£¬v$sysstat´æ´¢×ÔÊý¾Ý¿âʵÀýÔËÐÐÄÇ¿ÌÆð¾Í¿ªÊ¼ÀÛ¼ÆȫʵÀý(instance-wide)µÄ×ÊԴʹÓÃÇé¿ö¡£
ÀàËÆÓÚv$sesstat£¬¸ÃÊÓͼ´æ´¢ÏÂÁеÄͳ¼ÆÐÅÏ¢£º
1>.ʼþ·¢Éú´ÎÊýµÄͳ¼Æ(È磺user commits)
2>.Êý¾Ý²úÉú£¬´æÈ¡»òÕß²Ù×÷µÄtotalÁÐ(È磺redo size)
3>.Èç¹ûTIMED_STATISTICSֵΪtrue,Ôòͳ¼Æ»¨·ÑÔÚÖ´ÐвÙ×÷ÉϵÄ×Üʱ¼ä(È磺CPU used by this session)
v$sysstatÊÓͼ³£ÓÃÁнéÉÜ£º
l         STATISTIC#: ±êʶ
l         NAME: ͳ¼ÆÏîÃû³Æ
l         VALUE: ×ÊԴʹÓÃÁ¿
¸ÃÊÓͼ»¹ÓÐÒ»ÁÐclass-ͳ¼ÆÀà±ðµ«¼«ÉٻᱻʹÓ㬸÷ÀàÐÅÏ¢ÈçÏ£º
1 ´ú±íÊÂÀý»î¶¯
2 ´ú±íRedo buffer»î¶¯
4 ´ú±íËø
8 ´ú±íÊý¾Ý»º³å»î¶¯
16 ´ú±íOS»î¶¯
32 ´ú±í²¢Ðл
64 ´ú±í±í·ÃÎÊ
128 ´ú±íµ÷ÊÔÐÅÏ¢
×¢Ò⣺Statistic#µÄÖµÔÚ²»Í¬°æ±¾Öи÷²»Ïàͬ£¬Ê¹ÓÃʱҪÓÃName×öΪ²éѯÌõ¼þ¶ø²»ÒªÒÔstatistic#µÄÖµ×öΪÌõ¼þ¡£
ʹÓÃv$sysstatÖеÄÊý¾Ý
¡¡¡¡¸ÃÊÓͼÖÐÊý¾Ý³£±»ÓÃÓÚ¼à¿ØϵͳÐÔÄÜ¡£Èçbuffer cacheÃüÖÐÂÊ¡¢Èí½âÎöÂʵȶ¼¿É´Ó¸ÃÊÓͼÊý¾Ý¼ÆËãµÃ³ö¡£
¡¡¡¡¸ÃÊÓͼÖеÄÊý¾ÝÒ²±»ÓÃÓÚ¼à¿Øϵͳ×ÊԴʹÓÃÇé¿ö£¬ÒÔ¼°ÏµÍ³×ÊÔ´ÀûÓÃÂʵı仯¡£ÕýÒòÈç´Ë¶àµÄÐÔÄÜÊý¾Ý£¬¼ì²éijÇø¼äÄÚϵͳ×ÊԴʹÓÃÇé¿ö¿ÉÒÔÕâÑù×ö£¬ÔÚÒ»¸öʱ¼ä¶Î¿ªÊ¼Ê±´´½¨Ò»¸öÊÓͼÊý¾Ý¿ìÕÕ£¬½áÊøʱÔÙ´´½¨Ò»¸ö£¬¶þÕßÖ®¼ä¸÷ͳ¼ÆÏîÖµµÄ²»Í¬(end value - begin value)¼´ÊÇÕâһʱ¼ä¶ÎÄÚµÄ×ÊÔ´ÏûºÄÇé¿ö¡£ÕâÊÇoracle¹¤¾ßµÄ³£Ó÷½·¨£¬ÖîÈçStatspackÒÔ¼°BSTAT/ESTAT¶¼ÊÇÈç´Ë¡£
¡¡¡¡ÎªÁ˶ԱÈij¸öÇø¼ä¶ÎµÄÊý¾Ý£¬Ô´Êý¾Ý¿ÉÒÔ±»¸ñʽ»¯£¨Ã¿´ÎÊÂÎñ£¬Ã¿´ÎÖ´ÐУ¬Ã¿ÃëÖÓ»òÿ´ÎµÇ½£©£¬¸ñʽ»¯ºóÊý¾Ý¸üÈÝÒ×´ÓÁ½ÕßÖмø±ð³ö²îÒì¡£ÕâÀàµÄ¶Ô±ÈÔÚÉý¼¶Ç°£¬Éý¼¶ºó»ò½ö½öÏë¿´¿´Ò»¶Îʱ¼äÄÚÓû§ÊýÁ¿Ôö³¤»òÊý¾ÝÔö¼ÓÈçºÎÓ°Ïì×ÊԴʹÓ÷½Ãæ¸ü¼ÓʵÓá£
¡¡¡¡ÄãÒ²¿ÉÒÔʹÓÃv$sysstatÊý¾Ýͨ¹ý²éѯv$system_eventÊÓͼÀ´¼ì²é×ÊÔ´ÏûºÄºÍ×ÊÔ´»ØÊÕ¡£
V$SYSSTATÖеij£ÓÃͳ¼Æ
¡¡¡¡V$SYSSTATÖаüº¬¶à¸öͳ¼ÆÏÕⲿ·Ö½éÉÜÁËһЩ¹Ø¼üµÄv$sysstatͳ¼ÆÏÔÚµ÷ÓÅ·½ÃæÏ൱ÓÐÓá£ÏÂÁа´×ÖĸÏȺóÅÅÐò£º
Êý¾Ý¿âʹÓÃ״̬µÄһЩ¹Ø¼üÖ¸±ê£º
l         CPU used by this session£ºËùÓÐsessionµÄcpuÕ¼ÓÃÁ¿£¬²»°üÀ¨ºǫ́½ø³Ì¡£ÕâÏîͳ¼ÆµÄµ¥Î»ÊÇ°Ù·ÖÖ®xÃë.ÍêÈ«µ÷ÓÃÒ»´Î²»³¬¹ý10ms
l  


Ïà¹ØÎĵµ£º

Oracle JOB Ó÷¨Ð¡½á

Ò»¡¢ÉèÖóõʼ»¯²ÎÊý job_queue_processes
¡¡¡¡sql> alter system set job_queue_processes=n;£¨n>0£©
¡¡¡¡job_queue_processes×î´óֵΪ1000
¡¡¡¡
¡¡¡¡²é¿´job queue ºǫ́½ø³Ì
¡¡¡¡sql>select name,description from v$bgprocess;
¡¡¡¡
¡¡¡¡¶þ£¬dbms_job package Ó÷¨½éÉÜ
¡¡¡¡°üº¬ÒÔÏÂ×Ó¹ý³Ì£º
¡¡¡¡
¡¡ ......

Oracle³£ÓÃSQLÓï¾ä(PL/SQL developer¹¤¾ßϵÄ)

 ½¨±í
create table users(
id number(4) primary key,
username varchar2(10),
password varchar2(10)
)
²éѯ±í²¢½âËø±í(¼´¿ÉÒÔµã»÷ÊäÈë¿òÏÂÃæµÄ"Ëø"ͼ±ê¹¤¾ß, ¼´"Edit data")
select * from users for update
ɾ³ý±íÖжàÓàµÄÁÐ
alter table mobilephone drop column mobiletype
תÔØ
------------------- ......

ORACLE PL/SQL ¼¯ºÏAPI ×ܽá

ORACLE 10GµÄ¼¯ºÏAPI
 
¼¯ºÏAPI·½·¨×îÔçÊÇÔÚORACLE 8IÖÐÒýÈëµÄ¡£¼¯ºÏAPIÌṩÁ˼ò»¯·ÃÎʼ¯ºÏµÄ·½·¨¡£ÔÚORACLE 10GÒÔÇ°£¬ÕâЩ·½·¨È·Êµ¼ò»¯Á˶Լ¯ºÏµÄ·ÃÎÊ¡£µ«ÊÇ£¬²¢²»ÊÇ·ÇÒªÇóÕÆÎÕÕâЩ·½·¨²»¿É¡£´ÓORACLE 9IµÄINDEX-BY±íµ½ORACLE 10GµÄÁªºÏÊý×éµÄת»»£¬Ê¹ËüÃdzÉΪ±ØÐëÕÆÎյķ½·¨¡£
 
ÏÂÃæÊÇÎÒ´ÓÊéÉÏժ¼ÏµÄһР......

ORACLE CASEº¯Êý

Case¾ßÓÐÁ½ÖÖ¸ñʽ¡£¼òµ¥Caseº¯ÊýºÍCaseËÑË÷º¯Êý¡£
 
--¼òµ¥Caseº¯Êý
CASE sex
WHEN '1' THEN 'ÄÐ'
WHEN '2' THEN 'Å®'
ELSE 'ÆäËû' END
--CaseËÑË÷º¯Êý
CASE WHEN sex = '1' THEN 'ÄÐ'
WHEN sex = '2' THEN 'Å®'
ELSE 'ÆäËû' END
ÕâÁ½ÖÖ·½Ê½£¬¿ÉÒÔʵÏÖÏàͬµÄ¹¦ÄÜ¡£¼òµ¥Caseº¯ÊýµÄд·¨Ïà¶Ô±È½Ï¼ò½à ......

Éý¼¶oracleÖеÄJDK°æ±¾

 
Oracle×Ô8iÆð¾ÍÈ«ÃæÖ§³Öjava£¬µ«¸÷¸ö°æ±¾µÄoracleÖÐĬÈÏjdk°æ±¾¾ù²»Ïàͬ£¬oracle8iÖÐΪ jdk1.2,oracle9iÖÐΪjdk1.3,oracle10gÖÐΪjdk1.4~~ÖÁ±ÊÕßÐÐΪ֮¼Ê£¬µ±Ç°µÄ×îа汾Ϊjdk1.5 update 11.
Òò±ÊÕßjava¿ª·¢³öÉí£¬ÔÚ×öoracle¿ª·¢Öо­³£»áÓÃjavaÀ´À©Õ¹ oracle¹¦ÄÜ£¬µ«ÊÇÓÉÓÚoracle×Ô´øjdk°æ±¾¹ýµÍ£¬¿ÉÄÜ»áÔì³ÉһЩ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ