I got a ready-made map document (*.mxd) from somewhere else and it worked fine and well on the server, but when I opened it with arcMap on my own machine, it was blank and nothing.

If you look at the layers directory on the left, there is a pink exclamation mark on the icon. When you wake up, there should be no data source.

How to add data source to map? The summary is as follows:

1. Add “database connection” to arcCatalog

My example here is on another platform, where ORcl22 is the name of tnsName;

ORCL22 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.22)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
Copy the code

Sde is a tablespace; The database version is oracle10g. 192.168.0.22/ ORCL is also acceptable.

The problem is, I have Oracle 12C 64-bit server edition installed on my machine; And my arcgis is 32-bit (?) It can only use 32-bit Oracle clients, otherwise it will fail to load the client software.

Note the following about the installation and setup of the 32-bit Oracle client: 1) After the client is installed, set its path in path. For example, if it is installed in c:\ ORACLE_client_32, path += C :\ ORACLE_client_32;

2) Set the default tnsnames.ora file. Why? Because I already have an Oracle server version installed and now I have a client, how can I find the “ORcl22” I have specified by reading tnsnames.ora? So you should specify the default. The method is also set in a Windows environment variable, for example:

TNS_ADMIN= c:\oracle_client_32
Copy the code

3) Restart arcCatalog

That sounds easy, but in fact I went to a lot of trouble. At the beginning, everything was set up, and then a different client was fine. Who would have thought there were good and bad clients.

During that time I asked another colleague, who had a similar experience, and he said his solution was to reinstall ArcGIS! Because arcGIS was installed in the default C :\ Programes Files (x86)\ when it was installed for the first time, maybe ArcGIS could not recognize this path, so it could not connect to the database. Besides, there was no exception. At that time I heard immediately laugh or cry. Fortunately, it turned out not to be so.

2. Right-click the layer with the wrong data source (there is a pink exclamation mark in front of the icon) on the map document, select “Source” and find the source in arccatalog. Remember to double click to open the source and see the corresponding table.

Finally, I saw a map with pictures and text on my ArcMap, just like many GIS colleagues in our company.

This is my first small step in GIS development.