# how to provide all the parameters in order to connect to DB2

**URL:** <https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020>\
**Category:** Toad for IBM DB2\
**Created:** [October 1, 2011, 12:19am UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020 "2011-10-01T00:19:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbiec](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@newbiec](https://forums.toadworld.com/u/newbiec)\
**Post date:** [October 1, 2011, 12:19am UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/1 "2011-10-01T00:19:19Z")

</div>

Hello all, I am new to DB2 and Toad, I have Toad Free Version 4.6.2.573, DB2 v9.5.0.0, “AIX6495”, and Fix Pack “0”.

I can login to db2 through putty, I dont’ know what values I should provide in Toad when connect:

Database Alias  
Node Name  
Authentication  
Host Name (Should I use the name when I use putty to log in? When I use ifconfig in the box I get a different ip)  
Instance name  
TCP/IP port number  
Enable SOCKS Security (Ture/False)

I have full access to db2, I just don’t know where I can get those values. Thanks for any suggestions!

---

<div class="post-metadata">

**Author:** ![newbiec](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@newbiec](https://forums.toadworld.com/u/newbiec)\
**Post date:** [October 1, 2011, 12:24am UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/2 "2011-10-01T00:24:29Z")

</div>

btw, I do NOT want to touch anything for the existing DB, I just want to connect it using toad so that I can run SQL query against it. If there is other ways/software can achieve this it’s also okay.

---

<div class="post-metadata">

**Author:** ![adam.ririe\_906](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/adam.ririe_906/32/125_2.png) [@adam.ririe\_906](https://forums.toadworld.com/u/adam.ririe_906)\
**Post date:** [October 3, 2011, 3:02pm UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/3 "2011-10-03T15:02:50Z")

</div>

Hi,

You can use the Client Configuration Wizard to create a new connection to a database. You’ll need the host name, port number, database name, user id and password. The same information you use for putty.

You can do this by opening the Connection Manager, then launch the connection wizard, catalog your database, then use the dropdown in the connection manager to connect to your database.

Regards,  
Adam

---

<div class="post-metadata">

**Author:** ![newbiec](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@newbiec](https://forums.toadworld.com/u/newbiec)\
**Post date:** [October 3, 2011, 8:53pm UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/4 "2011-10-03T20:53:32Z")

</div>

Adam,

Thank you for your reply. When you say: catalog the database, what does that mean? What’s the effect for the DB, will that affect any existing application or performance for the DB?

Thanks,  
Newbiec

---

<div class="post-metadata">

**Author:** ![adam.ririe\_906](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/adam.ririe_906/32/125_2.png) [@adam.ririe\_906](https://forums.toadworld.com/u/adam.ririe_906)\
**Post date:** [October 3, 2011, 9:53pm UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/5 "2011-10-03T21:53:21Z")

</div>

Hi Newbiec,

Toad for DB2 installs a DB2 client from IBM. Cataloging a database provides the DB2 client with the information it needs to communicate with the database. It only effects the machine where Toad is installed.

Regards,  
Adam

---

<div class="post-metadata">

**Author:** ![newbiec](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@newbiec](https://forums.toadworld.com/u/newbiec)\
**Post date:** [October 3, 2011, 10:26pm UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/6 "2011-10-03T22:26:33Z")

</div>

So if I have existing toad client for the same db, cataloging won’t affect those clients, right? I searched the web and there are two commands, which one should I use?

Catalog the DB2 server node  
To catalog the DB2 server node, enter the following command:  
db2 catalog tcpip node db2node remote hostname server service\_name  
where db2node is the name of the system where the DB2 client is installed (which must be unique in your node directory list), hostname is the fully qualified name of the system where the DB2 server is installed, and service\_name is the connection port name as defined in the services file.  
Catalog remote DB2 databases  
To catalog a remote database, enter the following command:  
db2 catalog database db\_name as alias\_name at node db2node  
where db\_name is the name of the remote database, alias\_name is the name of the client instance, and db2node is the name of the system where the DB2 client is installed.

Thanks,  
Newbiec

---

<div class="post-metadata">

**Author:** ![adam.ririe\_906](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/adam.ririe_906/32/125_2.png) [@adam.ririe\_906](https://forums.toadworld.com/u/adam.ririe_906)\
**Post date:** [October 3, 2011, 11:07pm UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/7 "2011-10-03T23:07:25Z")

</div>

Hi Newbiec,

I’m not sure I understand precisely what you’re saying about other Toad clients. However, creating connections for one Toad installation shouldn’t effect the other installations. Actually, if you have other Toads for DB2 installed, Toad will detect the other catalogs and prompt you to migrate connections from earlier installations to the latest installation.

You shouldn’t have to issue any catalog commands to use Toad. The Client Configuration Wizard will prompt you for the required information, create and execute the catalog commands.

Regards,  
Adam

---

<div class="post-metadata">

**Author:** ![newbiec](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@newbiec](https://forums.toadworld.com/u/newbiec)\
**Post date:** [October 4, 2011, 8:58am UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/8 "2011-10-04T08:58:21Z")

</div>

Adam,

Thanks for your reply.

What should I use for the following parameters when use the wizard.  
Node Name  
Database Alias  
TCP/IP Port number  
Enable SOCKS Security?

I can give anything for the above parameters or I need to find it from db2 command?

Thanks,  
Newbiec

---

<div class="post-metadata">

**Author:** ![adam.ririe\_906](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/adam.ririe_906/32/125_2.png) [@adam.ririe\_906](https://forums.toadworld.com/u/adam.ririe_906)\
**Post date:** [October 4, 2011, 9:48am UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/9 "2011-10-04T09:48:41Z")

</div>

Hi Newbiec,

Please contact me at [adam.ririe@quest.com](mailto:adam.ririe@quest.com) so we can work on your problem offline.

Thanks,  
Adam

---

<div class="post-metadata">

**Author:** ![newbiec](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@newbiec](https://forums.toadworld.com/u/newbiec)\
**Post date:** [October 5, 2011, 11:07am UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/10 "2011-10-05T11:07:34Z")

</div>

Problem solved! The main thing is my port number didn’t set up correctly, here is the info on how to find the correct port:  
[http://publib.boulder.ibm.com/infocenter/cmgmt/v8r3m0/index.jsp?topic=%2Fcom.ibm.sysadmin.hlp%2Fcsa10010.htm](http://publib.boulder.ibm.com/infocenter/cmgmt/v8r3m0/index.jsp?topic=%2Fcom.ibm.sysadmin.hlp%2Fcsa10010.htm)

Thank you so much Adam, you rock!

---

<div class="post-metadata">

**Author:** ![Alka\_Arora](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@Alka\_Arora](https://forums.toadworld.com/u/Alka_Arora)\
**Post date:** [October 7, 2016, 12:19am UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/11 "2016-10-07T00:19:42Z")

</div>

Hi,

Could you please tell how can I check the Port number and the node name.

---

<div class="post-metadata">

**Author:** ![Jeff\_Podlasek](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/jeff_podlasek/32/29_2.png) [@Jeff\_Podlasek](https://forums.toadworld.com/u/Jeff_Podlasek)\
**Post date:** [October 7, 2016, 9:10am UTC](https://forums.toadworld.com/t/how-to-provide-all-the-parameters-in-order-to-connect-to-db2/8020/12 "2016-10-07T09:10:41Z")

</div>

On the database server display the DBM configuration values and get the SVCENAME via:

db2 get dbm cfg

Like:

TCP/IP Service name (SVCENAME) = db2c\_DB2\_02

Then look up that service name in the database server's etc/services file to identify the port number like:

db2c\_DB2\_02 50002/tcp

In the above 50002 is the port number.

Of course if Toad is connected to your database you can view the DB and DBM config values:

 ![dbm1.jpeg](https://global.discourse-cdn.com/quest/original/2X/d/d854b6050e4f3d105ef96db90a7b9068c44f2fd3.jpeg)

Hope this helps.
