By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,756 Members | 1,668 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,756 IT Pros & Developers. It's quick & easy.

DB2 port

P: n/a
Hi all,

How can I find out which port my db2 database is running on on an aix
machine?

I need to supply the port number to my JDBC connection string.

Any response is greatly appreciated.

Thanks,
Rob

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<r_**********@yahoo.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Hi all,

How can I find out which port my db2 database is running on on an aix
machine?

I need to supply the port number to my JDBC connection string.

Any response is greatly appreciated.

Thanks,
Rob

The relationship between service name and port is contained in the
/etc/services file.

In some cases, the instance may have been created with a port number
hardcoded, in which case you can see it when you do:
db2 get dbm cfg
Look at the service name (SVCENAME). If it is a number, you have the port.
If it is a name, you can find the associated port in /etc/services.
Nov 12 '05 #2

P: n/a
The dbm cfg of the instance owning the db you are trying to connect to has
the following entry:
svcename somename
or
svcename somenumber

The name corresponds to the entry in the .../etc/services file where a port
no. will show for that name
The number is the actual port number for that instance.

So, issue: db2 get dbm cfg |find "svcename"

HTH, Pierre

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
<r_**********@yahoo.com> a écrit dans le message de news:
11*********************@g43g2000cwa.googlegroups.c om...
Hi all,

How can I find out which port my db2 database is running on on an aix
machine?

I need to supply the port number to my JDBC connection string.

Any response is greatly appreciated.

Thanks,
Rob


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.