A lot of features that use MID Servers, mostly Integrations features, still specify the MID Server to use directly, using the sys_id of the MID Server, and on a sub-prod instance after a clone, MID Servers with those sys_ids will not exist. Those features will therefor not work on the sub-prod instance after a clone without re-configuring them to use a different MID Server.

For Discovery and Orchestration and other features updated to use MID Server Selection based on IP ranges, Applications and Capabilities this isn't an issue. Unfortunately Import Set Data Sources, LDAP Import and Listener, RESTMessageV2 etc. don't currently.


Up to and including Madrid and probably later.


MID Servers can only connect to one instance, and are set up to point to a URL of an instance. When an instance has been Cloned-over, even though it is now a copy of some other instance, those original MID Servers will still be pointing to it. The MID Server from the instance that was the Source of the Clone will still be pointing to that source instance only. Since PRB1287729 was fixed in Madrid, all MID Server related records are excluded from the clone and preserved on the target to ensure those MID Servers remain properly configured and working after the clone.

However records for e.g. LDAP Servers will have been copied, including the reference to the production MID Server sys_id. Those records now have broken refrences to MID Servers that do not exist for the clone target instance.


Warning: Before considering this, please investigate exactly what you are using these MID Servers for, and whether it is a good idea. You may accidentally cause integrations that should only be running on production to also start running from the sub-production cloned instance. I those integrations push to other production systems, you could cause horrendous data loss and corruption.

You can clone a MID Server installation, so that you end up with 2 separate installations, but each has the same sys_id. So long as they never point to the same instance URL, that is not going to cause conflicts or problems.

  1. Make note of the sys_id and Name of the MID Server record (ecc_agent table) in the Production instance (clone source)
  2. Set up a new MID Server, using the installer script in the normal way, but don't Start it yet. You could give it the same Name, but that's not necessary. "Save the configuration by clicking "Next"" but then close the next window without clicking "Start".
  3. Open the config.xml file in WordPad (or a similar editor that knows what to do with UNIX Line feeds). You will see the url, username/password, name, and proxy setting are filled in for you.
  4. Scroll to the end of the file
  5. You will see a line: <parameter name="mid_sys_id" value=""/>. (If you manually filled in the whole config.xml file, without using the installer, you may have to add this.)
  6. Enter the sys_id in this parameter value, using the sys_id of the source instance MID Server:
    <parameter name="mid_sys_id" value="SYS_ID_OF_MID_SERVER"/>
    The end of the file will now look something like this:
 <!-- *************************************************************************************
* REQUIRED Parameters that are AUTOMATICALLY filled in.
* This section contains parameters that are required, but will be automatically filled in
* after the MID server first made contacts to your Service-now instance.
************************************************************************************* -->
<!-- Records the unique ID of the MID server's record on the Service-now instance. On
installation of the MID server, this value should be empty. The MID server
will fill in this value after it first contacts your Service-now instance. -->

<parameter name="mid_sys_id" value="95371864dbb1a780a1bb3400ad9619ab"/>

  1. Save the file
  2. From a Command Prompt window, as Administrator, run start.bat
  3. Once the MID Server record appears in the list in the sub-prod/clone target instance, Validate it
  4. You should now be able to test your features that are configured to use a MID Server with this sys_id.


Article Information

Last Updated:2019-08-02 20:58:47