esri geodatabase change detection for sql server with a spatial data type
-
Enterprise SQL Server with the spatial data type and tables registered with the geodatabase
-
A table named
ChangeDetection
that is not registered with the geodatabaseCREATE TABLE [META].[ChangeDetection]( [table_name] [nvarchar](250) NULL, [last_modified] [date] NULL, [hash] [nvarchar](50) NULL, [id] [int] IDENTITY(1,1) NOT NULL )
The first time the tool is run it will update the ChangeDetection
table with the table name, the current date, and a hash digest of all of the rows hashes combine. On subsequent runs, it will query the ChangeDetection
table for the single hash, rehash the table, compare the results, and then update the last_modified
and hash
values on the ChangeDetection
table if changes were found.
Applications and users that are interested in taking action when data changes can query the ChangeDetection
table and inspect the dates that are greater than the last time they checked. For instance, if a process is scheduled to run daily, querying for last_modified
dates that equal the current date would result in the set of data to process.
dotnet run cambiador
- edit the
appsettings.json
file for the database connection - bump the version in the
cambiador.csproj
- build the project into a single file
dotnet publish --runtime win-x64 -c Release /p:PublishSingleFile=true /p:DebugType=None --no-self-contained
- deploy the
cambiador.exe
file that will be created inbin/release/net8.0/win-64/publish
to the place where it will run