有這樣一個現(xiàn)象,在DB2安裝后,使用db2icrt 來創(chuàng)建實例時,提示主機名無效,提示如下:
創(chuàng)新互聯(lián)專業(yè)為企業(yè)提供榕城網(wǎng)站建設、榕城做網(wǎng)站、榕城網(wǎng)站設計、榕城網(wǎng)站制作等企業(yè)網(wǎng)站建設、網(wǎng)頁設計與制作、榕城企業(yè)網(wǎng)站模板建站服務,十多年榕城做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡服務。
[plain] view plain copy
[root@centos-0 instance]# ./db2icrt -u db2inst1 db2inst1
The host name "centos-0.msdomain" is invalid. Specify a valid host name.
DBI1922N The host name is not valid.
Explanation:
The TCP/IP host name parameter is not valid or does not exist.
User response:
Ensure that TCP/IP is operational on the system. If a domain name server
is used, ensure that the domain name server machine is active. Issue the
command again using the correct TCP/IP host name.
DBI1079I Output is saved in the log file /tmp/db2icrt.log.2816.
Explanation:
All processed and failed operations have been saved into this log file.
User response:
Do not modify this file in any way. This file is for IBM Technical
Support reference.
/opt/ibm/db2/V9.7/instance/db2iutil: line 2528: DB2INSTVER: parameter null or not set
檢查 /opt/ibm/db2/V9.7/instance/db2iutil 文件(非提示的2528行),發(fā)現(xiàn)有如下內(nèi)容
[plain] view plain copy
${DB2DIR?}/instance/db2isrv -addfcm -i ${INSTNAME?} ${DB2ISRVOPTS?}
if [ $? -eq 3 ]; then
db2isrv
${DB2DIR?}/instance/db2isrv -addfcm -i ${INSTNAME?} ${DB2ISRVOPTS?}
if [ $? -eq 3 ]; then
display_msg ${DB2CAT?} 922 \
'DBI1922N The host name is not valid.\n'<pre name="code" class="plain"> stop_prog 1</pre> fi<p></p>
<pre></pre>
<br>
就是當db2isrv -addcfm -i ${INSTNAME?} ${DB2ISRVOPTS?} 返回為3的時候提示主機名稱不正確。<br>
這個db2isrv 找了很多東西,沒找到具體的內(nèi)容,看名字是給系統(tǒng)增加一個服務。后面是addfmc ,這個fmc是DB2的故障守護進程。<br>
這個是監(jiān)測DB2實例正常運行,當實例異常宕機后,它會自動啟動實例。那么以上的錯誤可以連起來了:<br>
再給系統(tǒng)增加一個DB2守護進程的時候失敗了,原因是主機名不對。<br>
好的,看一下主機名定義<br>
<p></p>
<p></p><pre name="code" class="plain">[root@centos-0 instance]# hostname
centos-0.msdomain</pre>這沒問題<br>
再看<p></p>
<p></p><pre name="code" class="plain">[root@centos-0 instance]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6</pre><br>
這個地方不知為什么CENTOS裝好之后沒有修改,修改一下。修改后內(nèi)容如下<br>
<p></p>
<p></p><pre name="code" class="plain">[root@centos-0 instance]# vi /etc/hosts
127.0.0.1 localhost centos.msdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6</pre><br>
保存再次執(zhí)行創(chuàng)建實例,正常<p></p>
<p><br>
</p>
網(wǎng)站欄目:db2創(chuàng)建實例Thehostname"fordatabase"isinvalid.Specifyavalidhostname.
本文路徑:http://jinyejixie.com/article48/johhep.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站制作、微信小程序、手機網(wǎng)站建設、靜態(tài)網(wǎng)站、網(wǎng)站建設、外貿(mào)建站
聲明:本網(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)