oracle編碼格式
1. oracle怎麼設置格式utf-8
1、改客戶端字元集:通過WINDOWS的運行菜單運行Regedit,修改注冊表
Start -> Run -> Rededit <-|
Under registry Editor - > HKEY_LOCAL_MACHINE -> SOFTWARE ->Oracle->KEY_XE->RIGHT WINDOW DOUBLE CLICK NLS_LANG -> CHANGE VALUE TO "AMERICAN_AMERICA.UTF8" ->OK ->CLOSE REGISTRY
正確設置ORACLE客戶端字元集的方法:
oracle客戶端字元集設置需要和伺服器端一致,否則會出現亂碼問題。
首先連接伺服器,查詢伺服器端設置:
select * from v$nls_parameters;
找到:
NLS_LANGUAGE
NLS_TERRITORY
NLS_CHARACTERSET
環境變數nls_lang便是由這三部分組成
NLS_LANG = language_territory.charset
比如:
NLS_LANG = American_Japan.JA16SJIS
2、改伺服器端字元集,通過ORACLE的SQL PLUS命令窗口改
在SQL*PLUS 中,以DBA登錄
conn 用戶名 as sysdba
然後執行以下命令
>shutdown immediate; (把database停了)
>startup mount; (把database重開去可更改情況)
>alter system enable restricted session;
>alter system set job_queue_processes=0;
>alter system set aq_tm_processes=0;
>alter database open;
>alter database character set utf8;
OR
>alter database character set internal_use utf8;(這條命令是強制轉換編碼格式,有可能會導致資料庫中的中文變成亂碼)
>shutdown immediate;
>startup; (重開正常oracle)
ORACLE資料庫字元集修改完成
2. oracle資料庫支持哪些編碼格式
查看及修改Oracle編碼格式方法
--查看Oracle資料庫字元集:
select userenv('language') from al;
查詢結果:
SIMPLIFIED CHINESE_CHINA.AL32UTF8
--修改oracle資料庫字元集:(在SQL Plus中)
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 JA16SJIS;
sql> shutdown immediate;
sql> startup;
3. 如何查看及修改oracle編碼格式方法
查看及修改編碼格式方法:
1、查看oracle資料庫字元集:
select userenv('language') from al;
查詢結果:
SIMPLIFIED CHINESE_CHINA.AL32UTF8
2、修改oracle資料庫字元集:(在SQL Plus中)
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 UTF8
sql> shutdown immediate;
sql> startup;
4. 怎麼設置oracle資料庫的編碼格式
查看及修改oracle編碼格式方法:
1、查看oracle資料庫字元集:
select userenv('language') from al;
查詢結果:
SIMPLIFIED CHINESE_CHINA.AL32UTF8
2、修改oracle資料庫字元集:(在SQL Plus中)
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 UTF8
sql> shutdown immediate;
sql> startup;
5. oracle11g資料庫怎麼改編碼格式
首先查看oracle資料庫的編碼:
SQL> select * from nls_database_parameters where parameter ='NLS_CHARACTERSET';
修改字元集編碼(這會對資料庫的數據有直接的影響,謹慎操作):
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>shutdown immediate;
SQL> startup
6. oracle資料庫怎麼設置編碼格式
dbca建庫的時候才能設置。
7. 怎麼查看oracle數據編碼格式
怎麼查看oracle數據編碼格式
查詢Oracle Server端的字元集:
有很多種方法可以查出oracle server端的字元集,比較直觀的查詢方法是以下這種:
SQL>select userenv(『language』) from al;
結果如下:AMERICAN _ AMERICA. ZHS16GBK。
8. 怎麼查看oracle資料庫中的的編碼格式
首先查看oracle資料庫的編碼:SQL>select*fromnls_database_parameterswhereparameter='NLS_CHARACTERSET';修改字元集編碼(這會對資料庫的數據有直接的影響,謹慎操作):SQL>conn/assysdbaSQL>shutdownimmediate;SQL>startupmount;SQL>;SQL>ALTERSYSTEMSETJOB_QUEUE_PROCESSES=0;SQL>ALTERSYSTEMSETAQ_TM_PROCESSES=0;SQL>alterdatabaseopen;SQL>_USEZHS16GBK;SQL>shutdownimmediate;SQL>startup
9. oracle資料庫怎麼修改編碼格式utf-8
以下內容為固定寫法,可以修改資料庫編碼格式。
第一步:通過系統管理員許可權登錄資料庫。
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.
第五步:設置作業進行為0個。
sql> alter system set job_queue_processes=0;
system altered.
第六步:設置啟動時間管理器的數量為0
sql> alter system set aq_tm_processes=0;
system altered.
第七步:打開資料庫連接
sql> alter database open;
database altered.
第八步:修改需要的編碼格式
sql> alter database character set internal_use GBK;
第九步:關閉連接。
sql> shutdown immediate;
第十步:啟動oracle進程。
sql> startup;
備註:常用的有:UTF-8,GBK 。
UTF-8:是一種針對Unicode的可變長度字元編碼,又稱萬國碼。由Ken Thompson於1992年創建。現在已經標准化為RFC 3629。UTF-8用1到6個位元組編碼UNICODE字元。用在網頁上可以同一頁面顯示中文簡體繁體及其它語言(如英文,日文,韓文)。