Database connections in ArcGIS Pro

You can connect to databases from ArcGIS to view, query, and analyze the data they contain. Some of the databases you access can contain geodatabase tables, functions, and procedures, but they don't have to; you can connect to any supported database and view the data from ArcGIS Pro.

Most types of databases require that you install and configure a database client on the machine that will connect to the database.

Database connections

When you connect to a database in ArcGIS Pro, you must provide connection properties. These properties help ArcGIS Pro locate the database and provide authentication information to allow you to access the database contents.

Note:

Authentication type

For most supported databases and database service offerings, there are two login options for creating a connection to a database or enterprise geodatabase: database authentication and operating system authentication.

For Microsoft Azure SQL Managed Instance and Microsoft Azure SQL Database instances that are configured to use Microsoft Azure Active Directory, you have additional Azure Active Directory authentication options.

Database authentication

If you choose Database authentication, you must provide a valid database username and password in the User name and Password text boxes, respectively. Usernames can be a maximum of 30 characters.

Note:

Outside of ArcGIS, you can create usernames in Microsoft SQL Server that contain special characters. These usernames must be delimited whenever they are used. ArcGIS adds the delimiter automatically when it is passed to SQL Server; you do not need to include delimiters with the username. For example, if your username is map.user, type map.user, not "map.user", in the User name text box. For more information on regular and delimited identifiers, see your SQL Server documentation.

Uncheck Save user name and password if you prefer not to save your login information as part of the connection; doing this can help maintain the security of the database. However, if you do this, you'll be prompted to provide a username and password every time you connect. Also note that you must check Save user name and password if you use the connection file to provide ArcGIS services with access to the database or geodatabase, or if you want to use the Catalog pane search to locate data accessed through this connection file.

Operating system authentication

If you choose Operating system authentication, you do not need to type a username and password—the connection is made using the login name and password used to sign in to the operating system. If the login used for the operating system is not a valid database login, the connection fails. At present, ArcGIS supports operating system authentication when connecting to Microsoft SQL Server, Oracle, IBM Db2, and PostgreSQL.

Note:

  • Security Support Provider Interface (SSPI) and Lightweight Directory Access Protocol (LDAP) are supported for operating system authentication with PostgreSQL.
  • When you use operating system authentication in Oracle, the operating system login is prefixed with an os_authent_prefix string (by default, OPS$) and stored in the USERNAME table in the database. The maximum number of characters allowed for the username when connecting to the geodatabase is 30. In these specific cases, ArcGIS places quotation marks around your username to pass it to the database. Those quotation marks count toward the 30-character total.

Azure Active Directory options

When you connect to Azure SQL Database or SQL Managed Instance, you can use one of the following Azure Active Directory authentication options:

  • Azure Active Directory - Universal with multi-factor authentication (MFA)—When you connect using the Azure Active Directory - Universal with MFA option on the database connection dialog box, you must provide the Azure Active Directory username, and a code is sent to you in a text message, email, or MFA device to complete the authentication process. No password is required on the database connection dialog box. Depending on how your network and authentication protocols are configured, you may also be able to use a fingerprint scan for authentication.

    Note:

    Even though you choose the option to save the username, if you share the database connection file (.sde) with other users, the connection will be made using that user's login account, not the login account that you saved in the connection file.

    You cannot register this database connection with an ArcGIS Server site.

  • Azure Active Directory - Password—When you connect using the Azure Active Directory - Password option on the database connection dialog box, you must provide a valid Azure Active Directory username and password in the User name and Password text boxes, respectively. Usernames can be a maximum of 30 characters.

    If you will register this database connection with an ArcGIS Server site, you must save the username and password with the database connection.

Database platform and properties

The value you choose from the Database Platform drop-down list indicates the type of database to which you'll connect. The items available on the dialog box and the information that you need to provide to make the connection depend on the database platform type you choose.

The following sections explain when to choose each database platform and what additional information is needed to connect.

Dameng

Example connection to Dameng

  • Database Platform

    Choose Dameng from the Database Platform drop-down list to connect to a Dameng database.

  • Data source

    When you connect to Dameng, provide the name of the server where Dameng is installed in the Data source text box.

  • Authentication Type

    Choose Database authentication, and provide a valid username and password to connect. Operating system authentication is not supported.

Db2

Example Db2 connection using a cataloged database

  • Database Platform

    Choose DB2 from the Database Platform drop-down list to connect to an IBM Db2 database or a geodatabase in a Db2 database on a Linux, UNIX, or Windows server.

  • Data source

    When you connect to Db2, you must provide the name of the cataloged Db2 database in the Data source text box. Or, if the database is not cataloged, you can use the following syntax to connect instead:

    HostName=<host>;Port=<port number>;Database=<database name>;

    Specify the information appropriate for your site. For example, if your Db2 database is on server cube, communicating through DBMS port 50000, and the database name is spdata, the connection string would be as follows:

    HostName=cube;Port=50000;Database=spdata;

    This type of connection string is known as a DSNless connection.

  • Authentication Type

    Choose Database authentication, and provide a valid username and password, or choose to connect using Operating system authentication.

Oracle

Example Oracle connection using an Oracle Easy Connect string

  • Database Platform

    Choose Oracle from the Database Platform drop-down list to connect to an Oracle database, or connect directly to a geodatabase in an Oracle database.

  • Instance

    When connecting to an Oracle database, either type the Oracle TNS name in the Instance text box, or provide one of the following Oracle Easy Connect strings:

    • The name of the Oracle server/Oracle service name or ID

      For example, if Oracle is installed on myserver and myosvc is the Oracle service name, type the following:

      myserver/myosvc

    • The name of the Oracle server:Oracle port number/Oracle service name or ID

      In this example, Oracle is installed on myserver, is listening on port 60000, and myoservice is the Oracle service name:

      myserver:60000/myoservice
    • The URL of the Oracle server

      The URL for the same instance shown in the last example would be as follows:

      //myserver:60000/myoservice
    • The name of the Oracle server (You can use this if the Oracle listener on the server is configured to point to a default instance.)
    • The IP address of the Oracle server/Oracle service name or ID

      For example, if the address of the server is 10:10:10:10, and the Oracle service name is orasvc, type 10:10:10:10/orasvc.

      For IPV6 addresses, place brackets around the address, for example: [4000:vu5:0:0:f666:h191:77f5:i2rs]/orasvc.

    • The IP address of the Oracle server:Oracle port number/Oracle service name or ID

      In this example, the IP address is 10:20:30:40, port is 59999, and Oracle service is myomy1: 10:20:30:40:59999/myomy1.

      An IPV6 address for the same port and service would look like the following: [6543:eo4:0:1:f587:l249:12f9:w3ud]:59999/myomy110:20:30:40:59999/myomy1.

    Be sure your Oracle instance is configured to allow Easy Connect. If you have the full Oracle client installed but want to use Easy Connect syntax to connect, be sure the sqlnet.ora file on the client is configured to allow the use of Easy Connect and the Oracle server is configured to allow Easy Connect syntax. Also note that if your Oracle instance is not listening on the default Oracle port number, you must use connection syntax that includes the port number.

    To connect to an Amazon Relational Database Service (RDS) for Oracle instance, provide the instance name in the format <database_instance_identifier>.<region_id>.rds.amazonaws.com. For example, if created the instance with the identifier ords.id123 in us-west-2 Amazon Web Services region, type ords.id123.us-west-2.rds.amazonaws.com in the Instance text box.

    To connect to Oracle Autonomous Database, provide the net service name. For example, to connect using the net service name myoatp_medium, type myoatp_medium in the Instance text box.

  • Authentication Type

    Choose Database authentication, and provide a valid username and password, or choose to connect using Operating system authentication.

PostgreSQL

Example of a connection to PostgreSQL

When you connect to PostgreSQL, you must specify an instance and a database.

  • Database Platform

    Choose PostgreSQL from the Database Platform drop-down list to connect to a PostgreSQL database, a supported PostgreSQL database service instance, or a geodatabase in either one.

  • Instance

    The instance is the name or IP address of the server where PostgreSQL is installed or the URL of the PostgreSQL database-as-a-service instance.

    Examples include the following:

    • If the PostgreSQL database cluster is on a server named ficus, type ficus in the Instance text box.
    • If the PostgreSQL database cluster is listening on a port other than the default (5432), include the port number in the instance. For example, if PostgreSQL is installed on a server named mamabear and is listening on port 49200, type mamabear,49200 in the Instance text box.
    • To use an IPV6 address to access the server where PostgreSQL is installed, type the address in brackets. For example, if the IPV6 address of the server is 1111:aa1:0:1:f111:a222:33f3:b4bb, type [1111:aa1:0:1:f111:a222:33f3:b4bb] in the Instance text box.
    • For an Amazon Aurora (PostgreSQL-compatible edition) or Amazon RDS for PostgreSQL instance, provide the instance name in the format <database_instance_identifier>.<region_id>.rds.amazonaws.com. For example, if created the instance with the identifier mypgrdsdb in the us-east-1 Amazon Web Services region, type mypgrdsdb.us-east-1.rds.amazonaws.com in the Instance text box.
    • For a Google Cloud SQL for PostgreSQL instance, type the public IP address of the instance in the Instance text box.
    • For a Microsoft Azure Cosmos DB for PostgreSQL instance, the connection string is in the format c.<cluster_name>.postgres.database.azure.com. For example, you named the cluster allmydata when you created it, type c.allmydata.postgres.database.azure.com in the Instance text box.
    • For a Microsoft Azure Database for PostgreSQL instance, the instance name is in the format <server_name>.postgres.database.azure.com. For example, you named the server spatialdata when you created it, type spatialdata.postgres.database.azure.com in the Instance text box.
  • Authentication Type

    Choose Database authentication, and provide a valid username and password, or choose to connect using Operating system authentication.

  • Database

    The database is the name of the specific database on the PostgreSQL database cluster to which you want to connect. You can type the name of the database in the Database text box or choose it from the drop-down list. The database name is limited to 31 characters.

SAP HANA

Example connection to SAP HANA database

  • Database Platform

    Choose SAP HANA from the Database Platform drop-down list to connect to an SAP HANA database.

  • Data source

    For SAP HANA installed on a server, specify the ODBC data source name in the Data source text box.

    To connect to SAP HANA Cloud, provide the connection string and port number in the format <database_identifier>.hana.<region_id>.hanacloud.ondemand.com port <port number>. For example, if the database ID is 72294abc-0d16-41e5-fg77-h6088532i24j, the instance runs in region prod-us10, and communicates over port 443, type 72294abc-0d16-41e5-fg77-h6088532i24j.hana.prod-us10.hanacloud.ondemand.com port 443 in the Data source text box.

  • Authentication Type

    Choose Database authentication, and provide a valid username and password to connect. Operating system authentication is not supported.

SQL Server

Example connection to a database on a SQL Server named instance using database authentication

  • Database Platform

    Choose SQL Server from the Database Platform drop-down list to connect to a database in Microsoft SQL Server, a SQL Server database service instance, or a geodatabase in either of these.

  • Instance

    The instance is the name of the SQL Server or database service instance.

    Examples include the following:

    • For a SQL Server named instance of terra\gis, type terra\gis in the Instance text box.
    • If you use a default SQL Server instance, you can specify the instance name or the IP address of the server in the Instance text box. If specifying an IPV6 address, enclose the address in brackets. For example, if the IPV6 address of the server is 2000:ab1:0:2:f333:c432:55f6:d7zz, type [2000:ab1:0:2:f333:c432:55f6:d7zz] in the Instance text box.
    • If the SQL Server database is listening on a port other than the default (1433), include the port number in the instance. For example, if the SQL Server instance is named basset\spatial and is listening on port 61000, type basset\spatial,61000 in the Instance text box.
    • For an Amazon RDS for SQL Server instance, the instance will be in the format <database_instance_identifier>.<region_id>.rds.amazonaws.com.
    • For a Google Cloud SQL for SQL Server instance, type the public IP address of the instance in the Instance text box.
    • For a Microsoft Azure SQL Managed Instance or Microsoft Azure SQL Database instance, provide the server name in the Instance text box. For example, if the server name is cloudy4u.dbid123.database.windows.net, type cloudy4u.dbid123.database.windows.net in the Instance text box.

    If your SQL Server instance uses failover clusters, you can add conditions to the instance string to take advantage of the redundant instance.

    You can append additional conditions to the instance name to request encrypted connections to the SQL Server instance.

  • Authentication Type

    Choose the authentication type that is appropriate for the database to which you are connecting.

  • Database

    The database is the name of the specific database on the SQL Server instance to which you want to connect. You can type the name of the database in the Database text box or choose it from the drop-down list. When connecting to a database-as-a-service, you must type the name in the Database text box.

    The database name is optional when connecting to a SQL Server instance, but only if you want to connect to the database that has been assigned as your default database in the SQL Server instance. When connecting to a database-as-a-service, the database name is required.

Teradata Vantage

Example connection to Teradata using an ODBC data source name

  • Database Platform

    Choose Teradata from the Database Platform drop-down list to connect to a database in Teradata Vantage.

  • Data Source

    Provide the ODBC data source name in the Data Source text box.

    If you have not configured an ODBC data source name, you can provide the IP address of the Teradata server in the format dbcName=<IP address>. For example, if the server has an IPV4 address of 200.30.200.10, type dbcName=200.30.200.10. If the server has an IPV6 address, enclose the address in brackets. For example, for a server with an IPV6 address of 3020:12z3:y4xw:5099:0:v678:u111:ts22, type dbcName=[3020:12z3:y4xw:5099:0:v678:u111:ts22].

  • Authentication Type

    Choose Database authentication, and provide a valid username and password to connect. Operating system authentication is not supported.