如何列出实例数据库 [英] How to list an instances databases

查看:68
本文介绍了如何列出实例数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个命令会列出本地机器上特定

实例的所有数据库,无论它们是否被激活?


如果没有这样的命令,是否至少有一种方法只列出db目录中的本地

数据库,并将它们绑定到它们所属的实例
属于?

-

Chuck

删除" _nospam"通过电子邮件回复

解决方案



" Chuck" < CH *********** @ softhome.net>在留言中写道

news:Xn ********************************** @ 130.133 。 1.4 ...

是否有一个命令会列出本地机器上特定
实例的所有数据库,无论它们是否被激活?
如果没有这样的命令,是否至少有一种方法只列出db目录中的
本地数据库,并将它们绑定回它们所属的实例?




您没有说出您使用的是哪个DB2平台和版本,所以我的评论

与Windows上的V7.2(PE)有关。


这不是世界上最好的解决方案,但如果您使用Control

Center,您可以轻松列出属于每个实例的数据库。要确定哪些是活动的,只需执行:

db2 list active databases


输出列出每个数据库的名称活跃的数据库。那个

应该能让你确定哪些是活动的,哪些不是。


就像我说的那样,这是一些手工工作,特别是如果你有很多

的数据库,但是他们说努力工作建立了性格;-)


如果这是你必须经常做的事情,你可能是能够通过DB2 API为你自己的实用程序编写
。或不;我还没看好是否

必要的功能都存在于API中。


Rhino


Chuck写道:

是否有一个命令会列出本地机器上特定
实例的所有数据库,无论它们是否被激活?



列表数据库目录

----- =通过Newsfeeds.Com发布,未经审查的Usenet新闻= -----
< a rel =nofollowhref =http://www.newsfeeds.comtarget =_ blank> http://www.newsfeeds.com - 世界排名第一的新闻组服务! />
----- ==超过100,000个新闻组 - 19个不同的服务器! = -----


Ian< ia ***** @ mobileaudio.com>在新闻中写道:40b6d34d


Is there a command that will list all of the databases for a particular
instance on the local machine, whether they are activated or not?

If there is no such command, is there at least a way to list only the local
databases in the db directory, and tie them back to the instance they
belong to?
--
Chuck
Remove "_nospam" to reply by email

解决方案


"Chuck" <ch***********@softhome.net> wrote in message
news:Xn**********************************@130.133. 1.4...

Is there a command that will list all of the databases for a particular
instance on the local machine, whether they are activated or not?

If there is no such command, is there at least a way to list only the local databases in the db directory, and tie them back to the instance they
belong to?



You didn''t say which DB2 platform and version you are using so my remarks
pertain to V7.2 (PE) on Windows.

It''s not the neatest solution in the world but if you use the Control
Center, you can easily list which databases belong to each instance. To
determine which ones are active, just execute:
db2 list active databases

The output lists the database names of each database that is active. That
should enable you to determine which ones are active and which are not.

Like I said, it''s a bit of manual work, especially if you have a lot of
databases, but they say hard work builds character ;-)

If this is something you have to do frequently, you may be able to write
your own utility for it via the DB2 API. Or not; I haven''t looked to see if
the necessary functions are all present in the API.

Rhino


Chuck wrote:

Is there a command that will list all of the databases for a particular
instance on the local machine, whether they are activated or not?



list database directory
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----


Ian <ia*****@mobileaudio.com> wrote in news:40b6d34d


这篇关于如何列出实例数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆