一直沒怎么用10g的em工具,今天打開來看看,發現也有相傳已久的亂碼問題.網上也流傳著n種解決方案,仔細看一下,其實這個問題很好解決.
如果安裝時,我們系統環境變量設置的是中文環境,那么就不會有這個問題.這個問題根本原因在于安裝時,jdk/jre字符集的自動選擇.
在 $oracle_home/jdk/jre/lib 和 $oracle_home/jre/1.4.2/lib/ 目錄下都有多種字符集字體配置文件:
[[email protected] ~]$ cd $oracle_home/jdk/jre/lib[[email protected] 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[[email protected] lib]$ cd $oracle_home/jre/1.4.2/lib/[[email protected] 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來替換缺省字體定義文件:
[[email protected] 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:
[[email protected] zhs]$ emctl stop dbconsoletz set to prcoracle enterprise manager 10g database control release 10.2.0.1.0 copyright (c) 1996, 2005 oracle corporation. all rights reserved.http://danaly.hurrray.com.cn:1158/em/console/aboutapplicationstopping oracle enterprise manager 10g database control ... ... stopped. [[email protected] zhs]$ emctl start dbconsoletz set to prcoracle enterprise manager 10g database control release 10.2.0.1.0 copyright (c) 1996, 2005 oracle corporation. all rights reserved.http://danaly.hurrray.com.cn:1158/em/console/aboutapplicationstarting 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
新聞熱點
疑難解答