In this blog I will change the Host Name, it comes after three blogs to change the Docbase ID, Docbase Name, and Server Config Name, hope that you already read them, if not don’t delay 😉

So, let’s change the Host Name!

1. Migration preparation

Update the configuration file of the Migration Utility:

[dmadmin@vmtestdctm01 ~]$ vi $DM_HOME/install/external_apps/MigrationUtil/config.xml 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Database connection details</comment>
<entry key="dbms">oracle</entry> <!-- This would be either sqlserver, oracle, db2 or postgres -->
<entry key="tgt_database_server">vmtestdctm01</entry> <!-- Database Server host or IP -->
<entry key="port_number">1521</entry> <!-- Database port number -->
<entry key="InstallOwnerPassword">install164</entry>
<entry key="isRCS">no</entry>    <!-- set it to yes, when running the utility on secondary CS -->

<!-- <comment>List of docbases in the machine</comment> -->
<entry key="DocbaseName.1">docbase1</entry>

<!-- <comment>docbase owner password</comment> -->
<entry key="DocbasePassword.1">install164</entry>

...
<entry key="ChangeHostName">yes</entry>
<entry key="HostName">vmtestdctm01</entry>
<entry key="NewHostName">vmtestdctm02</entry>
...
</properties>

Be careful, the hostname may be FQDN or not, before any change check using “hostname –fqdn” and compare what you have in place.
You can also use select queries from the log of my migration below to be sure
😉

Stop the Docbase and the Docbroker:

$DOCUMENTUM/dba/dm_shutdown_docbase1
$DOCUMENTUM/dba/dm_stop_DocBroker

Update the database name in the server.ini file, it is a workaround to avoid below error:

Database Details:
Database Vendor:oracle
Database Name:DCTMDB
Databse User:docbase1
Database URL:jdbc:oracle:thin:@vmtestdctm01:1521/DCTMDB
ERROR...Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

In fact, the tool deal with the database name as a database service name, and put “/” in the url instead of “:”. The best workaround I found is to update database_conn value in the server.ini file, and put the service name instead of the database name.
Check the tnsnames.ora and note the service name, in my case is dctmdb.local:

[dmadmin@vmtestdctm01 ~]$ cat $ORACLE_HOME/network/admin/tnsnames.ora 
DCTMDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = vmtestdctm01)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dctmdb.local)
    )
  )

Make the change in the server.ini file:

[dmadmin@vmtestdctm01 ~]$ vi $DOCUMENTUM/dba/config/docbase1/server.ini
...
[SERVER_STARTUP]
docbase_id = 123456
docbase_name = docbase1
server_config_name = docbase1
database_conn = dctmdb.local
database_owner = docbase1
...

Don’t worry, we will roll back this change before docbase start.

Add the vmtestdctm02 in /etc/hosts

[root@vmtestdctm01 ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.122.1 vmtestdctm01 vmtestdctm02

2. Execute the Migration

Execute the migration script.

[dmadmin@vmtestdctm01 ~]$ $DM_HOME/install/external_apps/MigrationUtil/MigrationUtil.sh

Welcome... Migration Utility invoked.
 
Skipping Docbase ID Changes...

Changing Host Name...
Created new log File: /app/dctm/product/16.4/product/16.4/install/external_apps/MigrationUtil/MigrationUtilLogs/HostNameChange.log
Finished changing host name...Please check log file for more details/errors
Finished changing Host Name...

Skipping Install Owner Change...
Skipping Server Name Change...
Skipping Docbase Name Change...
Skipping Docker Seamless Upgrade scenario...
Migration Utility completed.

Check the log content to understand what has been changed and check errors if any.

[dmadmin@vmtestdctm01 ~]$ cat /app/dctm/product/16.4/product/16.4/install/external_apps/MigrationUtil/MigrationUtilLogs/HostNameChange.log
Start: 2019-04-09 18:55:48.613
Changing Host Name
=====================
HostName: vmtestdctm01
New HostName: vmtestdctm02
Changing HostName for docbase: docbase1
Retrieving server.ini path for docbase: docbase1
Found path: /app/dctm/product/16.4/dba/config/docbase1/server.ini

Database Details:
Database Vendor:oracle
Database Name:dctmdb.local
Databse User:docbase1
Database URL:jdbc:oracle:thin:@vmtestdctm01:1521/dctmdb.local
Successfully connected to database....

Processing Database Changes...
Created database backup File '/app/dctm/product/16.4/product/16.4/install/external_apps/MigrationUtil/MigrationUtilLogs/HostNameChange_docbase1_DatabaseRestore.sql'
Processing _s table...
select r_object_id,r_host_name from dm_server_config_s where lower(r_host_name) = lower('vmtestdctm01')
update dm_server_config_s set r_host_name = 'vmtestdctm02' where r_object_id = '3d01e24080000102'
select r_object_id,r_install_domain from dm_server_config_s where lower(r_install_domain) = lower('vmtestdctm01')
select r_object_id,web_server_loc from dm_server_config_s where lower(web_server_loc) = lower('vmtestdctm01')
update dm_server_config_s set web_server_loc = 'vmtestdctm02' where r_object_id = '3d01e24080000102'
select r_object_id,host_name from dm_mount_point_s where lower(host_name) = lower('vmtestdctm01')
update dm_mount_point_s set host_name = 'vmtestdctm02' where r_object_id = '3e01e24080000149'
select r_object_id,user_os_domain from dm_user_s where lower(user_os_domain) = lower('vmtestdctm01')
select r_object_id,user_global_unique_id from dm_user_s where lower(user_global_unique_id) like lower('vmtestdctm01:%')
select r_object_id,user_login_domain from dm_user_s where lower(user_login_domain) = lower('vmtestdctm01')
select r_object_id,target_server from dm_job_s where lower(target_server) like lower('%@vmtestdctm01')
update dm_job_s set target_server = 'docbase1.docbase1@vmtestdctm02' where r_object_id = '0801e240800003d6'
...
update dm_job_s set target_server = 'docbase1.docbase1@vmtestdctm02' where r_object_id = '0801e24080000384'
select r_object_id,object_name from dm_sysobject_s where r_object_type = 'dm_jms_config' and lower(object_name) like lower('%vmtestdctm01%')
update dm_sysobject_s set object_name = 'JMS vmtestdctm02:9080 for docbase1.docbase1' where r_object_id = '0801e240800010a4'
select r_object_id,object_name from dm_sysobject_s where r_object_type = 'dm_outputdevice' and lower(object_name) like lower('%vmtestdctm01%')
select r_object_id,object_name from dm_sysobject_s where r_object_type = 'dm_client_registration' and lower(object_name) like lower('%vmtestdctm01%')
update dm_sysobject_s set object_name = 'dfc_vmtestdctm02_WM6Aoa' where r_object_id = '0801e24080000581'
update dm_sysobject_s set object_name = 'dfc_vmtestdctm02_CqJKIa' where r_object_id = '0801e2408000058b'
update dm_sysobject_s set object_name = 'dfc_vmtestdctm02_uEp7oa' where r_object_id = '0801e24080001107'
update dm_sysobject_s set object_name = 'dfc_vmtestdctm02_j44a0a' where r_object_id = '0801e24080001111'
select r_object_id,host_name from dm_client_registration_s where lower(host_name) = lower('vmtestdctm01')
update dm_client_registration_s set host_name = 'vmtestdctm02' where r_object_id = '0801e2408000058b'
update dm_client_registration_s set host_name = 'vmtestdctm02' where r_object_id = '0801e24080001107'
update dm_client_registration_s set host_name = 'vmtestdctm02' where r_object_id = '0801e24080000581'
update dm_client_registration_s set host_name = 'vmtestdctm02' where r_object_id = '0801e24080001111'
select r_object_id,object_name from dm_sysobject_s where r_object_type = 'dm_client_rights' and lower(object_name) like lower('%vmtestdctm01%')
update dm_sysobject_s set object_name = 'dfc_vmtestdctm02_WM6Aoa' where r_object_id = '0801e24080000582'
select r_object_id,host_name from dm_client_rights_s where lower(host_name) = lower('vmtestdctm01')
update dm_client_rights_s set host_name = 'vmtestdctm02' where r_object_id = '0801e24080000582'
Successfully updated database values...
Processing _r table...
select r_object_id,base_uri,i_position from dm_sysprocess_config_r where lower(base_uri) like lower('%//vmtestdctm01:%') or lower(base_uri) like lower('%//vmtestdctm01.%:%')
update dm_sysprocess_config_r set base_uri = 'http://vmtestdctm02:9080/DmMail/servlet/DoMail' where r_object_id = '0801e240800010a4' and i_position = -3
update dm_sysprocess_config_r set base_uri = 'http://vmtestdctm02:9080/SAMLAuthentication/servlet/ValidateSAMLResponse' where r_object_id = '0801e240800010a4' and i_position = -2
update dm_sysprocess_config_r set base_uri = 'http://vmtestdctm02:9080/DmMethods/servlet/DoMethod' where r_object_id = '0801e240800010a4' and i_position = -1
select r_object_id,projection_targets,i_position from dm_sysprocess_config_r where lower(projection_targets) = lower('vmtestdctm01')
update dm_sysprocess_config_r set projection_targets = 'vmtestdctm02' where r_object_id = '0801e240800010a4' and i_position = -1
select r_object_id,acs_base_url,i_position from dm_acs_config_r where lower(acs_base_url) like lower('%//vmtestdctm01:%') or lower(acs_base_url) like lower('%//vmtestdctm01.%:%')
update dm_acs_config_r set acs_base_url = 'http://vmtestdctm02:9080/ACS/servlet/ACS' where r_object_id = '0801e24080000490' and i_position = -1
select r_object_id,method_arguments,i_position from dm_job_r where lower(method_arguments) like lower('%vmtestdctm01%')
select r_object_id,projection_targets,i_position from dm_server_config_r where lower(projection_targets) = lower('vmtestdctm01')
select r_object_id,a_storage_param_value,i_position from dm_extern_store_r where lower(a_storage_param_value) like lower('%//vmtestdctm01:%') or lower(a_storage_param_value) like lower('%//vmtestdctm01.%:%')
Successfully updated database values...
Committing all database operations...

Processing server.ini changes for docbase: docbase1
Backed up '/app/dctm/product/16.4/dba/config/docbase1/server.ini' to '/app/dctm/product/16.4/dba/config/docbase1/server.ini_host_vmtestdctm01.backup'
Updated server.ini file:/app/dctm/product/16.4/dba/config/docbase1/server.ini

Finished changing host name for docbase:docbase1

Processing DFC properties changes...
Backed up '/app/dctm/product/16.4/config/dfc.properties' to '/app/dctm/product/16.4/config/dfc.properties_host_vmtestdctm01.backup'
Updated dfc.properties file: /app/dctm/product/16.4/config/dfc.properties
No need to update dfc.properties file: /app/dctm/product/16.4/wildfly9.0.1/server/DctmServer_MethodServer/deployments/ServerApps.ear/APP-INF/classes/dfc.properties
No need to update dfc.properties file: /app/dctm/product/16.4/wildfly9.0.1/server/DctmServer_MethodServer/deployments/acs.ear/lib/configs.jar/dfc.properties
File /app/dctm/product/16.4/wildfly9.0.1/server/DctmServer_MethodServer/deployments/XhiveConnector.ear/APP-INF/classes/dfc.properties doesn't exist
Backed up '/app/dctm/product/16.4/product/16.4/install/composer/ComposerHeadless/plugins/com.emc.ide.external.dfc_1.0.0/documentum.config/dfc.properties' to '/app/dctm/product/16.4/product/16.4/install/composer/ComposerHeadless/plugins/com.emc.ide.external.dfc_1.0.0/documentum.config/dfc.properties_host_vmtestdctm01.backup'
Updated dfc.properties file: /app/dctm/product/16.4/product/16.4/install/composer/ComposerHeadless/plugins/com.emc.ide.external.dfc_1.0.0/documentum.config/dfc.properties
Finished processing DFC properties changes...

Processing File changes...
Backed up '/app/dctm/product/16.4/wildfly9.0.1/server/DctmServer_MethodServer/deployments/acs.ear/lib/configs.jar/config/acs.properties' to '/app/dctm/product/16.4/wildfly9.0.1/server/DctmServer_MethodServer/deployments/acs.ear/lib/configs.jar/config/acs.properties_host_vmtestdctm01.backup'
Updated acs.properties: /app/dctm/product/16.4/wildfly9.0.1/server/DctmServer_MethodServer/deployments/acs.ear/lib/configs.jar/config/acs.properties
WARNING...File /app/dctm/product/16.4/wildfly9.0.1/server/DctmServer_DMS/deployments/DMS.ear/lib/configs.jar/dms.properties doesn't exist
WARNING...File /app/dctm/product/16.4/wildfly9.0.1/server/DctmServer_MethodServer/deployments/XhiveConnector.ear/XhiveConnector.war/WEB-INF/web.xml doesn't exist
Backed up '/app/dctm/product/16.4/dba/dm_launch_DocBroker' to '/app/dctm/product/16.4/product/16.4/install/external_apps/MigrationUtil/MigrationUtilLogs/dm_launch_DocBroker_host_vmtestdctm01.backup'
Updated /app/dctm/product/16.4/dba/dm_launch_DocBroker
Backed up '/app/dctm/product/16.4/dba/dm_stop_DocBroker' to '/app/dctm/product/16.4/product/16.4/install/external_apps/MigrationUtil/MigrationUtilLogs/dm_stop_DocBroker_host_vmtestdctm01.backup'
Updated /app/dctm/product/16.4/dba/dm_stop_DocBroker
Finished processing File changes...

Finished changing host name...
End: 2019-04-09 18:55:50.948

3. Post Migration

Remove vmtestdctm01 from /etc/hosts.

[root@vmtestdctm02 ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.122.1 vmtestdctm02

It is important to think about other applications/databases installed on the same server before this step.

Revert change done in the server.ini file.

[dmadmin@vmtestdctm02 ~]$ vi $DOCUMENTUM/dba/config/docbase1/server.ini
...
[SERVER_STARTUP]
docbase_id = 123456
docbase_name = docbase1
server_config_name = docbase1
database_conn = DCTMDB
database_owner = docbase1
...

Start the DocBroker:

[dmadmin@vmtestdctm02 ~]$ $DOCUMENTUM/dba/dm_launch_DocBroker
starting connection broker on current host: [vmtestdctm02]
with connection broker log: [/app/dctm/product/16.4/dba/log/docbroker.vmtestdctm02.1489.log]
connection broker pid: 11863

Start the Docbase:

[dmadmin@vmtestdctm02 ~]$ $DOCUMENTUM/dba/dm_start_docbase1
starting Documentum server for repository: [docbase1]
with server log: [/app/dctm/product/16.4/dba/log/docbase1.log]
server pid: 12810

Check docbase log:

[dmadmin@vmtestdctm02 ~]$ cat $DOCUMENTUM/dba/log/docbase1.log
...
2019-04-09T19:11:30.915327	13732[13732]	0000000000000000	[DM_WORKFLOW_I_AGENT_START]info:  "Workflow agent master (pid : 13776, session 0101e24080000007) is started sucessfully."
IsProcessAlive: Process ID 0 is not > 0
2019-04-09T19:11:30.916008	13732[13732]	0000000000000000	[DM_WORKFLOW_I_AGENT_START]info:  "Workflow agent worker (pid : 13777, session 0101e2408000000a) is started sucessfully."
IsProcessAlive: Process ID 0 is not > 0
2019-04-09T19:11:31.917818	13732[13732]	0000000000000000	[DM_WORKFLOW_I_AGENT_START]info:  "Workflow agent worker (pid : 13786, session 0101e2408000000b) is started sucessfully."
IsProcessAlive: Process ID 0 is not > 0
2019-04-09T19:11:32.918943	13732[13732]	0000000000000000	[DM_WORKFLOW_I_AGENT_START]info:  "Workflow agent worker (pid : 13798, session 0101e2408000000c) is started sucessfully."
2019-04-09T19:11:33.919701	13732[13732]	0000000000000000	[DM_SERVER_I_START]info:  "Sending Initial Docbroker check-point "
2019-04-09T19:11:33.927309	13732[13732]	0000000000000000	[DM_MQ_I_DAEMON_START]info:  "Message queue daemon (pid : 13810, session 0101e24080000456) is started sucessfully."
2019-04-09T19:11:34.639677	13809[13809]	0101e24080000003	[DM_DOCBROKER_I_PROJECTING]info:  "Sending information to Docbroker located on host (vmtestdctm02) with port (1490).  Information: (Config(docbase1), Proximity(1), Status(Open), Dormancy Status(Active))."

Get the docbase map from the docbroker:

[dmadmin@vmtestdctm02 ~]$ dmqdocbroker -t vmtestdctm02 -c getdocbasemap
dmqdocbroker: A DocBroker Query Tool
dmqdocbroker: Documentum Client Library Version: 16.4.0000.0185
Targeting port 1489
**************************************************
**     D O C B R O K E R    I N F O             **
**************************************************
Docbroker host            : vmtestdctm02
Docbroker port            : 1490
Docbroker network address : INET_ADDR: 02 5d2 c0a87a01 vmtestdctm02 192.168.122.1
Docbroker version         : 16.4.0000.0248  Linux64
**************************************************
**     D O C B A S E   I N F O                  **
**************************************************
--------------------------------------------
Docbase name        : docbase1
Docbase id          : 123456
Docbase description : First docbase
Govern docbase      : 
Federation name     : 
Server version      : 16.4.0000.0248  Linux64.Oracle
Docbase Roles       : Global Registry
Docbase Dormancy Status     : 
--------------------------------------------

idql query for a quick check:

dmadmin@vmtestdctm02 ~]$ idql docbase1
...
Connected to OpenText Documentum Server running Release 16.4.0000.0248  Linux64.Oracle
1> select user_login_name from dm_user where user_name='dmadmin';
2> go
user_login_name                                                                                                                                                                                                                                                
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
dmadmin                                                                                                                                                                                                                                                        
(1 row affected)

4. Conclusion

This is a helpful way to change the Host Name, I tried it many times and I can say that it works very well.
For the moment all changes done was only on a simple environment, maybe the next blog will talk about a change on a High Availability one 😉
Did you already practice this tool? Don’t hesitate to share your experience!