?
Solved

How to query an instance in the database from command editor

Posted on 2013-01-22
8
Medium Priority
?
508 Views
Last Modified: 2013-01-30
Hi,

   I have created a new instance "DB2INST3" to an existing database, aliased as "SAMPLE" ,from the DB2 configuration assistant.
   Now, i can connect to SAMPLE and see the 5 tables from AIX.
   But when i run "select * from syscat.columns" from DB2 command editor, i see all other tables from the database, but none of the 5 tables (from the Sampe database) are visible.

  Is there a special way of querying an isntance of a database?
  Please advise.
0
Comment
Question by:pvsbandi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 37

Expert Comment

by:momi_sabag
ID: 38805467
Are u trying to access it from windows?
How is the sample database cataloged?
0
 

Author Comment

by:pvsbandi
ID: 38805661
Yes, from windows. So, querying it from Command Editor, by connecting to Sample.
  I don't know what you mean by cataloged. But i cannot access these tables from the command editor. I have attached the screenshot of the Instance Definition.
Instance
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 38806327
so under TCP options you are suppose to provide the host and port, and DB2 should be able to connect to the correct instance based on those definitions
0
Not sure which OpenStack Certification to get?

So you’ve realized you might want to get certified in OpenStack, but you’re not sure what the benefits might be or even which one you should take. You know there are several certification courses you can choose from, but how do you know which one is right for you?

 

Author Comment

by:pvsbandi
ID: 38806390
I did that. But it is identified on the AIX side, not on the Command Editor side.
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 38818762
i don't understand what that means
do you use windows?
go to the configuration assistant and you should have a check connection button there
0
 

Author Comment

by:pvsbandi
ID: 38820771
Let me try again.

     I have configured the connection using Configuration assistant. After that, i logged on to AIX and typed "List tables" under the DB@INST3 schema and got 5 tables back.
    But when i queried through the Command editor, since there is no list tables option here, i tried select * from syscat.tables, i don't see this DB2INST3 schema and those 5 tables also.

 Hope i'm not confusing.
0
 
LVL 1

Accepted Solution

by:
pacwaters earned 2000 total points
ID: 38833609
It should be a configuration issue.
Let me give you few troubleshooting steps.

1. Make sure the catalog (configuration connection in Windows) is correct.
    Log on to AIX (server) using the instance db2inst3
   run the following command/script and  look for the port number in the output.
 
 svc=$(db2 get dbm cfg | grep -e"(SVCENAME)" |cut -d"=" -f2)
   cat /etc/services | grep ${svc} 

Open in new window

   
 Also run the command to see the server name
uname -n

Open in new window

 
   Go back to the configuration editor on Windows system and look for the database , verify the port number and server name matches.

If you have trouble checking configuration in Config editor an alternate approach is to commands in db2cmd window
"Open db2cmd window :"Open db2cmd prompt
run the following commands
db2 list db directory
db2 list node directory

Open in new window


and see the entries of SAMPLE as which server / port they refer to

I am sure you will find some errors with configuration and you may be able to correct it .

Hope you find this solution useful.

Good luck!

Pacwaters
0
 

Author Closing Comment

by:pvsbandi
ID: 38835873
Thank You! I got started on getting a hunch on the configuration woes.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question