[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to query an instance in the database from command editor

Posted on 2013-01-22
8
Medium Priority
?
510 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

656 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