I'm wondering how layer files representing features within a multiuser database can be shared with OS authentication.
My understanding is that a 'filepath' to the feature is a reference to the specific sde connection on my computer, followed by \MyFeature 1 etc. which makes sense to control the authentication and version.
How would a layer file be constructed so that various users can use the same layer file but with a prompt for OS Auth (as they would have different DBMS roles assigned to them)?
Is it just a case of copying the .sde connection file to a network location then wrangling the paths through it?
There are no versions other than DEFAULT.
Thanks for reading.
Solved! Go to Solution.
OS Authentication doesn't have a prompt, it uses the credentials of the process reading the connection information and connecting to the EGDB.
How connection information in SDE files is handled changed around 10.2. Today, the connection information is embedded in a layer, and hence layer file. Layer.workspacePath contains a reference to the SDE file last used to set a layer's data source, but that SDE file isn't used to make the connection after set. Layer.serviceProperties contains the embedded connection information that is used to make the connection.
OS Authentication doesn't have a prompt, it uses the credentials of the process reading the connection information and connecting to the EGDB.
How connection information in SDE files is handled changed around 10.2. Today, the connection information is embedded in a layer, and hence layer file. Layer.workspacePath contains a reference to the SDE file last used to set a layer's data source, but that SDE file isn't used to make the connection after set. Layer.serviceProperties contains the embedded connection information that is used to make the connection.
Thanks Joshua,
On checking the serviceProperties, is the UserName derived from os.getusername or whatever rather than hardcoded?
Thanks.
Esri doesn't document that information, although I suspect you are correct it is getting it from the database because Layer.serviceProperties returns no information on user when an EGDB connection is broken. If the application was pulling the information from local client/process, it would show user information even if the EGDB connection is broken.
Thanks Joshua, I guess the best way is to test it with some colleagues.
Cheers.