@[Toc]


I have never contacted ArcGIS before, and I am also unfamiliar with Oracle and postGre SQL. This paper introduces the complete process of starting from scratch, setting up the environment, and releasing the first ArcGIS map service.


I. Software environment construction


Because we need to read the geographic data in the database in arcMap when making the map, and release the map service. ArcGIS Server also needs to read data from the database and publish it. Therefore, we need to establish a connection between arcMap—-> database and arcGIS Server—–> database. In addition, since we can manage arcGIS Server in arcMap, we also need to establish a connection between the two. The relationship is as follows (postgreSQL is used as an example 🙂


In this paper, ArcGis software version is 10.2, Oracle version is 11G, and PostgreSQL version is 9.1.

Download the software used in this article:

Dial: pan.baidu.com/s/1fdAiJW1Y… Extraction code: A41c

During the software installation, you are advised to use a notepad to record some account and password configurations.


1. Database installation

ArcGIS supports several databases. Here we use two, Oracle and open source postGre SQL. Just choose one of them. In comparison, it is easier to build a geographic database using Oracle. If conditions permit, Oracle database is recommended.

1.1 Oracle (Optional)

1.1.1. Install the Oracle server

Oracle11g 64-bit is selected here.

  • Run the setup


  • The following warning appears, do not ignore


  • Email can be left blank


  • Installation options select create and configure the database


  • Select the desktop class based on the configuration of the machine


  • You can customize the Oracle base directory and set the management password


  • complete


  • It will take a long time to install the product, so have a cup of tea and wait


  • Remember to do password management after product installation


  • The sys account is equivalent to the root account of MySQL. System account, common administrator, used for client configuration; Scott account, regular account.


  • To test whether the Oracle server is installed successfully, run the sqlplus command in the Dos window, and enter the user name and password of the system account. The Oracle server is installed successfully.


  • Oracle configuration. Since Oracle and Arcgis are installed on the same machine, there is basically no need to change the configuration


  • View the Oracle configuration: service name, network address.


  • To configure non-local access to Oracle, see reference [1].


1.1.2. Install the Oracle client

Oracle client requires a 32-bit client because ArcGIS DeskTop is 32-bit.

  • Start the installation


  • Warning no matter


  • Select An Administrator


  • Choose Simplified Chinese


  • You can customize the installation path


  • complete


  • Installation takes a long time


  • The client installation is complete


After the client is installed, configure it

  • Enter the Configuration page.


  • Select the local network service name configuration


  • Select add


  • Fill in the service name


  • Select the TCP


  • Fill in the host name and select the port number


  • choose


  • Failed test, select Change login


  • Enter the user name and password of the system


  • Connection test successful

Then select Next until the end. The Oracle client installation and configuration is complete.

1.2 PostgreSQL (Optional)

Note that PostgreSQL as a geographic database requires the installation of its extension postGIS.

1.2.1 install PostgreSQL

  • Click install package


  • Select the installation path and data storage path


  • Example Set the password of superuser postgres


  • Choose a port


  • Postgresql Locale (default)


  • Deselect use Stack Builder


  • After the installation is complete, the Window menu will have pgAdmin ⅲ database management program, open it, use the previous password to successfully connect to the database


1.2.2 PostGIS installation

After PostgreSQL is installed, install PostGIS.

  • Run installable files


  • Select Create Spatial Database (automatically Create spatial database after installation)


  • You need to select the postgresQL installation directory


  • Enter the password you just set


  • Set the name of the spatial database template (default)


  • Three confirmation boxes are displayed when the installation is about to complete: Select Yes for all


  • When you open pgAdmin, an extra template is found


2. ArcGIS related software installation

ArcGIS software is installed in the following sequence.


2.1 Installation of ArcGIS Server

  • Click on the


  • The next step…


  • Selecting an Installation Path


  • Select the Python27 installation path


  • Configure the Account and password of the ArcGis Server Account


  • The configuration file is not exported


  • The installation


  • Installation is in progress. It will take a while. Have another cup of tea


  • The installation is complete


  • Select license file


  • After configuring the license, the ArcGis management page will be opened and select create a new site


  • Enter the user name and password


  • Select the root service directory


  • Log in to the ArcgisServer site


  • There is already a world map service on the site


  • The service site can also be accessed using the IP of the current machine


2.2 ArcGIS License Manager Installation

License manager.

  • Click on the


  • The next step…


  • You can customize the installation path


  • Installation. It’ll take a while


In order to crack ArcGis Desktop behind:

  • The License service management page is displayed


  • stop


  • Open the crack tool folder and click on The Registry


  • Manually enter Version and click All


  • All generated text is copied


  • Create a new text, call it service.txt, and paste the text you copied above into it


  • Copy the cracked files arcgis. exe and service. TXT to the License Manager installation path bin directory and replace the existing files.


  • Start and re-read the license


2.3 ArcGIS Desktop installation

  • Click on the executable


  • The next step…


  • Choose to Complete


  • Selecting an Installation Path


  • Select the Python27 path


  • Don’t choose


  • Installation. Have another cup of tea


  • After the installation is complete, the following page is displayed


  • The following information is displayed in License Manager


  • Click the icon shown below to launch ArcMap


Release map service

1. Create a blank map

  • After opening ArcMap, create a blank map.


  • Save the map

You can just pull in the SHP file and create a new layer.


  • At this point, you’re ready to launch a map service.

    Of course, in order to manage the data, you still need to do the following operations.

2. Create folder connections

  • Select folder connections in CateLog


  • Create a connection to our test data folder


3. Create a connection with ArcGIS Server

In order to publish the map service, you need to create a connection to Arcgis Server

  • Add the ArcGIS Server connection


  • Select Manage ArcGIS Server


  • Fill in the relevant information of ArcGis Server site


  • Connect Arcgis Server, you can directly drag the map of Arcgis Server into it


3. Create enterprise-level geographic databases

You can run enterprise-class geographic database tools from ArcGIS Desktop (Desktop Standard or Desktop Advanced), Or run Python scripts from ArcGIS Desktop, ArcGIS Server, or ArcGIS Engine clients to create SDE user, schema, table space, and geographic databases.

Create an enterprise-level spatial database by creating an enterprise-level geographic database tool in the Geographic Database Management tool set of the Data Management toolbox:


3.1, Oracle,

  • Open the Create enterprise geographic database tool and select Oracle from the database platform drop-down list. The following information is required for connecting to the Oracle instance: ♦ If you have configured the Oracle client to use the TNS network alias, enter the Net service alias in the instance text box. ♦ If the Oracle client network alias has not been configured and both Oracle database and client are configured to use the Easy Connect string, provide the Oracle Easy Connect string in the instance text box. ♦ You must connect to the database as database administrator to create geographic database administrators and table Spaces. Therefore, enter the sys user name in the database administrator text box. ♦ Enter the password of the sys user in the database Administrator password text box. ♦ Enter SDE in the Geographic Database Administrator text box — If an SDE user does not exist in the database, the tool creates the user and grants the required permissions to create the geographic database. If the user already exists, it is granted the required permissions. ♦ Enter the sDE user password in the Geographic Database Administrator password text box – If the SDE user already exists in the database, ensure that you enter the correct password for the existing user. This tool does not change passwords. If an SDE user is created, the entered password will be used when the SDE user is created. ♦ Specify table Spaces for SDE users (optional) — If you have a pre-configured table space that can be used for a geographic database profile, you can enter its name in the table space name text box. ♦ If you want the tool to create a tablespace, enter a valid name in the tablespace name text box. The tool will create a 400 MB tablespace in the Oracle default location. If you do not enter a tablespace name, the SDE_TBS tablespace is created and set as the default tablespace for sDE users. ♦ To specify an authorization file, use the authorization file that authorized ArcGIS Server Enterprise.


  • Building. It’ll take a while


  • Has been created


3.2, PostgreSQL

3.2.1, ST_geometry. DLL Replication

  • Locate the st_geometry. DLL file in the Desktop installation directory > DatabaseSupport folder > postgreSQL folder > 9.2 folder > Window64 folder.
  • Copy the st_geometry. DLL file to the PostgresQL installation directory –> lib folder.


3.2.2 5 DLL files for connection copy

Since desktop is 32-bit and PostgresQL is 64-bit, we need to add:

  • libeay32.dll

  • libiconv-2.dll

  • libintl.dll

  • ibpd.dll

  • ssleay.dll

    Copy the five files to the Desktop installation directory -> bin folder and replace them all.


3.2.3 Creating a PostgresQL database

  • Create a new database in pgAdmin with the name sample, owner postgres, and template postgis_20

  • Create a schema (When importing data from the ArcGIS Catalog connected to the PostgresQL database, the Postgres schema must be in the database). Execute the following statement and the command output is successful:

create schema postgres;

Copy the code


OK, PostgreSQL is configured to create an enterprise geographic database.

3.2.4 Creating an enterprise-level Geographic Database (PostgresQL)

  • Select PostgreSQL as the database platform.

  • Example fill in localhost(local).

  • Database Select the SAMPLE database that you just created.

  • The database administrator is superuser Postgres.

  • Database administrator password Password set by the database administrator

  • Geographic database administrator password set by yourself

  • Authorization file Select the authorization file of arcGIS Server.

  • Successful creation:


4. Create a database connection

Once the enterprise geographic database has been created, it is ready to connect.

4.1, Oracle,

  • Create a connection in a database connection


  • Enter the database-related configuration from the previous step


  • After the connection is successful, you can see the database connection


4.2, PostgreSQL

The database platform selects the PostgreSQL instance as localhost database authentication: the user name is superuser. Password Password set by yourself Database Select the SAMPLE database created earlier


6. Geographic database import data

Once the geographic database is connected, you are ready to import data for the geographic database. There are two ways to import.

6.1. Direct import

  • Database connection, right-click, import, you can choose to import a single or multiple


  • Import a single


  • The data was successfully imported into the geographic database and can be dragged directly out


6.2 Import through the file space database

The preceding method is relatively quick, but the import failure probability is relatively high. Therefore, the following method is recommended.


  • In the folder connection, right-click to create the file space database


  • The newly created file space database imports data


  • Import success


  • You can just drag and drop into the geospatial database


  • Direct drag-in may fail due to spatial coordinate inconsistencies, or you can import directly from a spatial database


7. Launch maps

The data has been successfully imported into the enterprise geographic database and the map service is now ready to be published.

  • Drag the data in


  • You can edit and categorize layers


  • Publish map service


  • Select the previously created connection to Arcgis Server


  • Select the service directory, where a new directory is created


  • Analyze it before you release it


  • release


8. Check out published map services

The successfully released services can be previewed in Arc Map, viewed here from the Arcgis Server site

  • Log in to the site to find our published map service


  • You can see the interface the map service provides for third party calls in the functionality


  • Click to enter, here you can choose to preview through ArcGis JavaScript


3. Problems encountered


1. ArcGIS fails to connect directly to Oracle

Executing: CreateEnterpriseGeodatabase Oracle localhost/orcl # DATABASE_AUTH sys ***** SDE_SCHEMA sde ***** # D: SoftwareFile\ arcGisServer10.2. ecp Start Time: Thu Apr 02 18:07:32 2020 Cannot connect to database because the database client software failed to load. Be sure the database client software is installed and configured correctly. Failed to execute (CreateEnterpriseGeodatabase). Failed At Thu Apr 02 18:07:32 2020 (Elapsed Time: 0.01 seconds)Copy the code


The problem is usually caused by:

  • The Oracle client is not installed on the ArcGIS for Desktop
  • When you try to connect to Oracle from ArcMap or ArcCatalog (which is a 32-bit application), only the 64-bit client is installed
  • Install only 32-bit clients when trying to connect to Oracle from ArcGIS for Server or ArcGIS Pro (64-bit application).

Solutions:

  • To resolve this issue, ensure that the Oracle client is installed and that the bit level of the client matches the bit level of the connected application.
  • If both 32-bit and 64-bit clients are installed on the same machine, the 64-bit clients must be listed first in the PATH environment variable for the Windows operating system.

The reason for my error is that I only installed a 64-bit client, then installed a 32-bit client, and listed the 64-bit variables in Path first.


Then, restart the computer and the problem is solved.


PostgreSQL does not have tables as a database

PostgreSQL is an enterprise-level geographic database that has no data when it first connects

In addition, PostgreSQL occasionally fails to import data, for reasons that have not yet been identified.


End!

Ps: I am a Gis pure white, there are mistakes in the article, welcome to point out. Hope to learn from each other and make progress together!






Reference:

[1] : Oracle 11G server, client installation and configuration [2] : ArcGIS link Oracle release map service [3] : Oracle tutorial [4] : create geographic database in Oracle [5] : ArcSDE direct connection summary [6] : Error: Client software failed to load. Be sure the database Client software is installed and configured correctly [7] : ArcGIS server 10.2 installation tutorial 【8】 : ArcGIS License installation and decryption 【9】 : ArcGIS Desktop 10.2 installation and decryption 图文 【10】 : Connect arcMap, arcGIS Server and postgreSQL [11] : ArcGIS10.2 and PostgresQL9.2.2 from installation to release service tutorial