如何查看db2 产品是否有root 安装的,安装的什么db2的那个产品呢?

来源:互联网 发布:移动网络电影网站 编辑:程序博客网 时间:2024/06/02 09:57

今天看到群友问了两个问题:

1 怎么确认我的db2是否由root安装的呢?


其实从DB2UDB V9.1有了db2ls这个命令后,这个问题就简单多了,我们只需要简单的跑下db2ls,然后看输出的Installer UID是否为0rootuid),如下图所示:

[db2v975@db2udb ~]$ db2lsInstallPath                   Level   Fix Pack  Special Install Number   InstallDate                 Installer UID---------------------------------------------------------------------------------------------------------------------/opt/ibm/db2/V10.1              10.1.0.2       2                           edNov 20 02:27:07 2013PST             0/opt/ibm/db2/V9.1                9.1.0.8       8                           Sun Dec  1 23:14:06 2013PST             0/opt/ibm/db2/V9.5                9.5.0.6       6a                          Sun Dec  1 23:17:40 2013PST             0/opt/ibm/db2/V9.7                9.7.0.5       5                           Sun Dec  1 23:21:11 2013PST             0[db2v975@db2udb install]$ id rootuid=0(root)gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)[db2v975@db2udb install]$


可以看到我虚拟机上的四个db2都是有root安装的。

 

2 怎么知道我装的是db2的什么产品(db2ese,connect,client,aese…etc)呢?

这个问题同样可以用db2ls来解决,这次我们需要用到db2ls的几个参数:

-q

Signifies that the query is to list installed DB2 productsand features. By default, only the visible components (features) are displayedunless the -a parameter is also specified.

-p

Lists products only. This will give a brief list of whichproducts the customer has installed rather than listing the features.

-b base-install-path

When using the global db2ls command in /usr/local/bin, youneed to specify which directory you are querying. The global db2ls command willsimply call the db2ls from that install path and pass in the rest of theparameters.

DB2的db2ls能列指定安装目录下的db2是什么产品。


Example :

[db2v975@db2udb install]$ db2ls-q -p -b /opt/ibm/db2/V10.1Install Path : /opt/ibm/db2/V10.1Product Response File ID                  Level   Fix Pack  Product Description---------------------------------------------------------------------------------------------------------------------ENTERPRISE_SERVER_EDITION               10.1.0.2          2  DB2 EnterpriseServer Edition[db2v975@db2udb install]$


 

附:db2ls- List installed DB2 products and features command

http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.cmd.doc%2Fdoc%2Fr0023668.html&resultof%3D%2522%2564%2562%2532%256c%2573%2522%2520%2522%2564%2562%2532%256c%2522%2520

 


0 0
原创粉丝点击