Select to view content in your preferred language

How exactly does the data store work?

3282
7
08-14-2014 02:05 PM
RobertYarbrough
Occasional Contributor

I'm currently in the process of upgrading from ArcGIS 10.0 to ArcGIS 10.2 and one of the new features is the cluster based data store.  I have no problems creating connections in my data store, but when I'm creating my service definitions, it appears to pull the connection information right out of the .mxd files.

It would be nice to create a service definition file that references a named data store on a server, then be able to publish that definition to servers in various environments and have it use the connection information specific to that environment without having to modify the connection information in the .mxd files for each environment.

Perhaps I'm missing something, but so far, I haven't figured out how to make ANY service use the data store connection information.

0 Kudos
7 Replies
DavidColey
MVP Frequent Contributor

Go ahead and place your sde connection files and fdgb's in the server-registered data-store default location, either on your server or shared directory.  We use a subfolder in our data-store named DataConnections.  Then we define other various folders under data-store containing mxd's to be published. Each of those mxd's is always sourced to a DataConnection connection via unc path.  In this way, your published mxd's will always source your data-store connection and not various publisher's desktop connections

0 Kudos
RobertYarbrough
Occasional Contributor

I'm still not certain what is going on here though, it sounds like we're just "tricking" the mxd to use the same connection as the data store, not overriding what is in the mxd with the connection information associated with the data store for a particular server.

From what I can tell, I don't need a data store at all, everything I've published works just fine and dandy due to the way I already had things configured (the publisher and server have similar folders with .sde connection files in them).  This isn't any different from what I was doing with 10.0.

0 Kudos
DavidColey
MVP Frequent Contributor

No, server needs the data-store.  We have found that things are more stable if the connections are in a secure, shared environemnt.  So, even at 10.0 we always did the same thing.  What I think you're talking about is the option regarding data store connection same as publisher's connection (ie your desktop sde connection).  I personally don't like to rely on my C:\Users\dcoley\AppData\Roaming\ESRI\Desktop10.2 sde connections for publishing, particularly if another publisher needs to access the mxd.  So I get around that by always using the data-store connection from my desktop.

0 Kudos
RobertYarbrough
Occasional Contributor

I guess I'm just confused on how to actually use the data store.  When I create a service definition from an mxd, the connection information is already stored inside the mxd, at no point in time do I see any option to change that connection information to reference the data store of a particular cluster.  If I want to change the data source for my layers within ArcCatalog, there doesn't seem to be any way to have it reference a data store instead of pointing to a .sde connection file.

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Hi Robert,

Starting at 10.1, when creating a service the data and MXD are copied from the client to the ArcGIS Server server.  The advantage of this is if the client machine (where the data resides in this example) is shutdown, the service will still running correctly.  However, if you were to make edits to the data, the service would not update since it's reading a copy of the data.  You would then have to re-publish the service for the edits to appear.

This is where the Data Store comes in.  Setting a data store is telling ArcGIS Server not to copy the data, but to read it from it's current location.  Therefore, as soon as you were to make an edit to the data, the service is immediately updated.

Hope this clears things up for you a little bit.

0 Kudos
RobertYarbrough
Occasional Contributor

Okay, so I've read this before, and just as a test, I turned off my database and my map still seems to function just fine, which means the data must have been copied to the local server.  This brings up several questions.

* How do I tell if the server is using data from a database, or data that has been copied local to the server?

* Where is this data copied to?

* How do I tell the service to stop using local data, and get it's data from a data store instead?

* When I publish my service, how do I tell it to use a data store in the cluster I'm publishing to?  I want to publish using python scripts if possible.  For instance, the CreateMapSDDraft function has a boolean value for whether or not to copy the data to the server, but nowhere do I see any way to tell it to use a specific data store. 

Hopefully I can find some of the answers to these questions on my own, but any assistance would be greatly appreciated.

0 Kudos
JakeSkinner
Esri Esteemed Contributor

* How do I tell if the server is using data from a database, or data that has been copied local to the server?

When you analyze your data it will tell you that the data will be copied, and you will also see a pop-up:

screen.png

* Where is this data copied to?

C:\arcgisserver\directories\arcgissystem\arcgisinput

* How do I tell the service to stop using local data, and get it's data from a data store instead?

ArcGIS Server will automatically use the data store when you publish the service.

* When I publish my service, how do I tell it to use a data store in the cluster I'm publishing to?  I want to publish using python scripts if possible.  For instance, the CreateMapSDDraft function has a boolean value for whether or not to copy the data to the server, but nowhere do I see any way to tell it to use a specific data store.

You can set this to False.  From the help:

A Boolean that indicates whether the data referenced in the map document will be copied to the server or not. The copy_data_to_server parameter is only used if the server_type is ARCGIS_SERVER and the connection_file_path isn't specified. If the connection_file_path is specified, then the server's registered data stores are used. For example, if the data in the map_document is registered with the server, then copy_data_to_server will always be False. Conversely, if the data in the map_document is not registered with the server, then copy_data_to_server will always be True.

0 Kudos