Select to view content in your preferred language

Feature Service Replica Creation fails from Read Only Connection

55
1
Wednesday
Labels (2)
FMGLGIS
New Contributor III

Hi, hoping someone can share their experience publishing services for offline use using a connection with a db account with db_reader role in SQL Server. We have a SQL Server database, ArcGIS Enterprise 10.9.1 and EGDB 10.8x.

Our map services are feature enabled and published using an sde connection using a sql server db account which has "db_datareader" role, this practice is mirrored across numerous EGDBs registered against AGS Server as data stores.

We are able to successfully take these feature services offline from one database but not another. There is a  db account with "db_owner" role which IS successfully able to create replicas for offline use in field maps/arcgis pro, however items published from the connection using data reader role yeilds the following issues.

The Feature Class is versioned without the ability to move to base, has global IDs. The only difference is this db_reader account on this database.

SEVEREJul 3, 2024, 15:01:39Error executing tool. CreateFeatureServiceReplica Job ID: jc67fd73fb01c4230ade1369e0fc49195 : ErrorMsg@SyncGPService:{"code":400,"description":"Failed to create replica."} Failed to execute (Create Feature Service Replica).System/SyncTools10x.GPServer
SEVEREJul 3, 2024, 15:01:37Error: Can't create empty replica. Read only data or unversioned data cannot be replicated. Data versioned with the option to move edits to base cannot be replicated. GlobalIDs are required for two way and one way replica data. Creating one way archiving replica requires archiving to be enabled on the parent. .System/SyncTools10x.GPServer
0 Kudos
1 Reply
Joshua-Young
Regular Contributor

I believe this is because of how Esri takes feature services offline. When a feature service is taken offline the user is actually taking a version of the data offline and not the base data. Since the db_datareader role can only read and not write, an error is thrown because the account does not have permission to write the replica to take offline. Or if you data is a traditional version then db_datareader cannot create the new tables for the replica.

Esri's way of handling offline/sync has long been a problem for me. I had a similar problem when I wanted to make a feature service published from a SQL Server view table be part of a distributed collaboration with ArcGIS Online. Even though the data the view referenced was setup for offline/sync use, the view's feature service could not be setup for sync because ArcGIS kept trying to create a replica off of the view table and throwing an error.

"Not all those who wander are lost" ~ Tolkien
0 Kudos