To create a query layer on a spatial database, you must complete the following specific tasks to ensure the query layer works with ArcGIS:
- You must use a release of the database management system that is supported by the ArcGIS version you are using. Check the database system requirements on the ArcGIS Desktop website for information on database management system support.
- The query layer definition must include a unique, not-null column or combination of columns that can be used as the Object ID in the query layer. If the data you want to use does not have such a column or combination of columns, you must add one. See Choose a unique identifier field for more information.
- Depending on the type of database management system you are using, there is some configuration you must do in the database management system to use spatial types. This is described in the following sections.
- In most cases, you must install and configure database management system clients on each of the client computers from which you will create query layer connections. This is also described in the following sections. Since you must be an administrator on your computer to install software, contact your information systems department to set up your computer for query layer connections if your login is not a member of the Windows Administrator group on your computer.
Altibase
Use of Altibase HDB with ArcGIS is deprecated.
Dameng
Dameng includes its own spatial type, but you must initialize it to use it. See Initialize Dameng geometry for instructions.
Install the Dameng database client on all ArcGIS client machines to connect to a Dameng database. See Connect to Dameng from ArcGIS for more information.
IBM Db2
To use a query layer to display spatial data from a Db2 database, the computer from which you will connect to the database must have the IBM Data Server Runtime Client for Db2 installed on it. See Connect to Db2 from ArcGIS for more information.
For information on installing and configuring the IBM Data Server Runtime Client, see the IBM Db2 documentation.
IBM Informix
To use a query layer to display spatial data from an Informix database, the database must be registered with Informix Spatial DataBlade, and the computer from which you will connect to the database must have the Informix IConnect client installed and configured on it.
Informix Spatial DataBlade
The Informix database you want to use must be registered with Informix Spatial DataBlade before you can use the ST_Geometry spatial type. Contact your GIS administrator or database administrator if you are not sure if the database you connect to is enabled for ST_Geometry.
Informix IConnect
Install on your client computer the Informix IConnect application and configure the Setnet32 application. See Connect to Informix from ArcGIS for more information.
You can download the Informix client application from My Esri or obtain it from IBM. See the IBM Informix documentation for information on installing and configuring the Informix client.
IBM Netezza Data Warehouse Appliance
To use a query layer to display spatial data from a Netezza Data Warehouse Appliance, you must install the IBM Netezza Analytics software package.
To connect to a Netezza Data Warehouse Appliance, you must install and configure the Netezza ODBC driver on your ArcGIS client computer.
IBM Netezza Data Warehouse Appliance is deprecated at this release.
Spatial libraries
There are two spatial libraries you can use with Netezza: the legacy type (nzSpatial) and the Esri variant of the library (nzSpatial_Esri). These are installed with the IBM Netezza Analytics software package.
If you use the legacy type, ArcGIS requires that the spatial column be named shape. If the name of the column is not shape, create a view on the table and alias the spatial column name to shape.
The spatial type you use also affects how you configure the Netezza ODBC driver. See Connect to Netezza from ArcGIS for more information.
Microsoft Azure databases
Microsoft Azure databases are cloud-based database services that contain spatial types that you can use in your query layers. These are present automatically; you do not have to install them.
To use a query layer to display spatial data from an Microsoft Azure SQL Database or Azure SQL Database Managed Instance, install a supported Microsoft ODBC driver for SQL Server on the ArcGIS client machine. You do not need to install a PostgreSQL client when connecting to Microsoft Azure Database for PostgreSQL.
Microsoft SQL Server
Two spatial types are supported in SQL Server that you can use in your query layers: Geometry and Geography. These are present automatically in SQL Server databases; you do not have to install them.
To use a query layer to display spatial data from a SQL Server database, you must install a supported version of SQL Server client on your ArcGIS client computer. See Connect to Microsoft SQL Server from ArcGIS for more information.
See the Microsoft SQL Server documentation for installing the SQL Server client.
Oracle
To use a query layer to display spatial data from an Oracle database, a spatial type must be present in the database.
The computer from which you will connect to the database must have the Oracle client installed and configured on it. You can obtain the Oracle Instant, Runtime, or Administrator Client from Oracle. See the Oracle documentation set for information on installing and configuring these.
Spatial types in Oracle
Two spatial types are supported in Oracle that you can use in your query layers: ST_Geometry and SDO_Geometry.
The ST_Geometry spatial type is installed when you create an enterprise geodatabase in Oracle, or it can be installed in an Oracle database using the Create Spatial Type geoprocessing tool. You also need to configure the Oracle extproc to use ST_Geometry. Your GIS administrator or database administrator can tell you if your database has been configured to use this spatial type. For information on configuring the extrproc, see Configure the extproc to access ST_Geometry in Oracle and your Oracle documentation.
Oracle Locator objects, including the SDO_Geometry type, are present by default in Oracle databases. Therefore, you can access the SDO_Geometry type without additional installations, but to access all SDO_Geometry functions, you might need to install Oracle Spatial in the database.
PostgreSQL
To use a query layer to display spatial data from a PostgreSQL database, a spatial type must be present in the database.
Most ArcGIS clients include client files to connect to PostgreSQL; therefore, no DBMS client installation is required when connecting to a PostgreSQL database. The only exception to this is if you build custom applications using ArcGIS Engine. In that case, you need to download the PostgreSQL libpq files from My Esri and place them in the bin folder of the ArcGIS Engine client.
Three spatial types are supported in PostgreSQL that you can use in your query layers: ST_Geometry, PostGIS geometry, and PostGIS geography.
The ST_Geometry type is installed when you create an enterprise geodatabase in PostgreSQL, or it can be installed in a PostgreSQL database using the Create Spatial Type geoprocessing tool.
To use the PostGIS geometry or geography type, the database administrator must install PostGIS on the PostgreSQL database cluster. Once installed, the database administrator can use the PostGIS template database to create a database containing the PostGIS types, or configure an existing database to use the PostGIS types.
Contact your GIS administrator or database administrator to determine whether your database has been configured to use any of these spatial types.
SAP HANA
Spatial data is stored in the SAP HANA ST_Geometry type, which is included in the default SAP HANA installation.
To use ArcGIS with SAP HANA, install and configure the SAP HANA ODBC driver on the ArcGIS client machines. See Connect to SAP HANA from ArcGIS for more information.
Teradata Data Warehouse Appliance
ArcGIS requires that the spatial column in a Teradata feature class be named shape. If the name of the column is not shape, create a view on the table and alias the spatial column name to shape.
To use a query layer to display spatial data from a Teradata database, the computer from which you will connect to the database must have the Teradata files installed (in a specific order) and configured. See Connect to Teradata from ArcGIS and the documentation provided by Teradata for information on installing and configuring these files