In Real-time Geodatabase Replication? Part 1 you were introduced to SQL Real-Time Replication. One requirement of SQL Merge Replication is that the table being replicated must have a rowguidcol. This is easy with a cursor:
DECLARE @sql VARCHAR(500), @tableName VARCHAR(128) DECLARE gandgCursor CURSOR FOR SELECT table_name FROM SDE_column_registry WHERE table_name like 'CR%' ORDER BY table_name ASC OPEN gandgCursor FETCH NEXT FROM gandgCursor INTO @FETCH_STATUS = 0 ) BEGIN SET @sql = ' ALTER TABLE [dbo].['+ @tableName + '] ALTER COLUMN GlobalID ADD ROWGUIDCOL ; ' PRINT 'Executing Statement - '+ @sql EXECUTE ( @sql ) FETCH NEXT FROM gandgCursor INTO @tableName END CLOSE gandgCursor DEALLOCATE gandgCursor
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.