<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot create Replica using RegisterReplicaForServer option with one-way feature service-to-feature with sync enabled in Publishing and Managing Services Questions</title>
    <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-create-replica-using/m-p/1505101#M1234</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/416383"&gt;@midmike&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first thing I want to confirm is that the source and the target feature classes are stored in two different enterprise geodatabases. This is a necessary requirement for this workflow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the screenshots you provided there seem to be a couple issues with the functions syntax, that might cause the replica pair to be created.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the source feature service, in the replicaOptions syntax, you need to specify the ServerGen and ServerSibGen numbers. Here is a syntax example:&amp;nbsp;&lt;EM&gt;&lt;SPAN class=""&gt;{"registerReplicaForServer":{"refReplicaServerGen": 1690749452000, "refReplicaServerSibGen":&amp;nbsp; 1690749452000}}&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You can use any online tool to generate the UNIX epoch time in milliseconds, then add the value for the ServerGen parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the target feature service, you correctly referenced the source replica ID, however there is an "=" sign that makes the replicaOtions syntax incorrect.&amp;nbsp;Here is a syntax example:&amp;nbsp;&lt;EM&gt;&lt;SPAN class=""&gt;{"registerReplicaForServer":{"refReplicaId": "YOUR SOURCE REPLICA ID", "refReplicaServerGen": 1690749452000, "refReplicaServerSibGen":&amp;nbsp; 1690749452000}}&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A clear indicator that the operation was successful is that in the response, you will get a URL to a json file that stores all the replica information. Here is an example of a correct response:&amp;nbsp;&lt;EM&gt;"https://.....esri.com/server/rest/directories/arcgisoutput/MapServer/_ags_fs24fff2cba933432d96a9bcdcdac16860.json"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Additional resources:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would recommend to check out the &lt;A href="https://mediaspace.esri.com/media/t/1_to7gn3d9/309413912" target="_blank" rel="noopener"&gt;ArcGIS Enterprise: Feature Service Sync Workflows&lt;/A&gt;&amp;nbsp;technical session. If you jump to minute 42, it takes you directly to a step-by-step demo on creating replicas using the Rest API. This will bring more clarity into the syntax format you need use.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/create-replica/#using-registerreplicaforserver" target="_blank" rel="noopener"&gt;Create Replica&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/synchronize-replica/" target="_blank" rel="noopener"&gt;Synchronize Replica&lt;/A&gt;&amp;nbsp;ArcGIS REST APIs documentation.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the &lt;A title="One-way feature service-to-feature service sync" href="https://www.esri.com/arcgis-blog/products/arcgis-enterprise/data-management/one-way-feature-service-to-feature-service-sync/" target="_self" rel="nofollow noopener noreferrer"&gt;One-way feature service-to-feature service sync&lt;/A&gt;&amp;nbsp;blog I added a copy of a sample script that goes through the entire workflow automatically. Add into the script your feature services then run the script. The script creates a replica pair then synchronizes any changes. This is a much faster and efficient way to do this workflow.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Diana&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jul 2024 00:30:02 GMT</pubDate>
    <dc:creator>Diana_Muresan</dc:creator>
    <dc:date>2024-07-13T00:30:02Z</dc:date>
    <item>
      <title>Cannot create Replica using RegisterReplicaForServer option with one-way feature service-to-feature with sync enabled</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-create-replica-using/m-p/1504672#M1233</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/472658"&gt;@Diana_Muresan&lt;/a&gt;&amp;nbsp;&amp;nbsp;I saw the blog &lt;A title="One-way feature service-to-feature service sync" href="https://www.esri.com/arcgis-blog/products/arcgis-enterprise/data-management/one-way-feature-service-to-feature-service-sync/" target="_self"&gt;One-way feature service-to-feature service sync&lt;/A&gt;&amp;nbsp;and do the following workflow. However, The replica ID from the source service not same as replica ID with target service.&lt;/P&gt;&lt;P&gt;I have published source and target service however, I don't see the property of&amp;nbsp; "supportRegisterReplicaForServer : true" as you show in the blog, In my service show the SyncCapability shown below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midmike_0-1720772972329.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109630iAE7FD3D96CE83E30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midmike_0-1720772972329.png" alt="midmike_0-1720772972329.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I try to create Replica for both source and target service using &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/create-replica/#using-registerreplicaforserver" target="_blank" rel="noopener"&gt;registerReplicaForServer&lt;/A&gt;, however the Replica ID of source and target does not &lt;STRONG&gt;MATCH&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The config of create replica for my source service as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midmike_1-1720773245666.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109631i46B61CCA783B57AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midmike_1-1720773245666.png" alt="midmike_1-1720773245666.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The Replica with source ID is&amp;nbsp;&lt;A href="https://esrith-testing.cdg.co.th/server/rest/services/Nonversion_archieve_source/FeatureServer/replicas/D97CA10C-E80C-4931-8627-51E27F6D7EE4" target="_blank" rel="noopener"&gt;D97CA10C-E80C-4931-8627-51E27F6D7EE4&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The config of create replica for target source service as below. which I put the Replica Source ID to target also&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midmike_2-1720773327407.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109632iFA64C0057AB5299A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midmike_2-1720773327407.png" alt="midmike_2-1720773327407.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Ensure My config feature service with source and target show as below&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Same Global ID with using copy-paste function&lt;/LI&gt;&lt;LI&gt;Feature service layer ID of source and target is matching&lt;/LI&gt;&lt;LI&gt;Both source and target has sync enabled&lt;/LI&gt;&lt;LI&gt;Both source and target service using PostgreSQL with enable enterprise geodatabase&lt;/LI&gt;&lt;LI&gt;Both source and target of Version creation of Sync is "None"&lt;/LI&gt;&lt;LI&gt;I investigate with ArcGIS Enterprise 11.3 and ArcGIS Pro 3.3&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So the questions is&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;How can I set property of&amp;nbsp;"supportRegisterReplicaForServer : true is source and target feature service&lt;/LI&gt;&lt;LI&gt;How can I set the Replica ID with source and target service to match&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2024 08:40:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-create-replica-using/m-p/1504672#M1233</guid>
      <dc:creator>midmike</dc:creator>
      <dc:date>2024-07-12T08:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create Replica using RegisterReplicaForServer option with one-way feature service-to-feature with sync enabled</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-create-replica-using/m-p/1505101#M1234</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/416383"&gt;@midmike&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first thing I want to confirm is that the source and the target feature classes are stored in two different enterprise geodatabases. This is a necessary requirement for this workflow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the screenshots you provided there seem to be a couple issues with the functions syntax, that might cause the replica pair to be created.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the source feature service, in the replicaOptions syntax, you need to specify the ServerGen and ServerSibGen numbers. Here is a syntax example:&amp;nbsp;&lt;EM&gt;&lt;SPAN class=""&gt;{"registerReplicaForServer":{"refReplicaServerGen": 1690749452000, "refReplicaServerSibGen":&amp;nbsp; 1690749452000}}&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You can use any online tool to generate the UNIX epoch time in milliseconds, then add the value for the ServerGen parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the target feature service, you correctly referenced the source replica ID, however there is an "=" sign that makes the replicaOtions syntax incorrect.&amp;nbsp;Here is a syntax example:&amp;nbsp;&lt;EM&gt;&lt;SPAN class=""&gt;{"registerReplicaForServer":{"refReplicaId": "YOUR SOURCE REPLICA ID", "refReplicaServerGen": 1690749452000, "refReplicaServerSibGen":&amp;nbsp; 1690749452000}}&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A clear indicator that the operation was successful is that in the response, you will get a URL to a json file that stores all the replica information. Here is an example of a correct response:&amp;nbsp;&lt;EM&gt;"https://.....esri.com/server/rest/directories/arcgisoutput/MapServer/_ags_fs24fff2cba933432d96a9bcdcdac16860.json"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Additional resources:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would recommend to check out the &lt;A href="https://mediaspace.esri.com/media/t/1_to7gn3d9/309413912" target="_blank" rel="noopener"&gt;ArcGIS Enterprise: Feature Service Sync Workflows&lt;/A&gt;&amp;nbsp;technical session. If you jump to minute 42, it takes you directly to a step-by-step demo on creating replicas using the Rest API. This will bring more clarity into the syntax format you need use.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/create-replica/#using-registerreplicaforserver" target="_blank" rel="noopener"&gt;Create Replica&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/synchronize-replica/" target="_blank" rel="noopener"&gt;Synchronize Replica&lt;/A&gt;&amp;nbsp;ArcGIS REST APIs documentation.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the &lt;A title="One-way feature service-to-feature service sync" href="https://www.esri.com/arcgis-blog/products/arcgis-enterprise/data-management/one-way-feature-service-to-feature-service-sync/" target="_self" rel="nofollow noopener noreferrer"&gt;One-way feature service-to-feature service sync&lt;/A&gt;&amp;nbsp;blog I added a copy of a sample script that goes through the entire workflow automatically. Add into the script your feature services then run the script. The script creates a replica pair then synchronizes any changes. This is a much faster and efficient way to do this workflow.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Diana&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2024 00:30:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-create-replica-using/m-p/1505101#M1234</guid>
      <dc:creator>Diana_Muresan</dc:creator>
      <dc:date>2024-07-13T00:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create Replica using RegisterReplicaForServer option with one-way feature service-to-feature with sync enabled</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-create-replica-using/m-p/1506078#M1236</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/472658"&gt;@Diana_Muresan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I complete the workflow The service from Reference feature service which source and target using the python script that you provided &lt;A href="https://www.arcgis.com/home/item.html?id=564d0b7d8c18475dabd4d04bdea65385" target="_self"&gt;Feature service sync - Sample script&lt;/A&gt; is working &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saw your blog, the Reference feature service can be paired with Hosted Feature Service. However, I try to sync Replica with the python script.&lt;/P&gt;&lt;P&gt;It's error occurs when creating replica method of target Hosted feature service&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midmike_0-1721199264070.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109921i9F9FA718F9159769/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midmike_0-1721199264070.png" alt="midmike_0-1721199264070.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So I do the create Replica by manually which same Replica ID for Source feature service (referenced). The Replica ID, finally MATCH and I put the Replica ID to file replicaID.txt&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midmike_1-1721199490972.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109930i676959DB7411B959/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midmike_1-1721199490972.png" alt="midmike_1-1721199490972.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Source fs (reference)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midmike_2-1721199538699.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109931i90D9859A5E55CDA5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midmike_2-1721199538699.png" alt="midmike_2-1721199538699.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Target fs (Hosted)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midmike_3-1721199628887.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109932i0D9497FD27EA7E54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midmike_3-1721199628887.png" alt="midmike_3-1721199628887.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And Then I ran the script again try to Sync Replica but the error occurs,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midmike_4-1721199693452.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109933iD2D324266935DE31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midmike_4-1721199693452.png" alt="midmike_4-1721199693452.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I try to manually Sync Replica but it's error also&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midmike_5-1721199799422.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109934i1E23FA9499CE7F57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midmike_5-1721199799422.png" alt="midmike_5-1721199799422.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Therefore, my question is&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Is the sync replica&amp;nbsp;available of source reference fs and target hosted fs which is same enterprise portal ?&lt;/P&gt;&lt;P&gt;2. Is the python script work as pair of&amp;nbsp;reference fs and hosted fs ?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 07:07:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-create-replica-using/m-p/1506078#M1236</guid>
      <dc:creator>midmike</dc:creator>
      <dc:date>2024-07-17T07:07:05Z</dc:date>
    </item>
  </channel>
</rss>

