程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> 關於Oracle數據庫 >> Oracle修改默認字符編碼

Oracle修改默認字符編碼

編輯:關於Oracle數據庫

       --查看Oracle數據庫字符集:

      Sql代碼

      select userenv('language') from dual;

      查詢結果:

      SIMPLIFIED CHINESE_CHINA.AL32UTF8

      --修改oracle數據庫字符集:(在SQL Plus中)

      Sql代碼

      sql> conn / as sysdba;

      sql> shutdown immediate;

      database closed.

      database dismounted.

      oracle instance shut down.

      sql> startup mount;

      oracle instance started.

      total system global area 135337420 bytes

      fixed size 452044 bytes

      variable size 109051904 bytes

      database buffers 25165824 bytes

      redo buffers 667648 bytes

      database mounted.

      sql> alter system enable restricted session;

      system altered.

      sql> alter system set job_queue_processes=0;

      system altered.

      sql> alter system set aq_tm_processes=0;

      system altered.

      sql> alter database open;

      database altered.

      sql> alter database character set internal_use AL32UTF8;

      sql> shutdown immediate;

      sql> startup;

      修改oracle用戶的NLS_LANG

      編輯/home/oracle/.bash_profile

      Bash代碼

      export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"

    1. 上一頁:
    2. 下一頁:
    Copyright © 程式師世界 All Rights Reserved