oracleµ÷ÓÅÖ® ¹²Ïí³ØʹÓÃÎÊÌ⣨ժ×ÔÎÄƽÊ飩
SGA ÖеÄÁíÍâÒ»¸öÖØÒª½á¹¹Êǹ²Ïí³Ø¡£¹²Ïí³Ø´æ´¢ÁËÓ¦ÓÃÖ´ÐÐÐèÒªµÄPL/SQL¿é½á¹¹£¬SQLÓï¾äµÄÎı¾¡¢SQL±àÒëºóµÄ¿É
Ö´ÐдúÂ롢ϵͳÊý¾Ý×ÖµäµÈ¡£
Ç¡µ±µÄ¹²Ïí³Ø³ß´çÉèÖý«¼õÉÙϵͳ¸÷ÖÖ×ÊÔ´µÄʹÓá£Ê×ÏÈ£¬¶ÔÓÚSQL¡¢PL/SQL À´Ëµ£¬¹²Ïí³ØÌṩÁËÔËÐÐ״̬ϵÄÁÙʱ
´æ´¢µã£¬ºóÐøÖ´ÐеÄSQLºÍPL/SQL½«Ê¹ÓÃÒѱ»»º´æµÄ±àÒë½á¹û¼°Ö´Ðмƻ®£¬ÓÐЧ¼õÉÙϵͳCPUµÄʹÓ㬼õÉÙÓû§µ÷ÓÃʼþ¡£
µÚ¶þ£¬Ë¨¡¢Ëø×ÊÔ´µÄÕùÓñ»»·½Ú¡£µÚÈý£¬Êý¾Ý×ÖµäÐÅÏ¢½«±»»º´æÔÚ¹²Ïí³ØÖУ¬Òò´Ë£¬ÓйØϵͳµÄÐÅÏ¢²»±ØÔÙÈ¥Ö´Ðвéѯ£¬
Õâ¾Í½µµÍÁË×ÊÔ´µÄʹÓá£
Ôڿ⻺´æÖÐÇøÓòÖУ¬´æ´¢×ÅSQL¡¢PL/SQL¡¢JavaÀàµÄÔ´Âë¡¢Ö´Ðмƻ®¡¢Î±±àÒëºó¿ÉÖ´ÐдúÂëµÈ¡£µ±Ó¦ÓóÌÐòÔËÐÐʱ£¬ÕâЩ´úÂë»á±»µ÷Óá£Èç¹ûÕâЩ´úÂëÔÚÇ°Ãæ²»¾ÃµÄÓ¦ÓÃÔËÐÐÖÐÒѾ±»µ÷ÓÃÖ´Ðйý£¬Ôò¿ÉÄܱ»ºóÐøÖ´ÐеÄÓ¦ÓóÌÐò¹²Ïí¡£Ä¬Èϵأ¬Oracle½«ÊÔͼÖظ´Ê¹ÓÃÏÖÓеĴúÂ룬ʵÏÖÖØÓá£Ò²¾ÍÊÇ˵£¬ºóÐøÓ¦ÓõÄÖ´ÐÐÄܹ»ÒýÓÃÇ°ÆÚÓ¦ÓÃÖ´ÐÐÖбàÒë¹ýµÄ´úÂ룬Õâ³ÆΪ¿â»º´æµÄ“ÃüÖД¡£Ò»´ÎÃüÖÐÒâζ×ÅÒ»´Î
ÈçÈí½âÎö£¬SQL¡¢PL/SQLµÄÓ²½âÎö¼°±àÒë¹ý³ÌµÄ×ÊÔ´¿ªÏú½«±»±ÜÃâ¡£
¼ÙÉèºóÐøÓ¦ÓÃÔÚÖ´ÐÐÖв»ÄÜͨ¹ý¿â»º´æʵÏÖ“Èí½âÎö”£¬Oracle ²»µÃ²»ÎªSQL¡¢PL/SQL ½øÐÐÓï·¨½âÎö¡¢Ö´Ðмƻ®·ÖÎöºÍ±àÒ룬ÒÔ¼°
Ó¦ÓôúÂë¿ÉÖ´Ðа汾µÄ´´½¨¡£Õâ¸ö¹ý³Ì³ÆΪ“Ó²½âÎö”£¬Ó²½âÎöÐèÒªÕû¸öϵͳ¸¶³ö¶îÍâµÄCPUʱ¼äƬ¡¢¿â»º´æ˨×ÊÔ´µÈ¡£
´ÓÐÔÄÜÉÏ¿´£¬ÎÒÃǵ±È»Ï£ÍûÄܾ¡¿ÉÄܵØʵÏÖÈí½âÎö£¬¼õÉÙÓ²½âÎö¡£×öµ½ÕâÒ»µãÐèÒª½øÐÐÁ½·½ÃæµÄ×¼±¸¹¤×÷£ºÄܹ»ÖØÓõÄSQLºÍ
PL/SQL¡¢×ã¹»³ß´çµÄ¹²Ïí³Ø¡£
SQLÓëPL/SQLÖØÓÃ
µ±Óû§ÏëOracle ·¢³öSQL¡¢PL/SQLÇëÇóʱ£¬Oracle½«Ê×ÏÈÈ·¶¨ÕâЩSQLÓï¾ä¡¢PL/SQL¿éÊÇ·ñ¿ÉÒÔÔÚ¹²Ïí³ØÖÐÕÒµ½ÏàͬµÄ
Óï¾ä£¬¹ý³ÌÈçÏÂ:
1>¸ù¾ÝÒªÖ´ÐеÄÓï¾äÎı¾£¬ºÍ¹²Ïí³ØÖÐÏÖÓÐÓï¾äÎı¾½øÐбȽÏ
2>Èç¹û¹²Ïí³ØÖÐûÓÐÕÒµ½ÏàͬµÄÓï¾ä£¬ËµÃ÷SQLÓï¾äÔÚ¹²Ïí³ØÖв»´æÔÚ£¬¿ªÊ¼Ö´ÐÐÓ²½âÎö²Ù×÷¡£
3>Èç¹ûÕÒµ½Æ¥ÅäµÄÓï¾ä£¬Oracle ¼ÌÐø°ÑÆ¥ÅäÓï¾äµÄÕýÎĺͻº´æ³ØÖеÄSQLÕýÎĽøÐÐÑϸñ±È½Ï£¬°üÀ¨¿Õ¸ñ¡¢´óСд¡¢×¢Ê͵ȡ£
ÀýÈçÏÂÃæÁ½ÌõÓï¾ä¾ÍÊDz»Í¬µÄ£¬ËäȻֻÊǶàÁËÒ»¸ö¿Õ¸ñ¡¢´óСдÓÐЩ²»Ò»Ö¡£
SELECT name from Mytable;
SELECT name from mytable;
OracleÔڱȽÏÓï¾äʱ£¬³
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
import Java.io.*;
¡¡¡¡import java.util.*;
¡¡¡¡import java.sql.*;
¡¡¡¡public class LobPros
¡¡¡¡{
¡¡¡¡/**
¡¡¡¡* OracleÇý¶¯³ÌÐò
¡¡¡¡*/
¡¡¡¡private static final String DRIVER = "oracle.jdbc.driver.OracleDriver";
¡¡¡¡/**
¡¡¡¡* ORACLEÁ¬½ÓÓÃURL
¡¡¡¡*/
¡¡¡¡p ......
Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_char(sysdate,'YYY') from d ......
ÕÒ²»µ½ÔÌûÁË ¾ÍÌùÕâÀï°É£¡
ÔÚÏò´ó¼ÒÏêϸ½éÉÜOracle֮ǰ£¬Ê×ÏÈÈôó¼ÒÁ˽âÏÂOracle xmltypeÊÇʲô£¬Oracle´Ó9i¿ªÊ¼Ö§³ÖÒ»ÖÖеÄÊý¾ÝÀàÐÍ----
xmltype£¬ÓÃÓÚ´æ´¢ºÍ¹ÜÀíxmlÊý¾Ý£¬²¢ÌṩÁ˺ܶàµÄfunctions£¬ÓÃÀ´Ö±½Ó¶ÁÈ¡xmlÎĵµºÍ¹ÜÀí½Úµã¡£ÏÂÃ潫½éÉÜOracle
xmltypeµÄһЩ»ù±¾Ê¹Óá£
1.½¨Á¢º¬ÓÐOracle xmltypeÊý¾Ý ......
¾²âÊÔ£¬ÔÚOracleÖУ¬¶ÔÓÚnullºÍ¿Õ×Ö·û´®'',webMethods JDBC Adapter ²éѯ³öÀ´¶¼»áÏÔʾnull.
¶øÔÚSQL SERVERÖУ¬»á·Ö±ðÏÖʵΪnullºÍ¿Õ×Ö·û´®¡£
º¬Òå½âÊÍ£º
ÎÊ£ºÊ²Ã´ÊÇNULL£¿
´ð£ºÔÚÎÒÃDz»ÖªµÀ¾ßÌåÓÐʲôÊý¾ÝµÄʱºò£¬Ò²¼´Î´Öª£¬¿ÉÒÔÓÃNULL£¬ÎÒÃdzÆËüΪ¿Õ£¬ORACLEÖУ¬º¬ÓпÕÖµµÄ±íÁ㤶ÈΪÁã¡£
ORACLEÔÊÐíÈκÎÒ»ÖÖÊý¾ ......