OracleϵÁУºLOB´ó¶ÔÏó´¦Àí
OracleϵÁУºLOB´ó¶ÔÏó´¦Àí
Ö÷ÒªÊÇÓÃÀ´´æ´¢´óÁ¿Êý¾ÝµÄÊý¾Ý¿â×ֶΣ¬×î´ó¿ÉÒÔ´æ´¢4G×ֽڵķǽṹ»¯Êý¾Ý¡£
Ö÷Òª½éÉÜ×Ö·ûÀàÐͺͶþ½øÖÆÎļþÀàÐÍLOBÊý¾ÝµÄ´æ´¢£¬µ¥¶À½éÉܶþ½øÖÆÀàÐÍLOBÊý¾ÝµÄ´æ´¢¡£
Ò»£¬OracleÖеÄLOBÊý¾ÝÀàÐÍ·ÖÀà
1£¬°´´æ´¢Êý¾ÝµÄÀàÐÍ·Ö£º
¢Ù×Ö·ûÀàÐÍ£º
CLOB:´æ´¢´óÁ¿ µ¥×Ö½Ú ×Ö·ûÊý¾Ý¡£
NLOB:´æ´¢¶¨¿í ¶à×Ö½Ú ×Ö·ûÊý¾Ý¡£
¢Ú¶þ½øÖÆÀàÐÍ£º
BLOB:´æ´¢½Ï´óÎ޽ṹµÄ¶þ½øÖÆÊý¾Ý¡£
¢Û¶þ½øÖÆÎļþÀàÐÍ£º
BFILE:½«¶þ½øÖÆÎļþ´æ´¢ÔÚÊý¾Ý¿âÍⲿµÄ²Ù×÷ϵͳÎļþÖС£´æ·ÅÎļþ·¾¶¡£
2£¬°´´æ´¢·½Ê½·Ö£º
¢Ù´æ´¢ÔÚÄÚ²¿±í¿Õ¼ä£º
CLOB£¬NLOBºÍBLOB
¢ÚÖ¸ÏòÍⲿ²Ù×÷ϵͳÎļþ£º
BFILE
¶þ£¬´ó¶ÔÏóÊý¾ÝµÄ¼Èë
1£¬ÉùÃ÷LOBÀàÐÍÁÐ
/*
conn scott/tiger;
Create TableSpace ts5_21
DataFile 'E:\Oracle\ts5_21.dbf'
Size 5m;
*/
Create Table tLob (
no Number(4),
name VarChar2(10),
resume CLob,
photo BLob,
record BFile
)
Lob (resume,photo)Store As (
Tablespace ts5_21 --Ö¸¶¨´æ´¢µÄ±í¿Õ¼ä
Chunk 6k --Ö¸¶¨Êý¾Ý¿é´óС
Disable Storage In Row
);
2£¬²åÈë´ó¶ÔÏóÁÐ
¢ÙÏȲåÈëÆÕͨÁÐÊý¾Ý
¢ÚÓöµ½´ó¶ÔÏóÁÐʱ£¬²åÈë¿Õ°×¹¹Ô캯Êý¡£
×Ö·ûÐÍ£ºempty_clob()£¬empty_nclob()
¶þ½øÖÆÐÍ£ºempty_blob()
¶þ½øÖÆÎļþÀàÐÍ£ºBFileNameº¯ÊýÖ¸ÏòÍⲿÎļþ¡£
BFileNameº¯Êý£º
BFileName(‘Â߼Ŀ¼Ãû’£¬‘ÎļþÃû’);
Â߼Ŀ¼ÃûÖ»ÄÜ´óд£¬ÒòΪÊý¾Ý´ÊµäÊÇÒÔ´óд·½Ê½´æ´¢¡£OracleÊÇÇø·Ö´óСдµÄ¡£
ÔÚ´´½¨Ê±£¬ÎÞÐ轫BFileNameº¯ÊýÂ߼Ŀ¼ָÏòÎïÀí·¾¶£¬Ê¹ÓÃʱ²Å×ö¼ì²é¶þÕßÊÇ·ñ¹ØÁª¡£
&nb
Ïà¹ØÎĵµ£º
oracle²»Í¬°æ±¾¼äÊý¾ÝµÄµ¼Èëµ¼³ö
OracleµÄimp/exp×é¼þÊÇÎÒÃdz£ÓõŤ¾ß£¬ËüµÄÒ»¸ö²Ù×÷ÔÔò¾ÍÊÇÏòϼæÈÝ¡£ÏÂÃæÊǾݴË×ܽáµÄ¼¸¸öʹÓùæÔòºÍÏà¹Ø²âÊÔ£º
¹æÔò1£ºµÍ°æ±¾µÄexp/imp¿ÉÒÔÁ¬½Óµ½¸ß°æ±¾£¨»òͬ°æ±¾£©µÄÊý¾Ý¿â·þÎñÆ÷£¬µ«¸ß°æ±¾µÄexp/imp²»ÄÜÁ¬½Óµ½µÍ°æ±¾µÄÊý¾Ý¿â·þÎñÆ÷
1.1 ʹÓÃ9i¿Í»§¶Ëͨ¹ýimpÁ¬ ......
NULLÖ¸µÄÊÇ¿ÕÖµ£¬»òÕß·Ç·¨Öµ¡£
NVL (expr1, expr2)->expr1ΪNULL£¬·µ»Øexpr2£»²»ÎªNULL£¬·µ»Øexpr1¡£×¢ÒâÁ½ÕßµÄÀàÐÍÒªÒ»ÖÂ
NVL2 (expr1, expr2, expr3) ->expr1²»ÎªNULL£¬·µ»Øexpr2£»ÎªNULL£¬·µ»Øexpr3¡£expr2ºÍexpr3ÀàÐͲ»Í¬µÄ»°£¬expr3»áת»»Îªexpr2µÄÀàÐÍ
NULLIF (expr1, expr2) ->ÏàµÈ·µ»ØNULL£¬²»µÈ·µ»Øex ......
oracle10g´´½¨Óû§
Oracle10g µÄ´´½¨Óû§Ãû
1¡¢ linux Ï oracle µÄÆô¶¯
ÒÔ oracle Éí·ÝµÇ¼
Æô¶¯ lsnrctl start
怬 sqplus /nolog
Á¬½ÓÊý¾Ý¿â connect /as sysdba
Æô¶¯Êý¾Ý¿â startup
¹Ø±ÕÊý¾Ý¿â s ......
Ò»¡¢Ð½¨databack.shÎļþ£¬´æ·ÅĿ¼/opt/databack/
#Êý¾Ý¿âÓû§×ÊÁÏ
USERNAME=Êý¾Ý¿âÓû§Ãû(ÐÅÏ¢Òþ²Ø)
PASSWORD=Êý¾Ý¿âÃÜÂë(ÐÅÏ¢Òþ²Ø)
#FTP·þÎñÆ÷ÐÅÏ¢
FTP_SERV=FTP·þÎñÆ÷(ÐÅÏ¢Òþ²Ø)
FTP_USER=FTPÓû§Ãû(ÐÅÏ¢Òþ²Ø)
FTP_PASS=FTPÃÜÂë(ÐÅÏ¢Òþ²Ø)
FTP_DIR=FTPĿ¼(ÐÅÏ¢Òþ²Ø)
#±¸·ÝĿ¼
BACKUP_DIR=/opt/databack
#¸ ......
ORACLEÀïËøÓÐÒÔϼ¸ÖÖģʽ:
0£ºnone
1£ºnull ¿Õ
2£ºRow-S Ðй²Ïí(RS)£º¹²Ïí±íËø£¬sub share
3£ºRow-X ÐжÀÕ¼(RX)£ºÓÃÓÚÐеÄÐ޸ģ¬sub exclusive
4£ºShare ¹²ÏíËø(S)£º×èÖ¹ÆäËûDML²Ù×÷£¬share
5£ºS/Row-X ¹²ÏíÐжÀÕ¼(SRX)£º×èÖ¹ÆäËûÊÂÎñ²Ù×÷£¬share/sub exclusive
6£ºexclusive ¶ÀÕ¼(X)£º¶ÀÁ¢·ÃÎÊʹÓã¬exclusive
......