問題:emctl start dbconsole不能啟動
創(chuàng)新互聯(lián)建站是一家專業(yè)提供凌源企業(yè)網(wǎng)站建設(shè),專注與成都網(wǎng)站設(shè)計、做網(wǎng)站、成都外貿(mào)網(wǎng)站建設(shè)公司、HTML5、小程序制作等業(yè)務(wù)。10年已為凌源眾多企業(yè)、政府機構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站制作公司優(yōu)惠進行中。
1、 Lsnrctl監(jiān)聽程序正常啟動
2、 emca -config dbcontrol db -repos recreate重建數(shù)據(jù)庫出現(xiàn)如下報錯:
但是也用export ORACLE_UNQNAME=orcl設(shè)置過
3、 查看日志error 111
[tom@004 log]$ pwd
/u01/app/tom/product/11.2.0/dbhome_1/localhost_orcl/sysman/log
[tom@004 log]$ more emdctl.trc
......
2014-06-28 01:32:03,320 Thread-3266332416 WARN http: nmehl_connect_internal: connect failed to (localhost:1158): 拒絕連接 (error = 111)
4、 包括環(huán)境變量、/etc/hosts、/etc/sysconfig/network設(shè)置也都正確
5、 [tom@004 log]$ emctl status dbconsole
OC4J Configuration issue. /u01/app/tom/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_0.0.0.4_orcl not found.
注意紅色部分,我主機名是004,而查看emctl啟動的時候,某些參數(shù)被解析成了.0.0.04
最終換個主機名zhou,問題得以解決。
問題:用Oracle SQL Developer連接數(shù)據(jù)庫出現(xiàn)如下報錯:
listener does not currently know of sid
1、 查看數(shù)據(jù)庫實例名:
[tom@zhou ~]$ echo $ORACLE_SID
orcl
2、 查看相關(guān)配置文件
[tom@zhou admin]$ pwd
/u01/app/tom/product/11.2.0/dbhome_1/network/admin
[tom@zhou admin]$ ls
listener.ora samples shrept.lst sqlnet.ora tnsnames.ora
[tom@zhou admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/tom/product/11.2.0/dbhome_1/
network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
[tom@zhou admin]$ more listener.ora
# listener.ora Network Configuration File: /u01/app/tom/product/11.2.0/dbhome_1/
network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01/app/tom
紅色部分應(yīng)該是localohst,默認有可能是localhost.domain
一、環(huán)境變量:
[tom@zhou ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/tom/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_HOSTNAME=localhost
[tom@zhou ~]$ hostname
zhou
二、Hosts文件:
[tom@zhou ~]$
[tom@zhou ~]$ cat /etc/hosts
127.0.0.1localhost.localdomainlocalhost.localdomainlocalhost4localhost4.localdomain4localhostzhou
::1localhost.localdomainlocalhost.localdomainlocalhost6localhost6.localdomain6 localhostzhou
三、主機名:
[tom@zhou ~]$ hostname
zhou
[tom@zhou ~]$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=zhou
設(shè)置主機名,最好用root用戶使用setup工具進行修改,在這里修改主機名,系統(tǒng)自己都會把好幾個地方的配置文件都會改好。
本文名稱:Linux安裝oracle11g常見問題
網(wǎng)頁網(wǎng)址:http://aaarwkj.com/article20/gjcoco.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站改版、自適應(yīng)網(wǎng)站、、微信公眾號、企業(yè)網(wǎng)站制作、搜索引擎優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)