When I add a layer from our SDE it displays fine and I can edit - but when I go to save and close the MXD then reopen it back up the data sources connections are lost (screen shot 1 below) then once I set data source it works (screen shot 2 below).
To make it more confusing - when I open the MXD and remove the layer then re-add it back in the connection works!
I have ArcGIS 10.6, SQL Server, and Windows 10
What is the version of SQL Server being used?
Is the SQL Server configured for highly-available?
What if you delete the .sde connection file and recreate it, does the same behavior happen?
I am guessing that you have selected the save connection properties in the connection file.
Hi George - we are using SQL Server 2017 and not sure where to find if it's highly available. also when you say 'delete the .sde connection file and recreate it' are you saying delete it from catalog and add it back or create a whole new .sde file?
For the SQL Server side I would ask your DBA.
For the .sde connection, yes. Delete the old connection and rebuild it. I noticed that the "instance" information was different between image1 and image 2. Image1 looks like the old school ArcSDE (dinosaur) information.
What is interesting about the SDE connection is that when I open a MXD on my VM (the VM has the SQL server) everything works just fine- where I can save the MXD and the connections are not lost when I open it back up. It's only when I try to save a MXD on my personal machine that this is happening. Not sure why all of a sudden that local machines are reverting back this old 'old school ArcSDE'?
I tried the rebuild and that still didn't work either, and our SQL Server is highly available.
Ok, if you are on the SQL machine and it connects, that would make sense. I think that you have something in the connection file that is not set correctly; Connections to highly available SQL Server databases—Help | ArcGIS Desktop
Look at that doc if your SQL Server is configured for "HA"
Re-installing ArcMap did not help. Also sorry about the confusion, but I just received more information from our team that our SQL server is NOT highly available for both our test and prod environments. Also, I tried saving an ArcScene map (realize that ArcScene does not save as a MXD) but it worked when I saved and reopened again. So not sure why it's only for MXDs that the connections change.
Can you verify the SQL Server native client installed on the DT client: Microsoft SQL Server database requirements for ArcGIS 10.6.x—System Requirements | ArcGIS Desktop
You should have this one installed:
SQL Server 2017Microsoft ODBC Driver 17 for SQL Server
SQL Server 2017
I have Microsoft SQL Server 2012 Native Client installed on my machine - it's the same that is on the VM machine that is where the MXD is working
Ok, update to ODBC Driver 17 reference above; Download Microsoft® ODBC Driver 17 for SQL Server® - Windows, Linux, & macOS from Official Microsoft Download Center
Important after installation to close the Desktop client and re-open.
I'm not sure that it's the SQL server connection since its the same native client that is installed on VM that is on our desktops - and I can access SDE just fine on the VM and on my desktop its literally when I only try to save that the connection changes on my desktop.
Ok, I am at a loss at this point and would recommend contacting technical support to further troubleshoot.
A new insight to this is I found out that it's only layers that are within a Feature Dataset that are causing the problem. If the feature class is not within a feature dataset I can save and open the mxd just fine.
Based on that new information, can you please verify that you have all the correct (i.e. same) permissions to all the feature classes within the feature dataset?
If you had a mixed bag of permissions in the feature dataset, it could cause some odd behavior.
I checked the permission differences in each feature class within the feature dataset and they all have the same permissions - I also created a brand new feature dataset and then added a new feature class and still behaving the same.
Another difference that I spotted is:
The ones that are working are; outside of a feature dataset and look like this:
GISDB.PORT.TAXLOT_PORT
The ones that are not working are (1) within a feature datastet and (2) outside of a feature dataset. but look like this:
gisdb.PORT.lease_activedoco_join
So not sure if that is causing an issue for the MXD to reset back the SQL connection are the ones that are lowercase? We have not had ran into this issue before.
That is interesting, I am not sure. I would definitely work with Technical Support on this. Ask for a specialist on the Geodata team.
Hello Alice,
Did you ever get an answer to your issue regarding a lost connection inside MXD? I have the exact same problem [Windows 10, ArcGIS 10.7, SQL Server].
Thanks!
-Marina
Hi Marina - I had to install the SQL Server 2017 native client again on some users computers to get it to work. Some computers had older SQL Server native clients and i believe that is what was messing with the connection file. Once it was all cleaned up with a new 2017 native client it started behaving again
Thank you, Alice! I installed SQL Client 2017 on my computer and the connections inside the MXD's started to be saved like they should. This fix also worked for other users here.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.