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

ORACLE ÄÚ´æ¹ÜÀí


Oracle 9i¶¯Ì¬SGA¹ÜÀí
ÔÚOracle 9iÖУ¬¿ÉÒÔÉèÖÃSGA_MAX_SIZE£¬¸Ã²ÎÊýÓÃÒÔ¿ØÖƸ÷»º³å³ØʹÓõÄÄÚ´æ×ܺͣ¬±¾ÖÊÉÏÊÇÔÚ½ø³ÌÖÐÔ¤ÏÈ·ÖÅäÒ»¶ÎÐéÄâµØÖ·±¸Óöø²»·ÖÅäÎïÀíÄڴ棬ĿµÄÊÇ·ÀÖ¹ºÍ½ø³Ç˽ÓеØÖ·¶ÎµÄ³åÍ»¡£
Ö»Òª×ܵÄSGAÄÚ´æÉèÖò»³¬¹ýSGA_MAX_SIZEµÄÉèÖ㬸ü¸Ä¶¼¿ÉÒÔÁ¢¼´ÉúЧ¡£ÐèҪעÒâµÄÊÇ£¬ÔÚOracle 9iR1ÖУ¬¶¯Ì¬¼õСÄÚ´æÉèÖûᴥ·¢Ò»Ð©Bug¡£
µ±ÔÚ¶¯Ì¬ÐÞ¸ÄÄÚ´æ²ÎÊýʱ£¬ÐèҪעÒ⣺
Ð޸ĵÄÄÚ´æ´óС±ØÐëÊÇÁ£¶È´óС(GRANULE)µÄÕûÊý±¶£¬·ñÔò»á×Ô¶¯ÏòÉÏÈ¡Õû£»
SGAµÄ×Ü´óС²»Äܳ¬¹ýSGA_MAX_SIZE£»
SGA×îµÍÅäÖÃΪ3¸öÁ£¶È£¬Ò»¸öÁ£¶ÈÓÃÓڹ̶¨µÄSGA(°üÀ¨ÖØ×ö»º³åÇø)£¬Ò»¸öÁ£¶ÈÓÃÓÚ»º³åÇø¸ßËÙ»º´æ£¬Ò»¸öÁ£¶ÈÓÃÓÚ¹²Ïí³Ø¡£
°éË涯̬SGA¹ÜÀíµÄÐÂÌØÐÔ£¬OracleÍƳöÁËһϵÁÐÄÚ´æÉèÖý¨Ò鹦ÄÜ£¬Í¬Ê±ÒýÈëÁËһϵÁж¯Ì¬ÐÔÄÜÊÓͼ£º
SQL> select tname from tab
 2 where tname like '%ADVICE%';
 
TNAME
------------------------------
GV_$DB_CACHE_ADVICE
GV_$MTTR_TARGET_ADVICE
GV_$PGATARGET_ADVICE_HISTOGRAM
GV_$PGA_TARGET_ADVICE
GV_$SHARED_POOL_ADVICE
V_$DB_CACHE_ADVICE
V_$MTTR_TARGET_ADVICE
V_$PGA_TARGET_ADVICE
V_$PGA_TARGET_ADVICE_HISTOGRAM
V_$SHARED_POOL_ADVICE
 
»º³åÇø¸ßËÙ»º´æ½¨ÒéÊܳõʼ»¯²ÎÊýDB_CACHE_ADVICE¿ØÖÆ£¬¸Ã²ÎÊýΪ¶¯Ì¬²ÎÊý£¬¿ÉÓõÄÖµÓУº
OFF£º¹Ø±Õ½¨Òé²¢ÇÒ²»Îª½¨Òé·ÖÅäÄڴ棻
ON£º¿ªÆô½¨Òé²¢ÇÒCPUºÍÄڴ濪Ïú¶¼»á·¢Éú£»
READY£º¹Ø±Õ½¨Ò鵫ÊÇÈÔÈ»±£´æΪ½¨Òé·ÖÅäµÄÄÚ´æ¡£
SQL> show parameter db_cache_advice
NAME                                TYPE       VALUE
------------------------------------ ----------- ------------------------------
db_cache_advice                     string     ON
 
SQL> select id,name,block_size,size_for_estimate sfe,size_factor sf,
 2 estd_physical_read_factor eprf,estd_physical_reads epr
 3 from v$db_cache_advice;
       ID NAME 


Ïà¹ØÎĵµ£º

jdbcÁ¬½ÓOracle

      ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
    ½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
    ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
    Ê×ÏÈ£¬Ô ......

an example to insert data into Oracle Clob

 Step1. Insert empty_clob() into the Clob column of Oracle
Step2. Set autocommit to false
Step3. Select Clob as oracle.sql.CLOB from database
Step4. Insert String into Clob
Step5. Commit
Example:
import java.sql.*;
import java.io.*;
import oracle.jdbc.driver.OracleResultSet;
......

ORACLE²éѯϵͳÖÐ×èÈûÇé¿ö~

ÔÚORACLEÖо­³£»áÅöµ½×èÈûµÄÇé¿ö·¢Éú£¬Õâ¸öʱºòÎÒÃǾÍÐèÒª¿ìËÙµÄÕÒ³öµ¼ÖÂ×èÈûµÄÔ­Òò£¬²¢¾¡¿ìÅųýËü£¬ºÃÈÃϵͳÖØÐÂÕý³£ÔËÐС£
ÏÂÃæÒÔËÀËøΪÀý£¬À´¿´¿´ÈçºÎÕÒ³öµ¼ÖÂ×èÈûµÄ»á»°²¢½â¾öÎÊÌâ¡£
//SCOTT´°¿Ú1
SQL> select * from t2;
ID
----------
3
1
2
SQL> update t2 set i ......

oracle²åÈëʱÈçºÎ²åÈëuuId

 ÊÇÏëÉú³ÉGUIDÂð£¿
SQL> select   sys_guid() from dual ;
SYS_GUID()
--------------------------------
F18031C69D8345DEB305D4B2E796A282
Äã¿ÉÒ԰ѱíµÄÖ÷¼ü×ֶεÄȱʡֵÉèΪsys_guid()
insert into luxian_info (id) values(sys_guid()); ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ