I would like to know if there is a way to access the archive class in a Map Service on ArcGIS Server.
I have a Map Service with feature class stored in a SDE GeoDatabase with Archiving and Versionning enabled.
My questions are:
Layer's data source is not registered with the geodatabase (Feature Service). Does it means it's not possible to publish an Archive Class?
ahh - I think the confusion might be that the data I'm talking about is versioned - which, based on the link you added, works differently than non-versioned data when archiving. I didn't know they were treated differently.
to clarify I'm working with versioned data. thanks!
What you need to do is to publish the Historical Archive.
As far as I know, _H tables are created the moment you disable archiving and choose to maintain the history. Enable and disable again will create _H1, _H2 et cetera.
that's all working great for me except for the last point - my publishing keeps failing and I can't figure out why. maybe I'll try putting together a new from scratch geodatabase and give it another go. I'll let you guys know if there is any progress.
What is the failure?
What do the GP Results messages say?
Is the failure during analyze / publishing (same thing)?
What do the server logs say? (usually will give enough information to figure errors out)
I just saw this... scratch geodatabase? as in scratch gdb? I'm sure its just a mixup of terminology, but you are aware that an Enterprise Geodatabase is needed... e.g. SQL, Oracle, HANA, etc.
thanks for your persistence in this!
To answer your questions in reverse order I'm using a SQL Server Enterprise Geodatabase. ArcGIS 10.4, SQL 2012 SP3. for the initial testing I was using an Enterprise database that I had previously created for some data work, but wanted to create a new one "from scratch" just for this testing, sorry for the confusion.
for the failure - after publishing (no errors during analyze) - I get:
"Packaging succeeded, but publishing failed. ERROR 001487: Failed to update the published server with the server-side data location. Please see the server's log for more details. Please conuslt the GP Results Window for enhanced error description or contact your administrator for the server logs."
The GP Results Window shows a successful Stage Service, but a failure to upload the service definition (I have published other services while this issue has persisted so it shouldn't be a standard publishing issue). The GP window shows errors 001487 (as above) and Error 001369: "Failed to create the service."
The Server logs show me 3 errors (all severe).
1. Failed swizzling service
2. Failed to create the service: Updating the server connection string for layer TimeTestPoint Archive failed. Attempted connection string was: . . . Table name is TIMETEST.DBO.TIMETESTPOINT_H. Please verify the data exists on the server.
3. Error executing tool. PubishServiceDefinition . . . Errors 001487 and 001369 as above.
the 2nd error seems to be the diagnostic one here to me, although I don't understand why its happening. The connection string that is registered with Server is the same connection string the data is added with so access shouldn't be an issue.