How to change the port for the Postgresql Database Server on the Control-M/Server? |
Important Note: - This KA only provided the procedure to modify the PostgreSQL Database Port Number Control-M/Server. - If the Postgres Database Server is shared with the Control-M/Enterprise Manager, the Control-M/EM configuration must be updated too. Verification: - Confirm that the Postgres Database Server that is being modified is only used by the Control-M/Server Solution: 1. Shut down the CONTROL-M Server and PostgreSQL Database Server - Run "ctm_menu" - Select "CONTROL-M Manager > Stop ALL". 2. Change the port in the next files: UNIX / Linux: PostgreSQL Database Server Files: - $DBU_BIN/DBUData/primary/DBU_params.dat - $PGDATA/postgresql.conf - $PGHOME/etc/pg_service.conf OS environment File: - <Control-M/Server Home>/.PGenv.csh - <Control-M/Server Home>/.PGenv.sh Windows: Windows Registry:
- Modified registry value for key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SRV640_PG\ImagePath" - Launch the Windows Registry by executing "regedit". - Search for the above key - Update the "-p <Port Number>" of the value. For example,
"C:\Program Files\BMC Software\CONTROL-M Server\pgsql\bin\pg_ctl.exe" runservice -N SRV640_PG -D "C:\Program Files\BMC Software\CONTROL-M Server\pgsql\Data\." -o "-F -i -p 5442" - Modified registry value for key "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet00X\Services\SRV640_PG\ImagePath"
- Launch the Windows Registry by executing "regedit". - Search for the above key - Update the "-p <Port Number>" of the value. For example,
4. Run the next commands to validate that the change has been applied successfully:"C:\Program Files\BMC Software\CONTROL-M Server\pgsql\bin\pg_ctl.exe" runservice -N SRV640_PG -D "C:\Program Files\BMC Software\CONTROL-M Server\pgsql\Data\." -o "-F -i -p 5442" 3. Start the CONTROL-M PostgreSQL Database Server - Run "ctm_menu - Select "CONTROL-M Manager > Start Database" - Run on command prompt: sql - Verify that the SQL will open a prompt to the Control-M/Server database - Run on command prompt: ctmdbtrans - Verify that the Control-M/Server utilities are working after the port change 5. Start the CONTROL-M Server - Run "ctm_menu - Select "CONTROL-M Manager > Start All" |