飘叶
作者飘叶·2013-12-18 17:36
数据库管理员·volkswagen

非常诡异的一次数据库实例创建失败

字数 1455阅读 3988评论 1赞 7

一台新机器,以root身份,安装DB2后,然后将license 解压开,然后创建实例/opt/ibm/db2/V9.7/instance/db2icrt -a server -u db2fenc1 db2inst1,报如下错误: 

cp: omitting directory `/opt/data/ibm/db2/V9.7/adm/db2V9.7'
DBI1086E  An attempt to copy the file or directory /opt/data/ibm/db2/V9.7/adm to
      /home/db2inst1/sqllib/adm failed.

Explanation:

An error occurred when attempting to duplicate the given file or
directory. The command could not be processed successfully.

User response:

Determine why the specified file or directory could not be copied and
then try the command again.

执行/opt/ibm/db2/V9.7/instance/db2ilist发现有值,切换db2inst1 用户执行db2start失败,创建实例不成功,
见鬼了,root居然没有拷贝权限,这不瞎扯啊。感觉像是创建实例时会拷贝安装目录下的adm目录到实例目录下,不服,再来,看看创建实例时究竟做啥,删除实例目录下的sqllib文件夹,开启debug模式,

/opt/ibm/db2/V9.7/db2icrt -d -a server  -u db2fenc1 db2inst1 > $HOME/a.log,查看a.log最后几行

## call function update_adm
DBI1086E  An attempt to copy the file or directory /opt/data/ibm/db2/V9.7/adm to
      /home/db2inst1/sqllib/adm failed.

Explanation:

An error occurred when attempting to duplicate the given file or
directory. The command could not be processed successfully. 可以定位update_adm,仔细检查adm目录下,突然发现我解压的license文件夹在adm目录下,mv走,创建成功。adm目录下共有47个文件,全部为bin  bin,

猜测创建实例时update_adm可能用db2inst1用户整体拷贝安装目录下的adm文件夹到实例用户sqllib目录下,由于多了一个root  root的文件夹,结果导致失败。后来尝试用root用户创建文件,db2icrt 成功。后来尝试将文件夹更改权限777,更改chown -R bin:bin  XXX,不过实例始终不能创建成功。为啥有文件夹就不行呢?

 

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

7

添加新评论1 条评论

atpeace331atpeace331数据库管理员银行
2014-08-19 09:41
好文章!我之前也遇到过,查看 /tmp 目录下的db2icrt.***.log和db2trc.trc.*** 日志找到错误的。
Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广