Wednesday, October 5, 2022

.::: How to identify DB2 port number Service & connect IBM Data Studio include error :::.


1. check for windows
db2 get database manager configuration | findstr /i svce

C:\Program Files\IBM\SQLLIB\BIN>db2 get database manager configuration | findstr
 /i svce
 TCP/IP Service name                          (SVCENAME) = db2c_DB2
 SSL service name                         (SSL_SVCENAME) =

C:\Program Files\IBM\SQLLIB\BIN>


C:\Program Files\IBM\SQLLIB\BIN>db2 get dbm cfg | findstr "SVCENAME"
 TCP/IP Service name                          (SVCENAME) = db2c_DB2
 SSL service name                         (SSL_SVCENAME) =

C:\Program Files\IBM\SQLLIB\BIN>
C:\Program Files\IBM\SQLLIB\BIN>

C:\Program Files\IBM\SQLLIB\BIN>findstr "db2c_DB2" %systemroot%\system32\drivers
\etc\services
db2c_DB2        25000/tcp

C:\Program Files\IBM\SQLLIB\BIN>
 
2. for linux

su - db2inst1
db2 get instance
cat /etc/services | grep db2c
cat /etc/services | grep db2



[root@teguhth-grid ~]# su - db2inst1
Last login: Tue Oct  4 17:50:54 WIB 2022 on pts/0
[db2inst1@teguhth-grid ~]$
[db2inst1@teguhth-grid ~]$  db2 get instance

 The current database manager instance is:  db2inst1

[db2inst1@teguhth-grid ~]$ db2 get dbm cfg | grep SVCE
 TCP/IP Service name                          (SVCENAME) = db2c_db2inst1
 SSL service name                         (SSL_SVCENAME) =
[db2inst1@teguhth-grid ~]$
[db2inst1@teguhth-grid ~]$ cat /etc/services | grep db2c_db2inst9
[db2inst1@teguhth-grid ~]$
[db2inst1@teguhth-grid ~]$ cat /etc/services | grep db2c
db2c_db2inst1    25010/tcp
[db2inst1@teguhth-grid ~]$
[db2inst1@teguhth-grid ~]$ cat /etc/services | grep db2
ibm-db2         523/tcp                 # IBM-DB2
ibm-db2         523/udp                 # IBM-DB2
questdb2-lnchr  5677/tcp                # Quest Central DB2 Launchr
questdb2-lnchr  5677/udp                # Quest Central DB2 Launchr
qdb2service     45825/tcp               # Qpuncture Data Access Service
qdb2service     45825/udp               # Qpuncture Data Access Service
DB2_db2inst1    20016/tcp
DB2_db2inst1_1    20017/tcp
DB2_db2inst1_2    20018/tcp
DB2_db2inst1_3    20019/tcp
DB2_db2inst1_4    20020/tcp
DB2_db2inst1_END    20021/tcp
db2c_db2inst1    25010/tcp
[db2inst1@teguhth-grid ~]$
[db2inst1@teguhth-grid ~]$ cat /etc/services | grep db2c
db2c_db2inst1    25010/tcp
[db2inst1@teguhth-grid ~]$

3. for stop db2
[db2inst1@teguhth-grid ~]$ db2 force applications all
DB20000I  The FORCE APPLICATION command completed successfully.
DB21024I  This command is asynchronous and may not be effective immediately.

[db2inst1@teguhth-grid ~]$ db2 terminate
DB20000I  The TERMINATE command completed successfully.
[db2inst1@teguhth-grid ~]$ db2stop
10/02/2022 14:30:16     0   0   SQL1025N  The database manager was not stopped because databases are still active.
SQL1025N  The database manager was not stopped because databases are still active.
[db2inst1@teguhth-grid ~]$


4. for start db2
[root@teguhth-grid ~]# su - db2inst1
Last login: Wed Oct  5 09:53:46 WIB 2022 on pts/0
[db2inst1@teguhth-grid ~]$ db2stop
10/05/2022 10:59:52     0   0   SQL1064N  DB2STOP processing was successful.
SQL1064N  DB2STOP processing was successful.
[db2inst1@teguhth-grid ~]$
[db2inst1@teguhth-grid ~]$ db2start
10/05/2022 11:01:26     0   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.
[db2inst1@teguhth-grid ~]$


5. try to login using IBM Data Studio using true data


6. try to login using IBM Data Studio using false data



No comments:

Post a Comment

Popular Posts