Solved

db2 how to connect to remote database from my

Posted on 2014-12-28
3
303 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
AS400 table linked into Access 2010 where clause ignored 8 321
AS400 DAYOFWEEK(GENERAL DATE) 12 342
AS400 Single Sign On 3 1,044
db2 timestamp 5 58
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

24 Experts available now in Live!

Get 1:1 Help Now