Oracle 設定字元集____Oracle

來源:互聯網
上載者:User
AL32UTF8字元集不是一種可(顯示/輸入)的語言字元集,是一種用於儲存的字元集,支援全世界主要的文字語言編碼。
AL32UTF8為ZHS16GBK的超集。


NLS_LANG應該設定成系統本身所使用的語言字元集,與資料庫語言字元集進行轉換。
1. 從AL32UTF8伺服器將資料匯出,匯出前先設定 NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"。
2. 從ZHS16GBK伺服器將資料匯入,匯入前先設定 NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"。


查看資料庫字元集
SQL> select * from v$nls_parameters;
SQL> select userenv('language') from dual;


查看系統字元集
Windows:
cmd -> echo %NLS_LANG%
Linux:
$ locale


設定資料庫字元集
SQL> conn /as sysdba;
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter system enable restricted session;
SQL> alter system set job_queue_processes=0;
SQL> alter system set aq_tm_processes=0;
SQL> alter database open;
SQL> alter database character set internal_use ZHS16GBK;
SQL> alter system set nls_language = 'AMERICAN' scope = spfile;
SQL> alter system set nls_territory = 'AMERICA' scope = spfile;
SQL> shutdown immediate;
SQL> startup;


設定系統字元集
Windows:
我的電腦 -> 屬性 -> 進階 -> 環境變數
NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"
Linux:
$ export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.