找到了問題產(chǎn)生的原因后,下面來討論如何解決該問題。對于Oracle Enterprise Manager中的所有工具,有一個配置文件名為dbappscfg.properties,修改該文件即可解決上述問題。這個文件的位置在$ORACLE_HOME\sysman\config目錄下,用任何的文本編輯器打開該文件,在這個文件里面,找到這樣一項,
# SQLPLUS_NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
去掉注釋符#,同時將其修改為
SQLPLUS_NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
對于Windows操作系統(tǒng),還需要修改一項,在文件中找到# SQLPLUS_SYSTEMROOT=c:\\WINNT40,去掉注釋符,將其修改為你所在機器的操作系統(tǒng)主目錄。如操作系統(tǒng)的主目錄在D盤的Winnt下,則將其修改為
SQLPLUS_SYSTEMROOT=d:\\WINNT。
對于后面一項的修改只對Windows操作系統(tǒng)進行,對UNIX操作系統(tǒng)則不需要。如果在Windows操作系統(tǒng)中不修改該項,在Oracle Enterprise Manager中,連接系統(tǒng)時,會提示如下的錯誤:
ORA-12560 TNS:protocol adapter error
或者
ORA-12545 Connect failed because target host or objectb does not exist
修改完成后,保存文件,退出編輯。重新連接SQL PLUS Worksheet,字符集亂碼問題得到解決,顯示正確的簡體中文字符集。
.item-area{width:578px;margin:15px auto;border-top:1px solid #ddd;color:#666}
.item-area a,.item-area a:link,.item-area a:visited{color:#666;text-decoration:none}
.item-area a:hover{color:#3a7ad9;text-decoration:underline;}
a img{border:none;vertical-align:middle}
.item-area h2,.item-area h3{float:none;font-size:100%;font-weight:normal;}
.item-area .h2{height:25px;margin:10px 0;padding-left:35px;*float:left;font:bold 14px/25px "宋體";background:url(http://sns.thea.cn/module/images/icos.png) no-repeat 0 0}
.item-area span.more{float:right;font:normal 12px/25px "宋體"}
.item-area a.more{float:right;font:normal 12px/25px "宋體"}
.item-a{margin-bottom:15px}
.item-a .h-ksrm{background-position:0 0}
.item-a li{*display:inline;overflow:hidden;zoom:1;line-height:2em;padding-left:35px;font-size:14px;background: url(http://sns.thea.cn/module/images/btns.png) no-repeat -1px -28px;}
.item-a li a{float:left;}
.item-a .testBtn{float:right;width:58px;height:21px;line-height:21px;font-size:12px;margin-top:5px;margin-top:3px;text-align:center;background:url(http://sns.thea.cn/module/images/btns.png) no-repeat -1px -1px; color:#FFFFFF;}
.item-a a.freeBtn{width:20px;margin:0 0 0 6px;line-height:28px;color:#fff;font-size:12px;text-indent:-9999px;background: url(http://sns.thea.cn/module/images/icos.png) no-repeat 0 -131px;}
.item-a li.hots a.freeBtn{background-position:0 -105px}
.item-a a.examnum em{font-style:normal;color:red;font-weight:bold;}
.item-b {padding:5px 0 20px;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd}
.xsjl-list-col3s li{display:table-cell;*display:inline;zoom:1;vertical-align:top;width:182px;padding-right:10px;line-height:150%;font-size:12px;}
.item-b .h-xsjl{background-position:0 -26px}
.item-b .pic{float:left;margin:3px 10px 0 0;}
.item-b em{font-style:normal;color:#dc2c2c}
.item-b a.join{display:inline-block;padding-left:20px;background:url(http://sns.thea.cn/module/images/icos.png) no-repeat 0 -160px}
.item-b .xsjl-list-col3s h3 a{display:inline-block;width:120px;overflow:hidden;white-space:nowrap;color:#3a7ad9}
.item-b .xsjl-list-col3s h3{text-align:left;line-height:150%;font-family:"宋體","微軟雅黑"}