Solved

db2 how to connect to remote database from my

Posted on 2014-12-28
3
328 Views
Last Modified: 2014-12-28
Hi, how to  define the remote connection in my local db2 instance running on mac, I want to connect to  a db2 database running on port 5000 on some IP address. On my local mac I have db2 instance running, and db2 prompt
0
Comment
Question by:sniger
  • 2
3 Comments
 
LVL 45

Expert Comment

by:Kdo
ID: 40520626
Hi sniger,

From the DB2 command line processor, use the CATALOG TCPIP NODE and the CATALOG DATABASE commands

  CATALOG TCPIP NODE nodename REMOTE {hostname | IP address} SERVER 50000
  CATALOG DATABASE dbname [as localname] AT NODE {nodename}

Good Luck!
Kent
0
 

Author Comment

by:sniger
ID: 40520781
So, I don't need connect command ?

How to SQL then dbname ?
0
 
LVL 45

Accepted Solution

by:
Kdo earned 500 total points
ID: 40520837
You do need the CONNECT command.  The 2 CATALOG statements (shown above) identify the server and database to your local client.  This is a 1-time thing.  The client stores the information locally so you can continue to connect to that database until you UNCATALOG it.

You then execute

  CONNECT TO localname

every time that you want to create a connection.

Good Luck!
Kent
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

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 (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now