<?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: Orphaned Replica Versions in 10.2.2 in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473554#M26966</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The person in my position before me used this (Oracle) SQL to view replicas and deal with orphans but I'm not exactly sure how. From what I can see, it only returns the versions that have a matching replica. So if there is a version missing, it does not have a replica and may be considered orphaned. Maybe you can refine it for your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;
&lt;SPAN class="keyword token"&gt;SELECT&lt;/SPAN&gt; EXTRACTVALUE&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;XMLType&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Definition&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'/GPReplica/Name'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Replica Names"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; EXTRACTVALUE&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;XMLType&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Definition&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'/GPReplica/ID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"ReplicaID"&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; sde&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GDB_ITEMS_VW ITEMS &lt;SPAN class="keyword token"&gt;INNER&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;JOIN&lt;/SPAN&gt; sde&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GDB_ITEMTYPES ITEMTYPES &lt;SPAN class="keyword token"&gt;ON&lt;/SPAN&gt; ITEMS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;Type&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ITEMTYPES&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UUID

&lt;SPAN class="keyword token"&gt;WHERE&lt;/SPAN&gt; ITEMTYPES&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Replica'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 20:56:24 GMT</pubDate>
    <dc:creator>BlakeTerhune</dc:creator>
    <dc:date>2021-12-11T20:56:24Z</dc:date>
    <item>
      <title>Orphaned Replica Versions in 10.2.2</title>
      <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473553#M26965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a Knowledge Base article about this, but it is insufficient for versions after the SDE table restructuring.&amp;nbsp; &lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/37551"&gt;Link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goal: discover replica versions whose replicas have been unregistered, leaving the versions orphaned.&lt;/P&gt;&lt;P&gt;Method: query the versions (sde.SDE_versions) and the replicas (sde.gdb_items)--those versions with unassociated replicas are orphans.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I can find a relationship between replicas and their versions; the item ObjectID is part of the version name, as shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sde.gdb_items: ObjectID = 43923&lt;/P&gt;&lt;P&gt;sde.SDE_versions: Name = SYNC_SEND_43923_16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I cannot find where this same number '43923' exists on its own such that I am able to join the versions to the replicas to discover orphaned replica versions.&amp;nbsp; You can't join '43923' to 'SYNC_SEND_43923_16' and the alternative is a tedious series of LIKE/IN statements, and there must be a way the db itself correlates them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the SQL I use to find replicas:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"&gt; &lt;SPAN style="color: blue;"&gt;*&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"&gt; &lt;SPAN style="color: blue;"&gt;FROM&lt;/SPAN&gt;&lt;BR /&gt;[ESRIPROD]&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;[sde]&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;[GDB_ITEMS]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;where&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;type&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;IN(&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'5B966567-FB87-4DDE-938B-B4B37423539D'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: red; font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"&gt;'D86502F9-9758-45C6-9D23-6DD1A0107B47'&lt;/SPAN&gt;&lt;SPAN style="color: gray; font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: red; font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"&gt;'4ED4A58E-621F-4043-95ED-850FBA45FCBC'&lt;/SPAN&gt;&lt;SPAN style="color: gray; font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 18:34:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473553#M26965</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-09-30T18:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Orphaned Replica Versions in 10.2.2</title>
      <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473554#M26966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The person in my position before me used this (Oracle) SQL to view replicas and deal with orphans but I'm not exactly sure how. From what I can see, it only returns the versions that have a matching replica. So if there is a version missing, it does not have a replica and may be considered orphaned. Maybe you can refine it for your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;
&lt;SPAN class="keyword token"&gt;SELECT&lt;/SPAN&gt; EXTRACTVALUE&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;XMLType&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Definition&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'/GPReplica/Name'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Replica Names"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; EXTRACTVALUE&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;XMLType&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Definition&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'/GPReplica/ID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"ReplicaID"&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; sde&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GDB_ITEMS_VW ITEMS &lt;SPAN class="keyword token"&gt;INNER&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;JOIN&lt;/SPAN&gt; sde&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GDB_ITEMTYPES ITEMTYPES &lt;SPAN class="keyword token"&gt;ON&lt;/SPAN&gt; ITEMS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;Type&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ITEMTYPES&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UUID

&lt;SPAN class="keyword token"&gt;WHERE&lt;/SPAN&gt; ITEMTYPES&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Replica'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:56:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473554#M26966</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-12-11T20:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Orphaned Replica Versions in 10.2.2</title>
      <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473555#M26967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I realize this is 2 years old, but if someone comes along looking for more information, I wanted to include this. Here is the SQL used to find orphaned replicas:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;select&lt;/SPAN&gt; name &lt;SPAN class="comment token"&gt;--delete&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; sde&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sde_versions &lt;SPAN class="keyword token"&gt;where&lt;/SPAN&gt; name &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;select&lt;/SPAN&gt; v&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; sde&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gdb_items g &lt;SPAN class="keyword token"&gt;join&lt;/SPAN&gt;
sde&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sde_versions v
&lt;SPAN class="keyword token"&gt;on&lt;/SPAN&gt; g&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;objectid &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;Left&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SubString&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;v&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; PatIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'%[0-9.-]%'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; v&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; PatIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'%[^0-9.-]%'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SubString&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;v&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; PatIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'%[0-9.-]%'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; v&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'X'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;where&lt;/SPAN&gt; g&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;type&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'{4ED4A58E-621F-4043-95ED-850FBA45FCBC}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; name &lt;SPAN class="operator token"&gt;like&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'SYNC%'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the select to Delete and it will remove the orphaned replicas.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:56:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473555#M26967</guid>
      <dc:creator>BrooksWilson</dc:creator>
      <dc:date>2021-12-11T20:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Orphaned Replica Versions in 10.2.2</title>
      <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473556#M26968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to clarify, that is for SQL Server, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 23:35:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473556#M26968</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2016-09-12T23:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Orphaned Replica Versions in 10.2.2</title>
      <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473557#M26969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 14:09:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473557#M26969</guid>
      <dc:creator>BrooksWilson</dc:creator>
      <dc:date>2016-09-13T14:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Orphaned Replica Versions in 10.2.2</title>
      <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473558#M26970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you for this SQL, I found it a lot more helpful than what is provided in the confusingly similar ESRI technical articles on this subject&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://support.esri.com/en/technical-article/000011719" title="http://support.esri.com/en/technical-article/000011719"&gt;How To: Determine if there are orphaned replica system versions in the geodatabase&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://support.esri.com/en/technical-article/000010858" title="http://support.esri.com/en/technical-article/000010858"&gt;How To: Determine if there are orphaned replica system versions in the geodatabase&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question I have is if there could be a danger of leaving other orphan data, such as orphan database states or lineages by using SQL to delete versions instead of the delete version tool. To be on the safe side I used the tool, to delete my orphans.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 20:21:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473558#M26970</guid>
      <dc:creator>DrewDowling</dc:creator>
      <dc:date>2017-10-30T20:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Orphaned Replica Versions in 10.2.2</title>
      <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473559#M26971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think any time you are rolling your own SQL to take the place of an Esri-managed operation, there is risk of it being messy. I always try to use the Esri tools if I can.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 15:47:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473559#M26971</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2017-11-02T15:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Orphaned Replica Versions in 10.2.2</title>
      <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473560#M26972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;SQL Server:&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Find orphaned sync send versions.&amp;nbsp; This will return any sync send versions that do not have a corresponding replica -&amp;nbsp; sync version # corresponds to GDB_ITEMS.ObjectID&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 9.5pt;"&gt;&lt;SPAN style="color: blue;"&gt;select &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;name &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;from &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;sde&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;sde_versions &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;where &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;name &lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;not in (&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 9.5pt;"&gt;&lt;SPAN style="color: blue;"&gt;select &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;v&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;name &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;from &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;sde&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;gdb_items g &lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;join&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 9.5pt;"&gt;&lt;SPAN style="color: teal;"&gt;sde&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;sde_versions v&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 9.5pt;"&gt;&lt;SPAN style="color: blue;"&gt;on &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;g&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;objectid &lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;= Left(&lt;/SPAN&gt;&lt;SPAN style="color: fuchsia;"&gt;SubString&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;v&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: fuchsia;"&gt;PatIndex&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'%[0-9.-]%'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;v&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;),&lt;/SPAN&gt; 10&lt;SPAN style="color: gray;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 9.5pt;"&gt;&lt;SPAN style="color: gray;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: fuchsia;"&gt;PatIndex&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'%[^0-9.-]%'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: fuchsia;"&gt;SubString&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;v&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: fuchsia;"&gt;PatIndex&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'%[0-9.-]%'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;v&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;),&lt;/SPAN&gt; 10&lt;SPAN style="color: gray;"&gt;) + &lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'X'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;)-&lt;/SPAN&gt;1&lt;SPAN style="color: gray;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 9.5pt;"&gt;&lt;SPAN style="color: blue;"&gt;where &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;g&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;type &lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'{4ED4A58E-621F-4043-95ED-850FBA45FCBC}'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;) and &lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;name &lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;like &lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'SYNC%'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 9.5pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 9.5pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 9.5pt;"&gt;&lt;SPAN style="color: gray;"&gt;This will return all sde_version records that do not have an associated replica type in the gdb_items table.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 16:07:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473560#M26972</guid>
      <dc:creator>TinaMorgan1</dc:creator>
      <dc:date>2017-11-02T16:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Orphaned Replica Versions in 10.2.2</title>
      <link>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473561#M26973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Always take backups before using SQL in the repository.&amp;nbsp; We prefer this be done in test environments first, and always thoroughly test normal workflows after the SQL update.&lt;/P&gt;&lt;P&gt;This workflow, however, is relatively straight forward, and I have not seen any cascading effects due to deleting replica sync versions that I have confirmed (doubly if necessary) are orphaned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have already unregistered the replica, then it is assumed you have already synchronized that replica, and done the appropriate maintenance to get your edits into the version you want them in (ultimately default then to base table with a compress).&amp;nbsp; If you still see your SYNC_SEND... versions in the sde_versions table after unregistering the replica, then those version could potentially block edits from being pushed through, will minimize how effective your compress will be, and over time will slow down your system.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 16:12:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/orphaned-replica-versions-in-10-2-2/m-p/473561#M26973</guid>
      <dc:creator>TinaMorgan1</dc:creator>
      <dc:date>2017-11-02T16:12:07Z</dc:date>
    </item>
  </channel>
</rss>

