Oracle10g中OEM相关问题
生活随笔
收集整理的這篇文章主要介紹了
Oracle10g中OEM相关问题
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
最近要用到OEM,發(fā)現(xiàn)在Linux下面裝的Oracle默認(rèn)沒(méi)有打開(kāi)console,所以需要手動(dòng)開(kāi)啟一下。找了點(diǎn)資料,也遇到了一些困難,就順便學(xué)習(xí)一下相關(guān)的知識(shí)。把要記錄的東西都記下來(lái),也把錯(cuò)誤貼出來(lái),希望可以對(duì)別人有所幫助。
?
?
一、啟動(dòng)和關(guān)閉
以下是啟動(dòng)過(guò)程:
[oracle@wxq ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0 ?
Copyright (c) 1996, 2006 Oracle Corporation. ?All rights reserved.
http://wxq.mydomain:1158/em/console/aboutApplication?
Starting Oracle Enterprise Manager 10g Database Control ................................. started.?
------------------------------------------------------------------
Logs are generated in directory /opt/oracle/product/10.2.0/db_1/wxq.mydomain_devMISowb/sysman/log?
?
以下是關(guān)閉過(guò)程:
?
[oracle@wxq ~]$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0 ?
Copyright (c) 1996, 2006 Oracle Corporation. ?All rights reserved.
http://wxq.mydomain:1158/em/console/aboutApplication?
Stopping Oracle Enterprise Manager 10g Database Control ...... ?Stopped.
?
?
在第一次啟動(dòng)的時(shí)候,遇到了一個(gè)問(wèn)題,就是報(bào)錯(cuò)
[oracle@wxq ~]$ emctl start dbconsole
TZ set to PRC
OC4J Configuration issue. /opt/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_wxq.mydomain_devMISowb not found.?
[oracle@wxq ~]$ emctl start dbconsole
TZ set to PRC
EM Configuration issue. /opt/oracle/product/10.2.0/db_1/wxq.mydomain_devMISowb not found.?
?
原因是在安裝Oracle的時(shí)候是使用localhost.localdomain作為機(jī)器名的,所以以上兩個(gè)目錄都是用了這個(gè)機(jī)器名來(lái)創(chuàng)建。之后修改了機(jī)器名之后,OEM啟動(dòng)時(shí)就無(wú)法找到對(duì)應(yīng)的文件夾了,需要手動(dòng)修改一下名稱:
[oracle@wxq j2ee]$ mv OC4J_DBConsole_localhost.localdomain_devMISowb/ OC4J_DBConsole_wxq.mydomain_devMISowb
[oracle@wxq db_1]$ mv localhost.localdomain_devMISowb/ wxq.mydomain_devMISowb
?
?
二、登錄OEM問(wèn)題
?
啟動(dòng)的時(shí)候會(huì)有提示登錄地址,只要按照這個(gè)登錄地址就可以了。例如我的地址就是:
http://wxq.mydomain:1158/em/
?
?
如果OEM已經(jīng)啟動(dòng)了,可以通過(guò)emctl status dbconsole命令來(lái)查看:
?
[oracle@wxq ~]$ emctl status dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0 ?
Copyright (c) 1996, 2006 Oracle Corporation. ?All rights reserved.
http://wxq.mydomain:1158/em/console/aboutApplication?
Oracle Enterprise Manager 10g is running.?
------------------------------------------------------------------
Logs are generated in directory /opt/oracle/product/10.2.0/db_1/wxq.mydomain_devMISowb/sysman/log?
?
還可以通過(guò)以下文件查看Oracle的所有端口設(shè)置:
?
[oracle@wxq ~]$ cat /opt/oracle/product/10.2.0/db_1/install/portlist.ini?
iSQL*Plus HTTP port number =5560
Enterprise Manager Console HTTP Port (devMISowb) = 1158
Enterprise Manager Agent Port (devMISowb) = 1831?
?
三、emctl的其他操作
?
直接輸入emctl命令來(lái)查看emctl可以做的所有操作:
?
[oracle@wxq ~]$ emctl
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0 ?
Copyright (c) 1996, 2006 Oracle Corporation. ?All rights reserved.
Invalid arguments
?
Unknown command option?
Usage::?
?? Oracle Enterprise Manager 10g Database Control commands:
?? ? ? emctl start| stop| status| setpasswd dbconsole
?? ? ? emctl secure <options>
?
?? ? ? emctl set ssl test|off|on em
?? ? ? emctl set ldap <host> <port> <user dn> <user pwd> <context dn>
emctl blackout options can be listed by typing "emctl blackout"
emctl config options can be listed by typing "emctl config"
emctl secure options can be listed by typing "emctl secure"
emctl ilint ?options can be listed by typing "emctl ilint"
emctl deploy ?options can be listed by typing "emctl deploy"?
具體的操作等以后有空的時(shí)候嘗試一下。
?
四、遇到的問(wèn)題
?
開(kāi)啟之后發(fā)現(xiàn)部分按鈕的名稱在本地顯示亂碼,而且無(wú)法連接到OEM:
?
?
?
亂碼問(wèn)題具體的解決辦法可以參考:http://www.eygle.com/archives/2006/03/oracle10g_em_font_change.html
?
無(wú)法連接的問(wèn)題可以參見(jiàn):http://space.itpub.net/161195/viewspace-501482
?
?
?
?
?
?
?
?
以下轉(zhuǎn)貼以上兩個(gè)鏈接,以防失效:
*******************************************************************************************
Oracle10g EM亂碼之快速解決
作者:eygle |English Version 【轉(zhuǎn)載時(shí)請(qǐng)以超鏈接形式標(biāo)明文章出處和作者信息及本聲明】
鏈接: http://www.eygle.com/archives/2006/03/oracle10g_em_font_change.html?
--------------------------------------------------------------------------------
一直沒(méi)怎么用10g的EM工具,今天打開(kāi)來(lái)看看,發(fā)現(xiàn)也有相傳已久的亂碼問(wèn)題.網(wǎng)上也流傳著N種解決方案,仔細(xì)看一下,其實(shí)這個(gè)問(wèn)題很好解決.
?
如果安裝時(shí),我們系統(tǒng)環(huán)境變量設(shè)置的是中文環(huán)境,那么就不會(huì)有這個(gè)問(wèn)題.這個(gè)問(wèn)題根本原因在于安裝時(shí),JDK/JRE字符集的自動(dòng)選擇.
?
在 $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來(lái)替換缺省字體定義文件:
?
[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?
?
清除所有g(shù)if文件即可.然后重新啟動(dòng)EM:
?
[oracle@danaly 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. [oracle@danaly 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 ?
?
現(xiàn)在登陸Web頁(yè)面,EM顯示就可以正常顯示中文了.
?
注意:如果經(jīng)過(guò)以上處理仍然不能正確顯示中文,請(qǐng)參考以下說(shuō)明:
?
打開(kāi)剛替換好的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指向中文字體文件,請(qǐng)確認(rèn)該文件在你的服務(wù)器上是否存在,如果不存在,改換一個(gè)存在的中文字體文件即可,也可以自行下載安裝新的字體文件:
?
?
?
[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
?
*******************************************************************************************
?
主機(jī)名改名后oracle database control 無(wú)法啟動(dòng)的問(wèn)題
上一篇 / 下一篇 ?2008-11-23 12:13:33 / 個(gè)人分類:oracle管理
?
查看( 366 ) / 評(píng)論( 2 ) / 評(píng)分( 0 / 0 )?
一、簡(jiǎn)介:
?
1.概念
?
Oracle10G的EM(企業(yè)管理器)采用了web方式,也就是直接打開(kāi)ie瀏覽器,輸入網(wǎng)址就可以訪問(wèn)oracle,進(jìn)而可以管理oracle.
?
Oracle10G的EM 分成了2個(gè)產(chǎn)品,database control(用于一個(gè)database的)和grid contro(用于多個(gè)database的)。這里遇到的問(wèn)題是在database control(用于一個(gè)database的)。Grid control據(jù)說(shuō)需要下載單獨(dú)的光盤安裝,這一點(diǎn)也我只是看到其他高手這么說(shuō)的,我并沒(méi)有做過(guò)。
?
下面一段話摘自http://www.cublog.cn/u/25565/showart_268270.html,十分感謝這位高手。
?
在用DBCA建庫(kù)的時(shí)候,可以選擇是否啟用dbcontrol,啟用的話需要在數(shù)據(jù)庫(kù)中建立一個(gè)sysman的schema,用于保存EM的一些數(shù)據(jù),這個(gè)就是EM的資料庫(kù)(repository)。
?
---摘錄完畢。
?
2.本機(jī)的環(huán)境
?
裝oralce 10g之前,忘記了改主機(jī)名,這樣一來(lái),是在裝完oracle后,去改的主機(jī)名,改完主機(jī)名后,還需要去改E:\oracle\product\10.2.0\db_1\network\admin\listener.ora ?這個(gè)文件,將其中的老主機(jī)名改為新主機(jī)名。這是個(gè)老問(wèn)題了,不知道oracle為什么不解決呢?呵呵。
?
二、解決過(guò)程:
?
Microsoft Windows XP [版本 5.1.2600]
(C) 版權(quán)所有 1985-2001 Microsoft Corp.
?
C:\Documents and Settings\Administrator>emctl
Environment variable ORACLE_SID not defined. Please define it.
?
C:\Documents and Settings\Administrator>set oracle_sid=oracle
?
C:\Documents and Settings\Administrator>emctl
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. ?All rights reserved.
Invalid arguments
?
Unknown command option
Usage::
?? Oracle Enterprise Manager 10g Database Control commands:
?? ? ? emctl start| stop| status| setpasswd dbconsole
?? ? ? emctl secure <options>
?
?? ? ? emctl set ssl test|off|on em
?? ? ? emctl set ldap <host> <port> <user dn> <user pwd> <context dn>
emctl blackout options can be listed by typing "emctl blackout"
emctl config options can be listed by typing "emctl config"
emctl secure options can be listed by typing "emctl secure"
emctl ilint ?options can be listed by typing "emctl ilint"
emctl deploy ?options can be listed by typing "emctl deploy"
?
C:\Documents and Settings\Administrator>emctl start dbconsole
Unable to determine local host from URL REPOSITORY_URL=http://shleiyanliang:%EM_
UPLOAD_PORT%/em/upload/
.
?
C:\Documents and Settings\Administrator>emca -config dbcontrol db
?
EMCA 開(kāi)始于 2008-11-23 12:07:02
EM Configuration Assistant 10.2.0.1.0 正式版
版權(quán)所有 (c) 2003, 2005, Oracle。保留所有權(quán)利。
?
輸入以下信息:
數(shù)據(jù)庫(kù) SID: oracle
已為數(shù)據(jù)庫(kù) oracle 配置了 Database Control
您已選擇配置 Database Control, 以便管理數(shù)據(jù)庫(kù) oracle
此操作將移去現(xiàn)有配置和默認(rèn)設(shè)置, 并重新執(zhí)行配置
是否繼續(xù)? [yes(Y)/no(N)]: y
監(jiān)聽(tīng)程序端口號(hào): 1521
SYS 用戶的口令:
DBSNMP 用戶的口令:
SYSMAN 用戶的口令:
SYSMAN 用戶的口令: 通知的電子郵件地址 (可選):leiyanliang@inspur.com
通知的發(fā)件 (SMTP) 服務(wù)器 (可選):
-----------------------------------------------------------------
?
已指定以下設(shè)置
?
數(shù)據(jù)庫(kù) ORACLE_HOME ................ E:\oracle\product\10.2.0\db_1
?
數(shù)據(jù)庫(kù)主機(jī)名 ................ shleiyanliang
監(jiān)聽(tīng)程序端口號(hào) ................ 1521
數(shù)據(jù)庫(kù) SID ................ oracle
通知的電子郵件地址 ...............leiyanliang@inspur.com
通知的發(fā)件 (SMTP) 服務(wù)器 ...............
?
-----------------------------------------------------------------
是否繼續(xù)? [yes(Y)/no(N)]: y
2008-11-23 12:07:43 oracle.sysman.emcp.EMConfig perform
信息: 正在將此操作記錄到 E:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\oracle\e
mca_2008-11-23_12-07-01-下午.log。
2008-11-23 12:07:47 oracle.sysman.emcp.util.DBControlUtil stopOMS
信息: 正在停止 Database Control (此操作可能需要一段時(shí)間)...
2008-11-23 12:07:56 oracle.sysman.emcp.util.DBControlUtil startOMS
信息: 正在啟動(dòng) Database Control (此操作可能需要一段時(shí)間)...
2008-11-23 12:08:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: 已成功啟動(dòng) Database Control
2008-11-23 12:08:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration
警告: 無(wú)法創(chuàng)建 Database Control 快捷方式
2008-11-23 12:08:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: >>>>>>>>>>> Database Control URL 為http://shleiyanliang:1158/em<<<<<<<<<
<<
已成功完成 Enterprise Manager 的配置
EMCA 結(jié)束于 2008-11-23 12:08:36
?
C:\Documents and Settings\Administrator>emctl status dbconcole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. ?All rights reserved.
Invalid arguments
?
Unknown command option status
Usage::
?? Oracle Enterprise Manager 10g Database Control commands:
?? ? ? emctl start| stop| status| setpasswd dbconsole
?? ? ? emctl secure <options>
?
?? ? ? emctl set ssl test|off|on em
?? ? ? emctl set ldap <host> <port> <user dn> <user pwd> <context dn>
emctl blackout options can be listed by typing "emctl blackout"
emctl config options can be listed by typing "emctl config"
emctl secure options can be listed by typing "emctl secure"
emctl ilint ?options can be listed by typing "emctl ilint"
emctl deploy ?options can be listed by typing "emctl deploy"
?
C:\Documents and Settings\Administrator>emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. ?All rights reserved.
http://shleiyanliang:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory E:\oracle\product\10.2.0\db_1/shleiyanliang_oracle/sysman/log
?
C:\Documents and Settings\Administrator>
?
------------------到此完畢!------------------
?
最后一句話:
?
Logs are generated in directory E:\oracle\product\10.2.0\db_1/shleiyanliang_oracle/sysman/log
?
應(yīng)該可以理解成database control的日志文件的所在位置吧?呵呵
?
?
?
這個(gè)完成之后,當(dāng)時(shí)我寫的郵箱:leiyanliang@inspur.com馬上就收到到郵件了,郵件主題如下:
EM_預(yù)警:_嚴(yán)重:_shleiyanliang_-_Filesystem_C:\_has_only_3.35%_available...
郵件內(nèi)容如下:
?
shleiyanliang
類型=Host
主機(jī)=shleiyanliang
度量=Filesystem Space Available (%)
Mount Point=C:\
時(shí)間戳=2008-11-23 下午12時(shí)23分23秒 CST
嚴(yán)重性=嚴(yán)重
消息=Filesystem C:\ has only 3.35% available space
規(guī)則名=Host Availability and Critical States
規(guī)則所有者=SYSMAN
?
實(shí)話說(shuō),這一點(diǎn)倒是挺好的,可以實(shí)時(shí)收到oracle自動(dòng)監(jiān)控的警告信息。
*******************************************************************************************
?
?
一、啟動(dòng)和關(guān)閉
以下是啟動(dòng)過(guò)程:
[oracle@wxq ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0 ?
Copyright (c) 1996, 2006 Oracle Corporation. ?All rights reserved.
http://wxq.mydomain:1158/em/console/aboutApplication?
Starting Oracle Enterprise Manager 10g Database Control ................................. started.?
------------------------------------------------------------------
Logs are generated in directory /opt/oracle/product/10.2.0/db_1/wxq.mydomain_devMISowb/sysman/log?
?
以下是關(guān)閉過(guò)程:
?
[oracle@wxq ~]$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0 ?
Copyright (c) 1996, 2006 Oracle Corporation. ?All rights reserved.
http://wxq.mydomain:1158/em/console/aboutApplication?
Stopping Oracle Enterprise Manager 10g Database Control ...... ?Stopped.
?
?
在第一次啟動(dòng)的時(shí)候,遇到了一個(gè)問(wèn)題,就是報(bào)錯(cuò)
[oracle@wxq ~]$ emctl start dbconsole
TZ set to PRC
OC4J Configuration issue. /opt/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_wxq.mydomain_devMISowb not found.?
[oracle@wxq ~]$ emctl start dbconsole
TZ set to PRC
EM Configuration issue. /opt/oracle/product/10.2.0/db_1/wxq.mydomain_devMISowb not found.?
?
原因是在安裝Oracle的時(shí)候是使用localhost.localdomain作為機(jī)器名的,所以以上兩個(gè)目錄都是用了這個(gè)機(jī)器名來(lái)創(chuàng)建。之后修改了機(jī)器名之后,OEM啟動(dòng)時(shí)就無(wú)法找到對(duì)應(yīng)的文件夾了,需要手動(dòng)修改一下名稱:
[oracle@wxq j2ee]$ mv OC4J_DBConsole_localhost.localdomain_devMISowb/ OC4J_DBConsole_wxq.mydomain_devMISowb
[oracle@wxq db_1]$ mv localhost.localdomain_devMISowb/ wxq.mydomain_devMISowb
?
?
二、登錄OEM問(wèn)題
?
啟動(dòng)的時(shí)候會(huì)有提示登錄地址,只要按照這個(gè)登錄地址就可以了。例如我的地址就是:
http://wxq.mydomain:1158/em/
?
?
如果OEM已經(jīng)啟動(dòng)了,可以通過(guò)emctl status dbconsole命令來(lái)查看:
?
[oracle@wxq ~]$ emctl status dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0 ?
Copyright (c) 1996, 2006 Oracle Corporation. ?All rights reserved.
http://wxq.mydomain:1158/em/console/aboutApplication?
Oracle Enterprise Manager 10g is running.?
------------------------------------------------------------------
Logs are generated in directory /opt/oracle/product/10.2.0/db_1/wxq.mydomain_devMISowb/sysman/log?
?
還可以通過(guò)以下文件查看Oracle的所有端口設(shè)置:
?
[oracle@wxq ~]$ cat /opt/oracle/product/10.2.0/db_1/install/portlist.ini?
iSQL*Plus HTTP port number =5560
Enterprise Manager Console HTTP Port (devMISowb) = 1158
Enterprise Manager Agent Port (devMISowb) = 1831?
?
三、emctl的其他操作
?
直接輸入emctl命令來(lái)查看emctl可以做的所有操作:
?
[oracle@wxq ~]$ emctl
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0 ?
Copyright (c) 1996, 2006 Oracle Corporation. ?All rights reserved.
Invalid arguments
?
Unknown command option?
Usage::?
?? Oracle Enterprise Manager 10g Database Control commands:
?? ? ? emctl start| stop| status| setpasswd dbconsole
?? ? ? emctl secure <options>
?
?? ? ? emctl set ssl test|off|on em
?? ? ? emctl set ldap <host> <port> <user dn> <user pwd> <context dn>
emctl blackout options can be listed by typing "emctl blackout"
emctl config options can be listed by typing "emctl config"
emctl secure options can be listed by typing "emctl secure"
emctl ilint ?options can be listed by typing "emctl ilint"
emctl deploy ?options can be listed by typing "emctl deploy"?
具體的操作等以后有空的時(shí)候嘗試一下。
?
四、遇到的問(wèn)題
?
開(kāi)啟之后發(fā)現(xiàn)部分按鈕的名稱在本地顯示亂碼,而且無(wú)法連接到OEM:
?
?
?
亂碼問(wèn)題具體的解決辦法可以參考:http://www.eygle.com/archives/2006/03/oracle10g_em_font_change.html
?
無(wú)法連接的問(wèn)題可以參見(jiàn):http://space.itpub.net/161195/viewspace-501482
?
?
?
?
?
?
?
?
以下轉(zhuǎn)貼以上兩個(gè)鏈接,以防失效:
*******************************************************************************************
Oracle10g EM亂碼之快速解決
作者:eygle |English Version 【轉(zhuǎn)載時(shí)請(qǐng)以超鏈接形式標(biāo)明文章出處和作者信息及本聲明】
鏈接: http://www.eygle.com/archives/2006/03/oracle10g_em_font_change.html?
--------------------------------------------------------------------------------
一直沒(méi)怎么用10g的EM工具,今天打開(kāi)來(lái)看看,發(fā)現(xiàn)也有相傳已久的亂碼問(wèn)題.網(wǎng)上也流傳著N種解決方案,仔細(xì)看一下,其實(shí)這個(gè)問(wèn)題很好解決.
?
如果安裝時(shí),我們系統(tǒng)環(huán)境變量設(shè)置的是中文環(huán)境,那么就不會(huì)有這個(gè)問(wèn)題.這個(gè)問(wèn)題根本原因在于安裝時(shí),JDK/JRE字符集的自動(dòng)選擇.
?
在 $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來(lái)替換缺省字體定義文件:
?
[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?
?
清除所有g(shù)if文件即可.然后重新啟動(dòng)EM:
?
[oracle@danaly 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. [oracle@danaly 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 ?
?
現(xiàn)在登陸Web頁(yè)面,EM顯示就可以正常顯示中文了.
?
注意:如果經(jīng)過(guò)以上處理仍然不能正確顯示中文,請(qǐng)參考以下說(shuō)明:
?
打開(kāi)剛替換好的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指向中文字體文件,請(qǐng)確認(rèn)該文件在你的服務(wù)器上是否存在,如果不存在,改換一個(gè)存在的中文字體文件即可,也可以自行下載安裝新的字體文件:
?
?
?
[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
?
*******************************************************************************************
?
主機(jī)名改名后oracle database control 無(wú)法啟動(dòng)的問(wèn)題
上一篇 / 下一篇 ?2008-11-23 12:13:33 / 個(gè)人分類:oracle管理
?
查看( 366 ) / 評(píng)論( 2 ) / 評(píng)分( 0 / 0 )?
一、簡(jiǎn)介:
?
1.概念
?
Oracle10G的EM(企業(yè)管理器)采用了web方式,也就是直接打開(kāi)ie瀏覽器,輸入網(wǎng)址就可以訪問(wèn)oracle,進(jìn)而可以管理oracle.
?
Oracle10G的EM 分成了2個(gè)產(chǎn)品,database control(用于一個(gè)database的)和grid contro(用于多個(gè)database的)。這里遇到的問(wèn)題是在database control(用于一個(gè)database的)。Grid control據(jù)說(shuō)需要下載單獨(dú)的光盤安裝,這一點(diǎn)也我只是看到其他高手這么說(shuō)的,我并沒(méi)有做過(guò)。
?
下面一段話摘自http://www.cublog.cn/u/25565/showart_268270.html,十分感謝這位高手。
?
在用DBCA建庫(kù)的時(shí)候,可以選擇是否啟用dbcontrol,啟用的話需要在數(shù)據(jù)庫(kù)中建立一個(gè)sysman的schema,用于保存EM的一些數(shù)據(jù),這個(gè)就是EM的資料庫(kù)(repository)。
?
---摘錄完畢。
?
2.本機(jī)的環(huán)境
?
裝oralce 10g之前,忘記了改主機(jī)名,這樣一來(lái),是在裝完oracle后,去改的主機(jī)名,改完主機(jī)名后,還需要去改E:\oracle\product\10.2.0\db_1\network\admin\listener.ora ?這個(gè)文件,將其中的老主機(jī)名改為新主機(jī)名。這是個(gè)老問(wèn)題了,不知道oracle為什么不解決呢?呵呵。
?
二、解決過(guò)程:
?
Microsoft Windows XP [版本 5.1.2600]
(C) 版權(quán)所有 1985-2001 Microsoft Corp.
?
C:\Documents and Settings\Administrator>emctl
Environment variable ORACLE_SID not defined. Please define it.
?
C:\Documents and Settings\Administrator>set oracle_sid=oracle
?
C:\Documents and Settings\Administrator>emctl
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. ?All rights reserved.
Invalid arguments
?
Unknown command option
Usage::
?? Oracle Enterprise Manager 10g Database Control commands:
?? ? ? emctl start| stop| status| setpasswd dbconsole
?? ? ? emctl secure <options>
?
?? ? ? emctl set ssl test|off|on em
?? ? ? emctl set ldap <host> <port> <user dn> <user pwd> <context dn>
emctl blackout options can be listed by typing "emctl blackout"
emctl config options can be listed by typing "emctl config"
emctl secure options can be listed by typing "emctl secure"
emctl ilint ?options can be listed by typing "emctl ilint"
emctl deploy ?options can be listed by typing "emctl deploy"
?
C:\Documents and Settings\Administrator>emctl start dbconsole
Unable to determine local host from URL REPOSITORY_URL=http://shleiyanliang:%EM_
UPLOAD_PORT%/em/upload/
.
?
C:\Documents and Settings\Administrator>emca -config dbcontrol db
?
EMCA 開(kāi)始于 2008-11-23 12:07:02
EM Configuration Assistant 10.2.0.1.0 正式版
版權(quán)所有 (c) 2003, 2005, Oracle。保留所有權(quán)利。
?
輸入以下信息:
數(shù)據(jù)庫(kù) SID: oracle
已為數(shù)據(jù)庫(kù) oracle 配置了 Database Control
您已選擇配置 Database Control, 以便管理數(shù)據(jù)庫(kù) oracle
此操作將移去現(xiàn)有配置和默認(rèn)設(shè)置, 并重新執(zhí)行配置
是否繼續(xù)? [yes(Y)/no(N)]: y
監(jiān)聽(tīng)程序端口號(hào): 1521
SYS 用戶的口令:
DBSNMP 用戶的口令:
SYSMAN 用戶的口令:
SYSMAN 用戶的口令: 通知的電子郵件地址 (可選):leiyanliang@inspur.com
通知的發(fā)件 (SMTP) 服務(wù)器 (可選):
-----------------------------------------------------------------
?
已指定以下設(shè)置
?
數(shù)據(jù)庫(kù) ORACLE_HOME ................ E:\oracle\product\10.2.0\db_1
?
數(shù)據(jù)庫(kù)主機(jī)名 ................ shleiyanliang
監(jiān)聽(tīng)程序端口號(hào) ................ 1521
數(shù)據(jù)庫(kù) SID ................ oracle
通知的電子郵件地址 ...............leiyanliang@inspur.com
通知的發(fā)件 (SMTP) 服務(wù)器 ...............
?
-----------------------------------------------------------------
是否繼續(xù)? [yes(Y)/no(N)]: y
2008-11-23 12:07:43 oracle.sysman.emcp.EMConfig perform
信息: 正在將此操作記錄到 E:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\oracle\e
mca_2008-11-23_12-07-01-下午.log。
2008-11-23 12:07:47 oracle.sysman.emcp.util.DBControlUtil stopOMS
信息: 正在停止 Database Control (此操作可能需要一段時(shí)間)...
2008-11-23 12:07:56 oracle.sysman.emcp.util.DBControlUtil startOMS
信息: 正在啟動(dòng) Database Control (此操作可能需要一段時(shí)間)...
2008-11-23 12:08:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: 已成功啟動(dòng) Database Control
2008-11-23 12:08:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration
警告: 無(wú)法創(chuàng)建 Database Control 快捷方式
2008-11-23 12:08:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: >>>>>>>>>>> Database Control URL 為http://shleiyanliang:1158/em<<<<<<<<<
<<
已成功完成 Enterprise Manager 的配置
EMCA 結(jié)束于 2008-11-23 12:08:36
?
C:\Documents and Settings\Administrator>emctl status dbconcole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. ?All rights reserved.
Invalid arguments
?
Unknown command option status
Usage::
?? Oracle Enterprise Manager 10g Database Control commands:
?? ? ? emctl start| stop| status| setpasswd dbconsole
?? ? ? emctl secure <options>
?
?? ? ? emctl set ssl test|off|on em
?? ? ? emctl set ldap <host> <port> <user dn> <user pwd> <context dn>
emctl blackout options can be listed by typing "emctl blackout"
emctl config options can be listed by typing "emctl config"
emctl secure options can be listed by typing "emctl secure"
emctl ilint ?options can be listed by typing "emctl ilint"
emctl deploy ?options can be listed by typing "emctl deploy"
?
C:\Documents and Settings\Administrator>emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. ?All rights reserved.
http://shleiyanliang:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory E:\oracle\product\10.2.0\db_1/shleiyanliang_oracle/sysman/log
?
C:\Documents and Settings\Administrator>
?
------------------到此完畢!------------------
?
最后一句話:
?
Logs are generated in directory E:\oracle\product\10.2.0\db_1/shleiyanliang_oracle/sysman/log
?
應(yīng)該可以理解成database control的日志文件的所在位置吧?呵呵
?
?
?
這個(gè)完成之后,當(dāng)時(shí)我寫的郵箱:leiyanliang@inspur.com馬上就收到到郵件了,郵件主題如下:
EM_預(yù)警:_嚴(yán)重:_shleiyanliang_-_Filesystem_C:\_has_only_3.35%_available...
郵件內(nèi)容如下:
?
shleiyanliang
類型=Host
主機(jī)=shleiyanliang
度量=Filesystem Space Available (%)
Mount Point=C:\
時(shí)間戳=2008-11-23 下午12時(shí)23分23秒 CST
嚴(yán)重性=嚴(yán)重
消息=Filesystem C:\ has only 3.35% available space
規(guī)則名=Host Availability and Critical States
規(guī)則所有者=SYSMAN
?
實(shí)話說(shuō),這一點(diǎn)倒是挺好的,可以實(shí)時(shí)收到oracle自動(dòng)監(jiān)控的警告信息。
*******************************************************************************************
總結(jié)
以上是生活随笔為你收集整理的Oracle10g中OEM相关问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Undo TableSpace ②.回滚
- 下一篇: Undo TableSpace ①.管理