Àí½âOracle×Ö·û¼¯ÎÊÌâ
Ò»£®ÒýÑÔ
ORACLEÊý¾Ý¿â×Ö·û¼¯£¬¼´OracleÈ«Çò»¯Ö§³Ö(Globalization Support)£¬»ò¼´¹ú¼ÒÓïÑÔÖ§³Ö£¨NLS£©Æä×÷ÓÃÊÇÓñ¾¹úÓïÑԺ͸ñʽÀ´´æ´¢¡¢´¦ÀíºÍ¼ìË÷Êý¾Ý¡£ÀûÓÃÈ«Çò»¯Ö§³Ö£¬ORACLEΪÓû§Ìṩ×Ô¼ºÊìϤµÄÊý¾Ý¿âĸÓï»·¾³£¬ÖîÈçÈÕÆÚ¸ñʽ¡¢Êý×Ö¸ñʽºÍ´æ´¢ÐòÁеȡ£Oracle¿ÉÒÔÖ§³Ö¶àÖÖÓïÑÔ¼°×Ö·û¼¯£¬ÆäÖÐoracle8iÖ§³Ö48ÖÖÓïÑÔ¡¢76¸ö¹ú¼ÒµØÓò¡¢229ÖÖ×Ö·û¼¯£¬¶øoracle9iÔòÖ§³Ö57ÖÖÓïÑÔ¡¢88¸ö¹ú¼ÒµØÓò¡¢235ÖÖ×Ö·û¼¯¡£ÓÉÓÚoracle×Ö·û¼¯ÖÖÀà¶à£¬ÇÒÔÚ´æ´¢¡¢¼ìË÷¡¢Ç¨ÒÆoracleÊý¾Ýʱ¶à¸ö»·½ÚÓë×Ö·û¼¯µÄÉèÖÃÃÜÇÐÏà¹Ø£¬Òò´ËÔÚʵ¼ÊµÄÓ¦ÓÃÖУ¬Êý¾Ý¿â¿ª·¢ºÍ¹ÜÀíÈËÔ±¾³£»áÓöµ½ÓйØoracle×Ö·û¼¯·½ÃæµÄÎÊÌâ¡£±¾ÎÄͨ¹ýÒÔϼ¸¸ö·½Ãæ²ûÊö£¬¶Ôoracle×Ö·û¼¯×ö¼òÒª·ÖÎö
¶þ£®×Ö·û¼¯»ù±¾ÖªÊ¶
2.1×Ö·û¼¯
ʵÖʾÍÊÇ°´ÕÕÒ»¶¨µÄ×Ö·û±àÂë·½°¸£¬¶ÔÒ»×éÌض¨µÄ·ûºÅ£¬·Ö±ð¸³Ó費ͬÊýÖµ±àÂëµÄ¼¯ºÏ¡£OracleÊý¾Ý¿â×îÔçÖ§³ÖµÄ±àÂë·½°¸ÊÇUS7ASCII¡£
OracleµÄ×Ö·û¼¯ÃüÃû×ñÑÒÔÏÂÃüÃû¹æÔò:
<Language><bit size><encoding>
¼´: <ÓïÑÔ><±ÈÌØλÊý><±àÂë>
±ÈÈç: ZHS16GBK±íʾ²ÉÓÃGBK±àÂë¸ñʽ¡¢16루Á½¸ö×Ö½Ú£©¼òÌåÖÐÎÄ×Ö·û¼¯
2.2×Ö·û±àÂë·½°¸
<st1:chsdate year="1899" month="12" day="30" islunardate="False" isrocdate="False" w:st="on">2.2.1</st1:chsdate> µ¥×Ö½Ú±àÂë
£¨1£©µ¥×Ö½Ú7λ×Ö·û¼¯£¬¿ÉÒÔ¶¨Òå128¸ö×Ö·û£¬×î³£ÓõÄ×Ö·û¼¯ÎªUS7ASCII
£¨2£©µ¥×Ö½Ú8λ×Ö·û¼¯£¬¿ÉÒÔ¶¨Òå256¸ö×Ö·û£¬ÊʺÏÓÚÅ·Ö޴󲿷ֹú¼Ò
ÀýÈ磺WE8ISO8859P1(Î÷Å·¡¢8λ¡¢ISO±ê×¼8859P1±àÂë)
2.2.2 ¶à×Ö½Ú±àÂë
£¨1£©±ä³¤¶à×Ö½Ú±àÂë
ijЩ×Ö·ûÓÃÒ»¸ö×Ö½Ú±íʾ£¬ÆäËü×Ö·ûÓÃÁ½¸ö»ò¶à¸ö×Ö·û±íʾ£¬±ä³¤¶à×Ö½Ú±àÂë³£ÓÃÓÚ¶ÔÑÇÖÞÓïÑÔµÄÖ§³Ö£¬ ÀýÈçÈÕÓï¡¢ººÓï¡¢Ó¡µØÓïµÈ
ÀýÈ磺AL32UTF8£¨ÆäÖÐAL´ú±íALL,Ö¸ÊÊÓÃÓÚËùÓÐÓïÑÔ£©¡¢zhs16cgb231280
£¨2£©¶¨³¤¶à×Ö½Ú±àÂë
ÿһ¸ö×Ö·û¶¼Ê¹Óù̶¨³¤¶È×ֽڵıàÂë·½°¸£¬Ä¿Ç°oracleΨһ֧³ÖµÄ¶¨³¤¶à×Ö½Ú±àÂëÊÇAF16UTF16£¬Ò²ÊǽöÓÃÓÚ¹ú¼Ò×Ö·û¼¯
2.2.3 unicode±àÂë
UnicodeÊÇÒ»¸öº¸ÇÁËÄ¿Ç°È«ÊÀ½çʹÓõÄËùÓ
Ïà¹ØÎĵµ£º
֮ǰÏîÄ¿ÓÐÓõ½µÄһЩµ¼ÈëºÍµ¼³ö£¬Ê±ÖÁÒѾÃÕûÀíһϣ¬×ö¸ö¼ÇºÅ
µ¼ÈëÎļþ£º
1. ÔÚij·¾¶ÏÂд¿ØÖÆÎļþ e:\testRegionControl.ctl £º
load data
infile e:\region.txt
truncate into table region
fields terminated by X'09'
TRAILING NULLCOLS
(
PPCC_ID&nbs ......
exp document/document2009@document owner=document rows=y compress=y buffer=65536 feedback=100000 file=D:\document.dmp log=D:\document.log
exp whd/whd2009@whddb owner=whd rows=y compress=y buffer=65536 feedback=100000 file=D:\whd.dmp log=D:\whd.log
imp document/document2009@document fromuser=docume ......
³£ÓõÄORACLE PL/SQL¹ÜÀíÃüÁî
ÊìϤORACLE¹ÜÀíµÄÒ»¶¨¶ÔÕâЩÃüÁî²»»áÄ°Éú£¬²»¹ý¶ÔÓÚÎÒÕâ¸ö¸Õ½Ó´¥ORACLE¹ÜÀíµÄÀ´Ëµ£¬»¹ÊÇÓбØÒª×öϼǼ£¬ÒÔ±ãËæʱ²é¿´¡£
Ò» µÇ¼SQLPLUS
sqlplusÓû§Ãû/ÃÜÂë@Êý¾Ý¿âʵÀýasµÇ¼½ÇÉ«;
&nbs ......
Òª½â¾öOracleµÄ¿Í»§¶ËÂÒÂëÎÊÌâ¹Ø¼üÊÇÒª°Ñ·þÎñÆ÷¶ËʹÓõÄ×Ö·û¼¯¸ú¿Í»§¶ËʹÓõÄ×Ö·û¼¯Í³Ò»ÆðÀ´¡£Oracle¿Í»§¶Ë£¨Sqlplus£©Í¨¹ýNLS_LANG»·¾³±äÁ¿À´È·¶¨¿Í»§¶ËʹÓõÄ×Ö·û¼¯¡£NLS_LANG
²ÎÊýÓÉÒÔϲ¿·Ö×é³É:
NLS_LANG
=<Language>_<Territory>.<Clients Characterset>
NLS_LANG
¸÷²¿·Öº¬ÒåÈçÏÂ:
LANGUAGEÖ ......
¾³£ÓÐͬÊÂ×ÉѯoracleÊý¾Ý¿â×Ö·û¼¯Ïà¹ØµÄÎÊÌ⣬ÈçÔÚ²»Í¬Êý¾Ý¿â×öÊý¾ÝǨÒÆ¡¢Í¬ÆäËüϵͳ½»»»Êý¾ÝµÈ£¬³£³£ÒòΪ×Ö·û¼¯²»Í¬¶øµ¼ÖÂǨÒÆʧ°Ü»òÊý¾Ý¿âÄÚÊý¾Ý±ä³ÉÂÒÂë¡£ÏÖÔÚÎÒ½«oracle×Ö·û¼¯Ïà¹ØµÄһЩ֪ʶ×ö¸ö¼òµ¥×ܽᣬϣÍû¶Ô´ó¼Ò½ñºóµÄ¹¤×÷ÓÐËù°ïÖú¡£
¡¡¡¡Ò»¡¢Ê²Ã´ÊÇoracle×Ö·û¼¯
¡¡¡¡Oracle×Ö·û¼¯ÊÇÒ»¸ö×Ö½ÚÊý¾ÝµÄ½âÊ͵ķûºÅ¼¯ ......