oracleÔõÑùÉèÖÃÖÐÎÄ
oracleÖеÄÖÐÎÄÉèÖÿÉÒÔ·ÖÁù²½Íê³É£º×°ÖÃÖ§³ÖÖÐÎĵÄoracle°æ±¾¡£½¨ÉèÊý¾Ý¿âʱ£¬Ö¸¶¨×Ö·û¼¯Îª”al32utf8″»ò”utf8″¡£½¨ÉèÓû§²¢ÊÚÓèalter sessionȨÏÞ¡£ÉèÖûỰÓïÑÔºÍ×Ö·û¼¯¡£ÖØÐÂÆô¶¯Êý¾Ý¿â£¨¿ÉÑ¡£©¡£ÑéÖ¤ÖÐÎÄÉèÖÃÊÇ·ñÀÖ³ÉÓ¦Óá£
OracleÖÐÎÄÉèÖÃ
ÔõÑùÉèÖÃOracleÖеÄÖÐÎÄ£¿
ͨ¹ýÒÔÏ°취ÉèÖÃOracleÖеÄÖÐÎÄ£º
1. ×°ÖÃÖ§³ÖÖÐÎĵÄOracle°æ±¾
È·±£Äú×°ÖõÄOracle°æ±¾Ö§³ÖÖÐÎÄ£¬ÀýÈçOracle Database 12c»ò¸ü¸ß°æ±¾¡£
2. ½¨ÉèÊý¾Ý¿â
½¨ÉèÊý¾Ý¿âʱ£¬Ö¸¶¨×Ö·û¼¯Îª”AL32UTF8″»ò”UTF8″¡£Õ⽫ÔÊÐíÊý¾Ý¿â´æ´¢ÖÐÎÄ×Ö·û¡£
CREATE DATABASE my_database CHARACTER SET AL32UTF8 NATIONAL CHARACTER SET AL16UTF16;
µÇ¼ºó¸´ÖÆ
3. ½¨ÉèÓû§ºÍ¸¶ÓëȨÏÞ
½¨ÉèÓû§²¢ÊÚÓèËûÃǶÔÊý¾Ý¿âµÄ»á¼ûȨÏÞ¡£È·±£ÊÚÓèÓû§ALTER SESSIONȨÏÞ£¬ÒÔ±ãËûÃÇ¿ÉÒÔ¸ü¸Ä»á»°ÉèÖá£
CREATE USER my_user IDENTIFIED BY my_password; GRANT ALTER SESSION TO my_user;
µÇ¼ºó¸´ÖÆ
4. ÉèÖûỰÓïÑÔºÍ×Ö·û¼¯
ÅþÁ¬µ½Êý¾Ý¿âºó£¬Ê¹ÓÃÒÔÏÂÏÂÁîÉèÖûỰÓïÑÔºÍ×Ö·û¼¯£º
ALTER SESSION SET NLS_LANGUAGE=CHINESE_SIMPLIFIED; ALTER SESSION SET NLS_CHARACTERSET=AL32UTF8;
µÇ¼ºó¸´ÖÆ
5. ÖØÐÂÆô¶¯Êý¾Ý¿â£¨¿ÉÑ¡£©
ÖØÐÂÆô¶¯Êý¾Ý¿âÒÔÓ¦Óøü¸Ä¡£Õ⽫ȷ±£ËùÓÐÊý¾Ý¿â¹¤¾ßʹÓÃ׼ȷµÄ×Ö·û¼¯¡£
SHUTDOWN IMMEDIATE; STARTUP;
µÇ¼ºó¸´ÖÆ
6. ÑéÖ¤ÖÐÎÄÉèÖÃ
ÅþÁ¬µ½Êý¾Ý¿â²¢ÅÌÎÊÊý¾Ý¿â°æ±¾£¬ÒÔÑéÖ¤ÖÐÎÄÉèÖÃÊÇ·ñÒÑÀÖ³ÉÓ¦Óãº
SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER='NLS_LANGUAGE';
µÇ¼ºó¸´ÖÆ
ÒÔÉϾÍÊÇoracleÔõÑùÉèÖÃÖÐÎĵÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡