用镜头记录,用心灵体验 | 订阅本站 | 所有笔记 | 亲和力设计 | 流量

DB2 学习笔记

博客话题:DB2,Linux,Web,业余无线电,户外,摄影,截拳道,Thankpad,其他

DB2 数据库

DB2 connect 错误 SQLEUCCM: SQL0969N

DB2 v8.2 客户端连接任何DB2 Server出错:

SQL0969N  There is no message text corresponding to SQL error "-2079391743" in 
the message file on this workstation.  The error was returned from module 
"SQLEUCCM" with original tokens "".

事实上是,使用客户端instance owner 运行db2 connect 一切正常,当使用其它用户source instance owner 的db2profile 之后,运行db2 connect 出现以上错误,即使将此用户加入到instance owner 的group 也是同样错误。Google 到问题产生的原因: SQLEUCCM error message for DB2 - Coffee|Code : Dan Scott, Caffeinated Librarian Geek

我这里的原因与上文有点差别,我更改了客户端instance 的参数DFTDBPATH ,其默认在instance owner 的HOME,我将其更改为其它路径/db2,这个目录的owner为root,通过group db2授权给客户端instance owner,所有的数据库数据文件将被创建在这个目录下的子目录,子目录与instance owner 同名,虽然子目录完全属于instance owner,并且instance owner 也是其父目录/db2的group 成员(对group成员授与了完全权限),DB2 客户端还会要求似乎不需要的权限,并报出以上错误。

上面描述的情况有点混乱,简单概括一下:

  • DB2 v8.2 客户端instance owner and group: db2amor:db2amor (用户db2amor 也是group db2的成员)
  • DFTDBPATH 与权限: /db2 root:db2 770
  • instance 数据路径与权限: /db2/db2amor db2amor:db2amor 775

使用其它用户source db2amor 的db2profile 之后连接数据库出错,即使将其加入db2amor group 成员也不行。

我的解决方法与上文也有差别,我将需要使用DB2 客户端的用户加入DFTDBPATH 所属group: db2(不需要加入instance owner group: db2amor)

# usermod -aG db2 USER_NAME

产生前面的问题,是因为我使用了DB2 Server instance 中的客户端。其实有个更好的方法避免上述的问题,就是创建独立的DB2 客户端instance,无论是v8 还是v9,这就根本上避免了我们不希望的权限请求。

# /opt/IBM/db2/V8.1/instance/db2icrt -s client INSTANCE_NAME 

Alex's picture

my email address in picture

搜索|Search

评论|Recent Comments

按月归档|By Month

2009
07
2008
11
10
07
05
04
03
02
01
2007
12
10
07
06
05
04
03
02
01
2006
12
11
10
09
08
07
06
05
04
03
02
01
2005
11
10
09
08
07
04
03
2004
12
11
10
09
08
07
06
05
04
03
02
01
2003
12
10
09
08
06
2002
09
08
04
03
02
2001
12
09
07
06
05

我读|My Books

我的链接|My Links

我的朋友|My Friends

Creative Commons License
This blog is licensed under a Creative Commons License.
Movable Type 4 Logo