|
From: Mark A on 13 Jun 2008 20:00 "Erwin Leonardi" <erwinleonardi(a)gmail.com> wrote in message news:f1fe3648-1579-4437-b553-c439f853a146(a)c65g2000hsa.googlegroups.com... > Hi there, > > Suppose computer PC1 is my database server in which DB2 is running. I > have an application running in computer PC2. The application PC2 will > connect to DB2 in PC2. > > How can my application in PC2 get the list of database in PC1? If I > use MSSQL, I can connect to MASTER database and execute the following > query. > > SELECT NAME FROM SYS.DATABASES > > Can I do similar thing in DB2? > > Erwin Once you ATTACH to the remote instance, issue the command below: db2 list db directory Ignore the remote databases in the list (if any).
From: Dave Hughes on 13 Jun 2008 20:16 Mark A wrote: > "Erwin Leonardi" <erwinleonardi(a)gmail.com> wrote in message > news:f1fe3648-1579-4437-b553-c439f853a146(a)c65g2000hsa.googlegroups.com > ... > > Hi there, > > > > Suppose computer PC1 is my database server in which DB2 is running. > > I have an application running in computer PC2. The application PC2 > > will connect to DB2 in PC2. > > > > How can my application in PC2 get the list of database in PC1? If I > > use MSSQL, I can connect to MASTER database and execute the > > following query. > > > > SELECT NAME FROM SYS.DATABASES > > > > Can I do similar thing in DB2? > > > > Erwin > > Once you ATTACH to the remote instance, issue the command below: > > db2 list db directory > > Ignore the remote databases in the list (if any). Hmm, doesn't work for me. At least, not when I just tried it from a 9.5 client to a 9.5 FP1 server. Every single entry was remote - in other words, it just listed my local catalog as usual. Cheers, Dave.
From: Mark A on 13 Jun 2008 20:45 "Dave Hughes" <dave(a)waveform.plus.com> wrote in message news:U8qdnR-mF_pSkM7VRVnygQA(a)posted.plusnet... > Hmm, doesn't work for me. At least, not when I just tried it from a 9.5 > client to a 9.5 FP1 server. Every single entry was remote - in other > words, it just listed my local catalog as usual. > > > Cheers, > > Dave. Sorry, I thought you were ssh'ing (telnet) into the remote server.
|
Pages: 1 Prev: Please help win my bet with our DBA Next: How can I installed DB2TOP on my windows or Linux? |