简体   繁体   中英

Mac OS :: DB2 is up and running. But unable to find port

I installed DB2 Express-C on my mac and able to create databases, schemas successfully.

      [a4370397:~]: ps -ef | grep -i db2
       502 24907     1   0  8:59AM ??         0:00.06 db2wdog
       502 24908 24907   0  8:59AM ??         0:02.03 db2sysc
       502 24909 24908   0  8:59AM ??         0:00.00 db2ckpw
       502 24910 24908   0  8:59AM ??         0:00.00 db2ckpw
       502 24911 24908   0  8:59AM ??         0:00.00 db2ckpw
       502 24912 24907   0  8:59AM ??         0:00.05 db2vend (PD Vendor Process - 1)
       502 24927 24907   0  8:59AM ??         0:01.03 db2acd 
       0 54414 54369   0  9:33AM ttys004    0:00.02 su db2user
       502 54567 54443   0  9:33AM ttys004    0:00.00 grep -i db2

But I couldn't find the port where the db2 instance is running. SVCENAME is displayed as blank in configuration.

      [a4370397:/opt/db2]: db2 get dbm cfg

      Database Manager Configuration
      Node type = Database Server with local and remote clients

      TCP/IP Service name                          (SVCENAME) = 
      Discovery mode                               (DISCOVER) = SEARCH
      Discover server instance                (DISCOVER_INST) = ENABLE

I tried db2set DB2COMM=tcpip and restarted the instance but still couldn't identify the port.

Please suggest how to configure/view the port information for db2.

The SVCENAME configuration parameter has not been set, so you have not told DB2 what port to listen on.

You need to update the value and restart the instance:

db2 update dbm config using svcename 50000
db2stop force
db2start

You can also use a port name corresponding to an entry in /etc/services for the SVCENAME configuration parameter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM