HOW TO
Cases may arise where internal replica versions become orphaned in the geodatabase, resulting in a suboptimal geodatabase compress.
Instructions provided describe how to identify and delete these system replica versions that are no longer being used by a replica in the geodatabase.
Replica system versions are used behind the scenes by ArcGIS to determine the changes to synchronize for a replica. A set of system versions exists for each replica in the geodatabase. Various system versions are created and deleted by ArcGIS as the replicas are synchronized.
Note: These versions are hidden by design, which means they are not displayed using ArcGIS tools and not returned by ArcObjects. They should not be manually deleted using database tools.
Replica system versions can be identified by the way they are named. Naming conventions for one-way and two-way replica system versions are as follows:
SYNC_RECEIVE_<replica id>_<generation number> SYNC_RECEIVE_REC_<replica id>_<generation number> SYNC_SEND_<replica id>_<generation number>
There may be instances where replicas are unregistered and their replica system versions remain in the geodatabase. These detached versions may cause a less than effective compress of the geodatabase.
The following steps describe how to identify and remove replica system versions that are no longer referenced by a replica in the geodatabase.
Note: For SQL Server, if using a dbo schema database, alter the syntax below to reflect dbo.GDB_ITEMS and dbo.GDB_ITEMTYPES.
SELECT ITEMS.ObjectID , ITEMS.Definition .value( '(/GPReplica/Name)[1]', 'nvarchar(max)') AS "Replica Name" , ITEMS.Definition .value( '(/GPReplica/ReplicaVersion)[1]', 'nvarchar(max)') AS "Replica Version" , ITEMS.Definition .value( '(/GPReplica/CreationDate)[1]', 'nvarchar(max)') AS "Creation Date" from sde.GDB_ITEMS AS ITEMS INNER JOIN sde.GDB_ITEMTYPES AS ITEMTYPES ON ITEMS .Type = ITEMTYPES .UUID WHERE ITEMTYPES. Name = 'Replica';
Warning: Configure the Oracle EXTPROC in order to successfully execute the following SQL syntax.
SELECT EXTRACTVALUE(XMLType(Definition), '/GPReplica/Name') AS "Replica Names", EXTRACTVALUE(XMLType(Definition), '/GPReplica/ID') AS "ReplicaID" FROM sde.GDB_ITEMS_VW ITEMS INNER JOIN sde.GDB_ITEMTYPES ITEMTYPES ON ITEMS.Type = ITEMTYPES.UUID WHERE ITEMTYPES.Name = 'Replica';The results of the query will return the ID and Replica Name. The ID is used as part of the system replica version naming convention.
SQL> select name from sde.versions order by name;
The following is an example of the results that would be returned from this query:
NAME ---------------------------------- DEFAULT SYNC_RECEIVE_56_0 SYNC_RECEIVE_56_1 SYNC_RECEIVE_56_2 SYNC_RECEIVE_REC_56_2 SYNC_SEND_56_0 SYNC_SEND_57_0 SYNC_SEND_48_2
Warning: Ensure a current database backup is available before proceeding. No other replica system versions should be deleted from the geodatabase, as this can lead to corruption of the existing replicas.
Note: Please contact Esri Support Services if there are other detached versions besides the detached versions identified in Step 3.
Get help from ArcGIS experts
Download the Esri Support App