有这样一个现象,在DB2安装后,使用db2icrt 来创建实例时,提示主机名无效,提示如下:

 

  1. [root@centos-0 instance]# ./db2icrt -u db2inst1 db2inst1

  2. The host name "centos-0.msdomain" is invalid. Specify a valid host name.

  3. DBI1922N  The host name is not valid.

  4. Explanation:

  5. The TCP/IP host name parameter is not valid or does not exist.

  6. User response:

  7. Ensure that TCP/IP is operational on the system. If a domain name server

  8. is used, ensure that the domain name server machine is active. Issue the

  9. command again using the correct TCP/IP host name.

  10. DBI1079I  Output is saved in the log file /tmp/db2icrt.log.2816.

  11. Explanation:

  12. All processed and failed operations have been saved into this log file.

  13. User response:

  14. Do not modify this file in any way. This file is for IBM Technical

  15. Support reference.

  16. /opt/ibm/db2/V9.7/instance/db2iutil: line 2528: DB2INSTVER: parameter null or not set

检查 /opt/ibm/db2/V9.7/instance/db2iutil 文件(非提示的2528行),发现有如下内容

 

  1. ${DB2DIR?}/instance/db2isrv -addfcm -i ${INSTNAME?} ${DB2ISRVOPTS?}

  2. if [ $? -eq 3 ]; then

  3. db2isrv

  4. ${DB2DIR?}/instance/db2isrv -addfcm -i ${INSTNAME?} ${DB2ISRVOPTS?}

  5. if [ $? -eq 3 ]; then

  6. display_msg ${DB2CAT?} 922 \

  7. 'DBI1922N  The host name is not valid.\n'<pre name="code" class="plain">            stop_prog 1</pre> fi<p></p>

  8. <pre></pre>

  9. <br>

  10. 就是当db2isrv -addcfm -i ${INSTNAME?} ${DB2ISRVOPTS?} 返回为3的时候提示主机名称不正确。<br>

  11. 这个db2isrv 找了很多东西,没找到具体的内容,看名字是给系统增加一个服务。后面是addfmc ,这个fmc是DB2的故障守护进程。<br>

  12. 这个是监测DB2实例正常运行,当实例异常宕机后,它会自动启动实例。那么以上的错误可以连起来了:<br>

  13. 再给系统增加一个DB2守护进程的时候失败了,原因是主机名不对。<br>

  14. 好的,看一下主机名定义<br>

  15. <p></p>

  16. <p></p><pre name="code" class="plain">[root@centos-0 instance]# hostname

  17. centos-0.msdomain</pre>这没问题<br>

  18. 再看<p></p>

  19. <p></p><pre name="code" class="plain">[root@centos-0 instance]# vi /etc/hosts

  20. 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

  21. ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6</pre><br>

  22. 这个地方不知为什么CENTOS装好之后没有修改,修改一下。修改后内容如下<br>

  23. <p></p>

  24. <p></p><pre name="code" class="plain">[root@centos-0 instance]# vi /etc/hosts

  25. 127.0.0.1   localhost centos.msdomain localhost4 localhost4.localdomain4

  26. ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6</pre><br>

  27. 保存再次执行创建实例,正常<p></p>

  28. <p><br>

  29. </p>

db2icrt创建实例,提示主机名无效的更多相关文章

  1. ORACLE提示表名无效

    在创建ORACLE数据库时,创建表 提示表名无效 请查看数据库表名是否出现了小写字母或者关键字,如USER

  2. SQL Server 2008 r2 中 SQL语句提示“对象名无效”,但可执行

    [问题描述]在使用 SQL Server 2008 r2 时,有时在完成SQL书写后,会提示“对象名无效”,而SQL语句可正常执行. [原因]缓存相关. [解决方法]ctrl+shift+R 刷新下, ...

  3. AWS CentOS7 实例修改主机名

    问题描述: AWS EC2 实例在升级到CentOS7以后,我们发现主机名的修改不再像之前的版本(CentOS 5/6)一样简单. 每次新建实例之后,修改好主机名,重启或者克隆之后的机器,主机名还是会 ...

  4. mysql启动服务时提示"服务名无效"

    1,首先说明一下我的环境,我刚开始是用的XAMPP这个集成的软件,里面安装了apache, mysql,tomcat这些软件,然后通过控制面板对其进行启动关闭的操作,这些操作很方便,但是我就用net ...

  5. Mysql----mysql启动服务时提示"服务名无效"

    1,首先说明一下我的环境,我刚开始是用的XAMPP这个集成的软件,里面安装了apache, mysql,tomcat这些软件,然后通过控制面板对其进行启动关闭的操作,这些操作很方便,但是我就用net ...

  6. 关于DOS下启动MySQL时提示服务名无效

    主要原因:启动时:net start mysql 而打开服务后发现,本地服务中mysql这个服务实际名字为mysql55,故启动语句应为:net  start mysql55: 以下摘自课程提问: 你 ...

  7. DOS下启动MySQL时输入net start mysql 提示服务名无效的问题

    原因:mysql服务名错误. 正确做法:net start  +mysql服务名

  8. python easy install时,使用aliyun阿里云镜像提示主机名不匹配的问题

    因网络问题,因此设置 easy_install 使用阿里云的源, ## 更新 easy_install 源 tee ~/.pydistutils.cfg <<-'EOF' [easy_in ...

  9. SQL查询语句可以执行,但是提示对象名无效

    类似于缓存的问题,ctrl+shift+R 刷新下 一般就好了

随机推荐

  1. 【openGL】画五角星

    #include "stdafx.h" #include <GL/glut.h> #include <stdlib.h> #include <math ...

  2. C#路径/文件/目录/I/O常见操作汇总

    文件操作是程序中非常基础和重要的内容,而路径.文件.目录以及I/O都是在进行文件操作时的常见主题,这里想把这些常见的问题作个总结,对于每个问题,尽量提供一些解决方案,即使没有你想要的答案,也希望能提供 ...

  3. 【使用Unity开发Windows Phone上的2D游戏】(1)千里之行始于足下

    写在前面的 其实这个名字起得不太欠当,Unity本身是很强大的工具,可以部署到很多个平台,而不仅仅是可以开发Windows Phone上的游戏. 只不过本人是Windows Phone 应用开发出身, ...

  4. indeterminateDrawable

    Android原生控件只有横向进度条一种,而且没法变换样式,比如原生rom的样子很丑是吧,当伟大的产品设计要求更换前背景,甚至纵向,甚至圆弧状的,咋办,比如ok,我们开始吧: 一)变换前背景 先来看看 ...

  5. SQLServer 维护脚本分享(11)部分DBCC及系统存储过程

    --DBCC命令与用法 DBCC HELP('?') DBCC HELP('useroptions') DBCC USEROPTIONS WITH NO_INFOMSGS --当前DB的区及文件 DB ...

  6. 关于c中 int, float, double转换中存在的精度损失问题

    先看一段代码实验: #include<limits> #include<iostream> using namespace std; int main() { unsigned ...

  7. Webbrowser中显示MHT文件

    把MHT文件存成临时文件,用WEBBROWSER的Navigate方法打开,代码如下: //从程序集中读取资源文件 Assembly asmm = Assembly.GetCallingAssembl ...

  8. CSS3鼠标悬停图片动画

    鼠标放到图片上后: demo地址:demo div: <div class="wai"> <a href="#"> <div cl ...

  9. Android ListView滑动过程中图片显示重复错乱闪烁问题解决

    最新内容建议直接访问原文:Android ListView滑动过程中图片显示重复错乱闪烁问题解决 主要分析Android ListView滚动过程中图片显示重复.错乱.闪烁的原因及解决方法,顺带提及L ...

  10. MFC 设置控件事件对应的函数

    在项目中,右击你想设置的控件,打开属性. 然后找到:控件事件,如果在Visual Studio 2015中操作,显示如图: 然后,以设定单击事件为例: 点击右边的三角,选择 <Edit Code ...