Oracle 10g 安裝中文亂碼

wgkgood發表於2011-04-29

Oracle 10g 安裝中文亂碼

oracle 10g em 按鈕亂碼解決,oracle 10g 安裝中文亂碼怎麼處理呢?

在網上找了好多資料,都是你抄我,我抄你,自己都沒有驗證過,沒一個能解決的,都暈了。。。。。。。。。。。。,最後看到一篇寫的非常好的文章,這裡轉載記錄以後留著有用。真的可以解決你的亂碼問題。

1.修改jdk 下面的字型。
[oracle@dbserver db_1]$ cd $ORACLE_HOME/jdk/jre/lib/
[oracle@dbserver lib]$ mv font.properties font.properties_bak
[oracle@racdbserver lib]$
[oracle@dbserver lib]$ cp font.properties.zh_CN.Redhat font.properties
[oracle@dbserver lib]$

2.修改jre 下面的字型
[oracle@dbserver lib]$ cd $ORACLE_HOME/jre/1.4.2/lib
[oracle@dbserver lib]$ mv font.properties font.properties_bak
[oracle@dbserver lib]$ cp font.properties.zh_CN.Redhat font.properties

3.清除em的cache
[oracle@dbserver lib]$ cd $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs
[oracle@dbserver zhs]$ rm *.gif

4. 重新啟動em
[oracle@dbserver bin]$ cd $ORACLE_HOME/bin
[oracle@dbserver bin]$ ./emctl stop dbconsole
[oracle@dbserver bin]$ ./emctl start dbconsole
檔案: zysong.rar
大小: 4365KB
下載: 下載

******************

http://icelander.javaeye.com/blog/426918

Oralce 10g EM 亂碼問題
如果安裝時,我們系統環境變數設定的是中文環境,那麼就不會有這個問題.這個問題根本原因在於安裝時,JDK/JRE字符集的自動選擇.
在 $ORACLE_HOME/jdk/jre/lib 和 $ORACLE_HOME/jre/1.4.2/lib/ 目錄下都有多種字符集字型配置檔案:
[oracle@danaly ~]$ cd $ORACLE_HOME/jdk/jre/lib
[oracle@danaly lib]$ ls font*zh_CN*
font.properties.zh_CN.Redhat font.properties.zh_CN.Redhat2.1
font.properties.zh_CN.Sun font.properties.zh_CN_UTF8.Sun
[oracle@danaly lib]$ cd $ORACLE_HOME/jre/1.4.2/lib/
[oracle@danaly lib]$ ls font*zh_CN*
font.properties.zh_CN.Redhat font.properties.zh_CN.Redhat2.1
font.properties.zh_CN.Sun font.properties.zh_CN_UTF8.Sun
我們只要用合適的中文字符集檔案替換預設檔案即可,我選擇使用font.properties.zh_CN.Redhat來替換預設字型定義檔案:

[oracle@danaly lib]$ cp font.properties.zh_CN.Redhat font.properties

替換之後需要清理一下Cache,重啟EM即可.
Cache路徑通常位於:
$ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs
清除所有gif檔案即可.然後重新啟動EM:
[oracle@danaly zhs]$ emctl stop dbconsole

TZ set to PRC
oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 oracle Corporation. All rights reserved.

Stopping oracle Enterprise Manager 10g Database Control …
… Stopped.
[oracle@danaly zhs]$ emctl start dbconsole
TZ set to PRC
oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 oracle Corporation. All rights reserved.

Starting oracle Enterprise Manager 10g Database Control ………….. started.
——————————————————————
Logs are generated in directory
/opt/oracle/product/10.2.0/danaly.hurrray.com.cn_danaly/sysman/log

現在登陸Web頁面,EM顯示就可以正常顯示中文了.

注意:如果經過以上處理仍然不能正確顯示中文,請參考以下說明:

開啟剛替換好的font.properties,或者檢視原有的中文字型檔案:
[oracle@smsdbrac1 lib]$ tail -2 font.properties.zh_CN.Redhat

filename.-misc-zysong18030-medium-r-normal–*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/zh_CN/TrueType/zysong.ttf

注意其中包含了filename指向中文字型檔案,請確認該檔案在你的伺服器上是否存在,如果不存在,改換一個存在的中文字型檔案即可,也可以自行下載安裝新的字型檔案:
下載地址:
http://blog.mgcrazy.com/download/20110427zysong.tar.gz
[oracle@smsdbrac1 lib]$ ls -al /usr/share/fonts/zh_CN/TrueType/zysong.ttf

-rw-r–r– 1 root root 9249332 Mar 29 2002 /usr/share/fonts/zh_CN/TrueType/zysong.ttf

非常感謝:

http://blogold.chinaunix.net/u2/82363/showart_2023485.html

http://blog.mgcrazy.com/thread-1044-1.html

[@more@]

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

相關文章