473,804 Members | 3,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to list an instances databases

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
Nov 12 '05 #1
11 36079

"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
Nov 12 '05 #2
Ian
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! =-----
Nov 12 '05 #3
Ian <ia*****@mobile audio.com> wrote in news:40b6d34d$1 _1
@corp.newsgroup s.com:
list database directory


That lists all databases cataloged in the DB directory. Even one's on other
machines. What I'm looking for is a list of the databases that belong to
one instance on the local machine.

Platform AIX 5.2, DB2 8.1.

--
Chuck
Remove "_nospam" to reply by email
Nov 12 '05 #4
In article <Xn************ *************** *******@130.133 .1.4>, Chuck
(ch***********@ softhome.net) says...
Ian <ia*****@mobile audio.com> wrote in news:40b6d34d$1 _1
@corp.newsgroup s.com:
list database directory


That lists all databases cataloged in the DB directory. Even one's on other
machines. What I'm looking for is a list of the databases that belong to
one instance on the local machine.

Platform AIX 5.2, DB2 8.1.


db2 list db directory on <local-path>
Nov 12 '05 #5
Ian
Chuck wrote:
Ian <ia*****@mobile audio.com> wrote in news:40b6d34d$1 _1
@corp.newsgroup s.com:

list database directory

That lists all databases cataloged in the DB directory. Even one's on other
machines. What I'm looking for is a list of the databases that belong to
one instance on the local machine.

Platform AIX 5.2, DB2 8.1.


OK, I guess I'm not following. You can use grep to eliminate the remote
databases from the 'list database directory' output:

db2 list db directory | grep -vp Remote

If you're looking for other databases that do not exist in the database
directory... you may have a bigger problem. :-)

-----= 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! =-----
Nov 12 '05 #6
list db directory on /db2dir (db directory path) : will show local database
list active databases : will show databases that are active
Chuck <ch***********@ softhome.net> wrote in message news:<Xn******* *************** ************@13 0.133.1.4>...
Ian <ia*****@mobile audio.com> wrote in news:40b6d34d$1 _1
@corp.newsgroup s.com:
list database directory


That lists all databases cataloged in the DB directory. Even one's on other
machines. What I'm looking for is a list of the databases that belong to
one instance on the local machine.

Platform AIX 5.2, DB2 8.1.

Nov 12 '05 #7
ud****@yahoo.co m (Mike Lebermann) wrote in
news:f4******** *************** **@posting.goog le.com:
list db directory on /db2dir (db directory path) : will show local
database list active databases : will show databases that are
active Chuck <ch***********@ softhome.net> wrote in message
news:<Xn******* *************** ************@13 0.133.1.4>...
Ian <ia*****@mobile audio.com> wrote in news:40b6d34d$1 _1
@corp.newsgroup s.com:
> list database directory


That lists all databases cataloged in the DB directory. Even one's on
other machines. What I'm looking for is a list of the databases that
belong to one instance on the local machine.

Platform AIX 5.2, DB2 8.1.


Only if all the databases are on the same path. I can have two databases
in the same instance that are not on the same path.
--
Chuck
Remove "_nospam" to reply by email
Nov 12 '05 #8
Gert van der Kooij <ge**@invalid.n l> wrote in
news:MP******** *************** *@news.xs4all.n l:
In article <Xn************ *************** *******@130.133 .1.4>, Chuck
(ch***********@ softhome.net) says...
Ian <ia*****@mobile audio.com> wrote in news:40b6d34d$1 _1
@corp.newsgroup s.com:
> list database directory


That lists all databases cataloged in the DB directory. Even one's on
other machines. What I'm looking for is a list of the databases that
belong to one instance on the local machine.

Platform AIX 5.2, DB2 8.1.


db2 list db directory on <local-path>


I can still have two dbs on different paths but are part of the same
instance.
--
Chuck
Remove "_nospam" to reply by email
Nov 12 '05 #9
Ian <ia*****@mobile audio.com> wrote in
news:40******** **@corp.newsgro ups.com:
Chuck wrote:
Ian <ia*****@mobile audio.com> wrote in news:40b6d34d$1 _1
@corp.newsgroup s.com:

list database directory

That lists all databases cataloged in the DB directory. Even one's on
other machines. What I'm looking for is a list of the databases that
belong to one instance on the local machine.

Platform AIX 5.2, DB2 8.1.


OK, I guess I'm not following. You can use grep to eliminate the
remote databases from the 'list database directory' output:

db2 list db directory | grep -vp Remote


Ah, but I could have multiple instances on the local machine. I only want
the dbs associated with one local instance.

Besides, the output from the list db directory command is split over
several lines for each db. For grep to work you'd need to first find some
wat to combine all the lines for a db into a single line.

--
Chuck
Remove "_nospam" to reply by email
Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2718
by: Zicco Fen | last post by:
We have windows clients and a DB2 UDB database on an AIX box. In Windows, if we use the Control Center, add the system, and expand on the tree, we can see the list of instances on the system and the list of the databases. How do I do that using command line from the windows client machine? Thanks.
11
5328
by: Mike | last post by:
Looking to find any information on how to properly configure multiple instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking for information on how the multiple instance settings should configured to work, how memory is shared or not, etc. I can not seem to find any good links to this information. Thanks, Mike
0
1425
by: klh | last post by:
Hi group, We are attempting to install an MS clustered failover environment (mutual-takeover) for Windows 2003 and DB2 V8. All of our instances are non-partitioned. We have both local databases and db2 connect pass through traffic (to z/os). I want our db2 connect traffic to go through a separate instance so that it doesn't take away resources from the local databases. The configuration I would like to have is: Server1
0
1488
by: cjshea | last post by:
Hello Friends; I have a general question on Configuration Advisor, as I get to know it better I may have more focused questions. I have a feeling that the Advisor may assume that there is only one instance on a server. I have a situation where I have many instances on one server, with many small databases, about 20 instances with about 45 databases. Sounds great so far doesn't it? Anyway my question at this point is when trying to...
1
1957
by: Byrocat | last post by:
These particular servers do not have the DAS enabled, so I have to document the contents of the instances, initially "instance X contains n databases (A, B, C< ....)") I can get get list of isntances on a server by using the db2ilist command. What's the sequence of commands needed to pull up a list of the dataqbases inside an isntance.
3
1858
by: Tim | last post by:
Hello Everyone I'd like to create a script/program that can locate all servers running DB2, finding out which instances are running/created and what databases are running under them but have been told but IBM support that this isn't currently possible for a client to do. I'd like to get a second opinion since the CCA seems to be able to manage it without any problems so the API must be there to do it. The main reason why I'd like...
2
2140
by: dbrich | last post by:
Hi, has anybody tried this out, I have some troubles. I want to list (in a "c" program) all databases from the system directory, belonging to a particular instance. For some reason, these functions always list only the databases, belonging to the instance its name was in the DB2INSTANCE at the moment of the start of my program. Any "attach to.." or seting DB2INSTANCE in the program afterwards (at least on windows) doesn't seem to make the...
4
2051
by: Roland Riess | last post by:
Hi all, at the moment i am developing an app which is sort of an interface to copy data from one database to another and it shall run as a service. As there are several databases the app must be installed and run in multiple instances with the configuration data (database, login, etc.) stored in an app.config file. Up to now I was concerned with Windows CE apps only so both running an app as service and running multiple instances of...
2
1830
by: Frank Swarbrick | last post by:
Given the following situation, I am wondering what advantages and disadvantages there would be for creating more than one instance. For testing, we want to have more than one 'version' of a database. Probably there will be only a single database , although there could be more. Let's call this database CORE. We'll could have a single instance with, say, CORE_DEV1, CORE_DEV2, CORE_DEV3, etc. (We'd also have a separate production...
0
9582
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.