Db2 viewing and modifying port numbers

Source: Internet
Author: User
Tags db2 installation db2 port


After the db2 installation is complete, the tcp/ip connection port is 50000 by default. You can confirm the modification using the following method: 1. Run the db2 get dbm cfg command to find "SVCENAME" and find the TCP/IP service name www.2cto.com 2. Find the port numberwindows corresponding to the service name in the system configuration file. View c: \ windows \ system32 \ drivers \ etc \ services aix: View/etc/services as follows: DB2_DB2 60000/tcpDB2_DB2_1 60001/tcpDB2_DB2_2 60002/tcpDB2_DB2_END 60003/tcpdb2c_DB2 50000/tcp 3. Run the netstat-an command to find the tcp/ip Service port 4. Modify the port number and directly modify the current the port number corresponding to the service name is as follows: db2c_DB 2 50000/tcp and then restart the database, that is, OK db2stop db2start www.2cto.com 5, and attach a search method for the linux system (excerpt post): In JDBC invocations for WPA, you have to specify the port that DB2 is listening on. I usually look for/etc/services or try one of 50000/50001 and it usually works. in SUSE Linux, both the solutions did not work and there was another process (Multithreaded routing toolkit aka mrt) was listening on port 50000.So ho W do we find out the DB2 port in a reliable way? Read on... Step 1: Set the DB2 environment. $ .~ Db2inst1/sqllib/db2profileStep 2: Find the service name for DB2 instance. it basically involves running "db2 get dbm cfg" command and finding a line containing SVCENAME. $ svc = 'db2 get dbm cfg | grep SVCENAME | cut-d =-f2 | awk '{print $1} ''Step 3: find the service name that you got from Step 2 in/etc/services or % SYSTEMROOT % \ system32 \ drivers \ etc \ services. that is the port DB2 is listening on. $ grep $ svc/etc/services Hope you find this useful.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.