oracle³£ÓÃÊý¾ÝÀàÐÍ
oracle³£ÓÃÊý¾ÝÀàÐÍ
½ñÌìͬÊÂÎÊЩÊý¾ÝÀàÐ͵ÄÎÊÌ⣬ÓеĻ¹ÕæÓеã¼Ç²»ÇåÁË£¬ÓÚÊǾͼòµ¥×ܽáϳ£ÓõÄÊý¾ÝÀàÐÍÒÔ±¸ÈÕºó²éÓÃ
1¡¢Char
¶¨³¤¸ñʽ×Ö·û´®£¬ÔÚÊý¾Ý¿âÖд洢ʱ²»×ãλÊýÌî²¹¿Õ¸ñ£¬ËüµÄÉùÃ÷·½Ê½ÈçÏÂCHAR(L)£¬LΪ×Ö·û´®³¤¶È£¬
ȱʡΪ1£¬×÷Ϊ±äÁ¿×î´ó32767¸ö×Ö·û£¬×÷ΪÊý¾Ý´æ´¢ÔÚORACLE8ÖÐ×î´óΪ2000¡£²»½¨ÒéʹÓ㬻á´øÀ´²»
±ØÒªµÄÂé·³
a¡¢×Ö·û´®±È½ÏµÄʱºò£¬Èç¹û²»×¢Ò⣨char²»×ãλ²¹¿Õ¸ñ£©»á´øÀ´´íÎó
b¡¢×Ö·û´®±È½ÏµÄʱºò£¬Èç¹ûÓÃtrimº¯Êý£¬ÕâÑù¸Ã×Ö¶ÎÉϵÄË÷Òý¾ÍʧЧ£¨ÓÐʱºò»á´øÀ´ÑÏÖØÐÔÄÜÎÊÌ⣩
c¡¢ÀË·Ñ´æ´¢¿Õ¼ä(ÎÞ·¨¾«×¼¼ÆËãδÀ´´æ´¢´óС£¬Ö»ÄÜÁôÓÐ×ã¹»µÄ¿Õ¼ä£»×Ö·û´®µÄ³¤¶È¾ÍÊÇÆäËùÕ¼ÓÿռäµÄ´óС)
2¡¢Varchar2/varchar
Ä¿Ç°VARCHARÊÇVARCHAR2µÄͬÒå´Ê¡£¹¤Òµ±ê×¼µÄVARCHARÀàÐÍ¿ÉÒÔ´æ´¢¿Õ×Ö·û´®£¬µ«ÊÇoracle²»ÕâÑù×ö£¬¾¡¹ÜËü±£Áô
ÒÔºóÕâÑù×öµÄȨÀû¡£Oracle×Ô¼º¿ª·¢ÁËÒ»¸öÊý¾ÝÀàÐÍVARCHAR2£¬Õâ¸öÀàÐͲ»ÊÇÒ»¸ö±ê×¼µÄVARCHAR£¬Ëü½«ÔÚÊý¾Ý¿âÖÐ
varcharÁпÉÒÔ´æ´¢¿Õ×Ö·û´®µÄÌØÐÔ¸ÄΪ´æ´¢NULLÖµ¡£Èç¹ûÄãÏëÓÐÏòºó¼æÈݵÄÄÜÁ¦£¬Oracle½¨ÒéʹÓÃVARCHAR2¶ø²»ÊÇVARCHAR¡£
²»¶¨³¤¸ñʽ×Ö·û´®£¬ËüµÄÉùÃ÷·½Ê½ÈçÏÂVARCHAR2(L)£¬LΪ×Ö·û´®³¤¶È£¬Ã»ÓÐȱʡֵ£¬×÷Ϊ±äÁ¿×î´ó32767¸ö×Ö½Ú£¬
×÷ΪÊý¾Ý´æ´¢ÔÚORACLE8ÖÐ×î´óΪ4000¡£ÔÚ¶à×Ö½ÚÓïÑÔ»·¾³ÖУ¬Êµ¼Ê´æ´¢µÄ×Ö·û¸öÊý¿ÉÄÜСÓÚLÖµ£¬ÀýÈ磺µ±ÓïÑÔ
»·¾³ÎªÖÐÎÄ(SIMPLIFIED CHINESE_CHINA.ZHS16GBK)ʱ£¬Ò»¸öVARCHAR2(200)µÄÊý¾ÝÁпÉÒÔ±£´æ200¸öÓ¢ÎÄ×Ö·û»òÕß
100¸öºº×Ö×Ö·û£»¶ÔÓÚ4000×Ö½ÚÒÔÄÚµÄ×Ö·û´®£¬½¨Ò鶼ÓøÃÀàÐÍ
a¡£VARCHAR2±ÈCHAR½ÚÊ¡¿Õ¼ä£¬ÔÚЧÂÊÉϱÈCHAR»áÉÔ΢²îһЩ£¬¼´ÒªÏë»ñµÃЧÂÊ£¬¾Í±ØÐëÎþÉüÒ»¶¨µÄ¿Õ¼ä£¬ÕâÒ²¾ÍÊÇÎÒÃÇÔÚÊý¾Ý¿âÉè¼ÆÉϳ£ËµµÄ‘ÒԿռ任ЧÂÊ’¡£
b¡£VARCHAR2ËäÈ»±ÈCHAR½ÚÊ¡¿Õ¼ä£¬µ«ÊÇÈç¹ûÒ»¸öVARCHAR2Áо³£±»Ð޸ģ¬¶øÇÒÿ´Î±»Ð޸ĵÄÊý¾ÝµÄ³¤¶È²»Í¬£¬Õâ»áÒýÆð‘ÐÐǨÒÆ’(Row Migration)ÏÖÏ󣬶øÕâÔì³É¶àÓàµÄI/O£¬ÊÇÊý¾Ý¿âÉè¼ÆºÍµ÷ÕûÖÐÒª¾¡Á¦±ÜÃâµÄ£¬ÔÚÕâÖÖÇé¿öÏÂÓÃCHAR´úÌæVARCHAR2»á¸üºÃһЩ¡£²»¹ýÇø±ðÒ²²»ÊÇÌ«´ó£¬Èç¹û¾ÍÊÇÏëÓÃvarchar2£¬ÄÇôÔÚ·¢ÉúÐÐǨÒÆ£¬¿ÉÒÔͨ¹ýpctfreeÀ´µ÷Õû£¬È»ºó¶Ô±íµÄÊý¾Ý½øÐÐÖØ×é
nchar,nvarchar/nvarchar2¹ú¼Ò×Ö·û¼¯£¬Óë»·¾³±äÁ¿NLSÖ¸¶¨µÄÓïÑÔ¼¯ÃÜÇÐÏà¹Ø
Ö»ÓÐÒªÓõ½unicodeʱ²Å»áÓõ½ÕâЩ¹ú¼Ò×Ö·û¼¯£¬ncharºÍnvarchar2ÒÀ¾ÝËùÑ¡µÄ×Ö·û¼¯À´´æ´¢Êý¾Ý£¬¿ÉÄÜÒ»¸ö×Ö·ûÕ¼Á½¸ö»ò¶à¸ö×Ö½Ú,·ÀÖ¹ÂÒÂë
3¡¢Long/long raw
OracleÒÑ
Ïà¹ØÎĵµ£º
LENGTH calculates length using characters as defined by the input character set.
LENGTHB uses bytes instead of characters.
VSIZE returns the number of bytes in the internal representation of expr.
LENGTHC uses Unicode complete characters.
LENGTH2 uses UCS2 codepoints.
......
ÖйúµçÁ¦ÐÐҵĿǰÕýÔÚ¾Àúמ޴óµÄ±ä»¯£º´Ó¹ú¼Ò°ìµçµ½ÆóÒµ°ìµç£¬ÐγÉÁ˶à¼Ò¾ºÕù°ìµçµÄ¸ñ¾Ö£»³§Íø·Ö¿ª¡¢¾º¼ÛÉÏÍø£¬´Ó¼Æ»®µ½Êг¡×ª¹ì£¬ÒýÈë¶àÖÖ¾¼Ã³É·Ö£»´ÓµØÓòÐÔ·ÖÉ¢¹©µçÏò´óµçÍø·¢Õ¹£»´ÓÕþÆó²»·Öµ½ÕþÆó·Ö¿ª¡£ÕâЩ±ä»¯£¬Ê¹ÖйúµÄµçÁ¦ÐÐÒµ¾ÊÜ×ÅÇ°ËùδÓеÄѹÁ¦¡£
Ò»·½Ã棬2003Äê¹úÄڵķ¢µçÆóÒµÖØиÄ×é£ ......
ÔÚSQL SERVER 20000ÖзÃÎÊOracleÊý¾Ý¿â·þÎñÆ÷µÄ¼¸ÖÖ·½·¨
1.ͨ¹ýÐм¯º¯Êýopendatasource
ÒªÇó:±¾µØ°²×°Oracle¿Í»§¶Ë
select * from opendatasource('MSDAORA', 'Data Source=XST4;User ID=manager;Password=sjpsjsjs')..MISD.PBCATCOL
ÆäÖУ¬MSDAORAÊÇOLEDB FOR OracleµÄÇý¶¯£¬
×¢Òâ:Óû§ÃûºÍ±íÃûÒ»¶¨Òª´óС£¬·þÎñÆ÷ºÍ ......
1.¾ø¶ÔÖµ
S:select abs(-1) value
O:select abs(-1) value from dual
2.È¡Õû(´ó)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.È ......
http://hi.baidu.com/firefly5002/blog/item/5b5719fcb5bd3e1d08244d11.html
Oracle 10G DataGuard
server A: 10.85.10.44 SID=mesdb
target server B: 10.85.10.43
oracle version:10.2.0.1
OS platform : windows 2003
Data GuardĬÈÏÊÇmaximize performance£¬ ¿ÉÒÔÓÃÒÔÏÂÓï¾äÀ´½øÐÐģʽ¼äµÄÇл»¡£
ALTER DATABASE ......