AnsweredAssumed Answered

How to remove orphans sync replicas?

Question asked by tpcolson Champion on Nov 2, 2018
Latest reply on Nov 2, 2018 by George_Thompson-esristaff

From SDE 10.6.1 on SQL 2014 ENT, I have some ghost replicas left over from a years ago TS case. The feature services that spawned them are long gone. How to remove them? 

SELECT
ITEMS.Definition .value( '(/GPSyncReplica/ID)[1]', 'nvarchar(max)') AS "ID" ,
ITEMS.Definition .value( '(/GPSyncReplica/ReplicaName)[1]', 'nvarchar(max)') AS "Replica Name" ,
ITEMS.Definition .value( '(/GPSyncReplica/ReplicaID)[1]', 'nvarchar(max)') AS "Replica ID" ,
ITEMS.Definition .value( '(/GPSyncReplica/CreationDate)[1]', 'nvarchar(max)') AS "Creation Date",
ITEMS.Definition .value( '(/GPSyncReplica/GPSyncDatasets/GPSyncDataset/DatasetName)[1]', 'nvarchar(max)') AS "Dataset Name"
from
dbo.GDB_ITEMS AS ITEMS INNER JOIN dbo.GDB_ITEMTYPES AS ITEMTYPES
ON ITEMS .Type = ITEMTYPES .UUID
WHERE
ITEMTYPES. Name = 'Sync Replica';
ID     Replica Name     Replica ID     Creation Date     Dataset Name
-1     DBO.Ags_Fs     A2302934-20B6-41D4-B48F-1AD84A1165E2     2014-12-17T18:32:16.27     PFMD.DBO.ESRI_TEST_MSFT
-1     DBO.Ags_Fs_1418841420633     5ECE3404-607B-4F04-A1E4-C32FDD2EAA43     2014-12-17T18:36:01.147     PFMD.DBO.ESRI_TEST_MSFT
-1     DBO.Ags_Fs_1418841988647     22D0DEA1-C164-4ADF-81C4-B1C332D607A5     2014-12-17T18:46:11.3     PFMD.DBO.ESRI_TEST_MSFT
35719     DBO.Ags_Fs_1418909174993     9FA30948-67D3-4ACB-8396-EA720ABF7544     2014-12-18T13:26:01.787     PFMD.DBO.ESRI_TEST_MSFT
-1     DBO.Ags_Fs_1419181999753     84E3E701-38EF-486E-9BAB-32D5BBDC87FC     2014-12-21T17:11:11.93     PFMD.DBO.TRAILSIGN
-1     DBO.Ags_Fs_1418841209303     C3038FE1-384E-4A2F-81B8-3752D693D41F     2014-12-17T18:33:03.64     PFMD.DBO.ESRI_TEST_MSFT
-1     DBO.Ags_Fs_1419186441983     15B5D13D-70A4-4099-84DE-3001B4639EEF     2014-12-21T18:25:30.603     PFMD.DBO.TRAILSIGN
-1     DBO.Ags_Fs_1419262786420     96CBBD68-49E3-4162-946E-2EEB7FC35154     2014-12-22T15:39:24.667     PFMD.DBO.ESRI_TEST_MSFT
40523     DBO.Ags_Fs_1420049785970     1EE77463-ED4F-431D-9395-663C85AC8EAC     2014-12-31T18:16:07.217     PFMD.DBO.ESRI_TEST_MSFT
97711     DBO.Ags_Fs_1522248749793     8BA06387-0C91-4D02-8BF3-A024293E297E     2018-03-28T14:52:20.023     PFMD.DBO.TEST_EMPTY

Outcomes