Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Change the DB2 port number under Linux

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

When testing with sqoop, I found that the port number 50000 was occupied, so I changed the port number of DB2.

The first step is to log in to the instance user of the DB2 database. This is db2inst1.

Db2 get dbm cfg | grep SVCENAME

You can see what the name of the corresponding SVCENAME is.

A problem is easy to arise here. According to someone on the Internet, the SVCENAME will be changed to the port number, which is wrong. Be sure to unify this name with the name in services.

The second step is to return to the root user

Vim / etc/services, find the port number corresponding to the name of the corresponding SVCENAME.

I will edit it directly to 50001 here.

The third step is to close the database first and then open it.

Db2stop

Db2start

As a matter of fact, there are no complicated steps, it's just that many people write in a mess without explanation, so they cheat a little bit.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report