Change default CMOD database port from 50000 to 50001

Previous topic - Next topic

kit

Hello,

Is there a way we can change CMOD to search through the database connection port # 50001 instead of 50001.

Thanks,

Kit

Alessandro Perucchi

Hello Kit,

I'm not sure to understand why you want to do that?

Normally you connect to CMOD with the CMOD Port (1445 by default). You don't need to connect to the database.
Except if you need to connect to the CMOD database for some reasons.

What is your use case here? I'm not sure to help you with only so little background! :-)
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

Justin Derrick

Yeah, it's an unusual request, but you can change the port numbers for a database by modifying the /etc/services file on your UNIX/Linux system.


DB2_archive     60004/tcp
DB2_archive_1   60005/tcp
DB2_archive_2   60006/tcp
DB2_archive_END 60007/tcp


As long as all four port numbers stay sequential, it shouldn't matter which number you choose, as long as it's in the usable range of 1025-65535.

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

kit

We want to have separate "DB2 Instances" for production and UAT. Right now all databases share 1 instance so if something goes wrong in UAT / DEV and takes down the "DB2 Instance" then production goes down. Same with if UAT / DEV use too many resources they could throttle production as they all share instance memory.

If we create another db2 instance it runs as a different service and gives us more stability to our production environment. We have created another instance which listens on port 50001 instead of default 50000 but need to find a way to tell CMOD to look for it on port 50001 and instance "DB2UAT" instead of the default "DB2".



Alessandro Perucchi

Again, if DB2 is on the same machine as CMOD Server, then you don't need DB2 ports activate. It is only to do some remote access to the database directly.
By default DB2 doesn't activate the TCP IP connection. You need to activate it.

Now, for DB2, if you have one installation of DB2, you have "one" connection with DB2, and with this connection, you can have several databases.

If I'm not wrong, if you want to have many DB2 Instances, then you need to have several users. One DB2 for UAT, one for Prod and one for Dev. And each has an instance, and each instance can have its own port for remote connection.
To setup the port, you need to check the service used in the Database Manager ( db2 get dbm cfg  | grep SVCENAME ) and search the value in /etc/services as Justin said. That way you can change the port used by DB2 if wanted, and if activated.

Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

Justin Derrick

Quote from: kit on April 29, 2015, 04:42:47 PM
If we create another db2 instance it runs as a different service and gives us more stability to our production environment. We have created another instance which listens on port 50001 instead of default 50000 but need to find a way to tell CMOD to look for it on port 50001 and instance "DB2UAT" instead of the default "DB2".

If you have different instances, then you'll have different "Service Names" in those individual instances.  It goes...

UNIX User -> DB2 Instance Name -> SVCENAME parameter -> looks for DB2_<SVCENAME> (or _1 or _2) for port number -> connects to that port number.

So, for example:



UNIXUserInstanceSVCENAME/etc/servicesPort #IP & Port #
CMOD-QACMOD-QACMOD-QADB2_CMOD-QA_160000127.0.0.1:60000

Sorry for the lousy formatting...  the forum doesn't provide a lot of formatting options for tables.  :)
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR