設定PL/SQL Developer 字符集

thamsyangsw發表於2013-07-03

設定PLSQL Developer字符集與Oracle伺服器字符集一直

方法1:
1、查詢oracle server端的字符集。開啟SQL Window輸入下面SQL查詢服務端的字符集。
select userenv('language') from dual;
2、我的電腦中環境變數介面,在系統變數中新加:
變數名:NLS_LANG
變數值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK
其中的變數值跟伺服器查詢到得一致即可。

方法2:

Sql程式碼
SQL> select * from v$nls_parameters;   
  1.     
  2. PARAMETER                                                        VALUE   
  3. ---------------------------------------------------------------- ----------------------------------------------------------------   
  4. NLS_LANGUAGE                                                     SIMPLIFIED CHINESE   
  5. NLS_TERRITORY                                                    CHINA   
  6. NLS_CURRENCY                                                     ¥   
  7. NLS_ISO_CURRENCY                                                 CHINA   
  8. NLS_NUMERIC_CHARACTERS                                           .,   
  9. NLS_CALENDAR                                                     GREGORIAN   
  10. NLS_DATE_FORMAT                                                  DD-MON-RR   
  11. NLS_DATE_LANGUAGE                                                SIMPLIFIED CHINESE   
  12. NLS_CHARACTERSET                                                 UTF8   
  13. NLS_SORT                                                         BINARY  
  14. NLS_TIME_FORMAT                                                  HH.MI.SSXFF AM   
  15. NLS_TIMESTAMP_FORMAT                                             DD-MON-RR HH.MI.SSXFF AM   
  16. NLS_TIME_TZ_FORMAT                                               HH.MI.SSXFF AM TZR   
  17. NLS_TIMESTAMP_TZ_FORMAT                                          DD-MON-RR HH.MI.SSXFF AM TZR   
  18. NLS_DUAL_CURRENCY                                                ¥   
  19. NLS_NCHAR_CHARACTERSET                                           UTF8   
  20. NLS_COMP                                                         BINARY  
  21. NLS_LENGTH_SEMANTICS                                             BYTE   
  22. NLS_NCHAR_CONV_EXCP                                              FALSE  

NLS_LANGUAGE 對應 是SIMPLIFIED CHINESE

最後在我本機環境變數中增加


NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK

這樣我再使用plsql就不會再出現亂碼了。

其實如果本地安裝oracle client一般是不會出現亂碼的,由於我本地使用了簡單版的oracle client 如果安裝oracle client過多臃腫。

 

 

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26613085/viewspace-765429/,如需轉載,請註明出處,否則將追究法律責任。

相關文章