Connect to Microsoft SQL Server from ArcGIS
The following list summarizes the steps required to connect from ArcGIS to a Microsoft SQL Server database, including a database that contains a geodatabase:
Configure the SQL Server instance to allow connections from remote machines.
Install a Microsoft ODBC driver on the ArcGIS client machines.
Create a database connection.
To publish ArcGIS Server web services that reference the data in the SQL Server database, register the database connection file with your ArcGIS Server sites.
Configure the instance to allow connections
By default, SQL Server instances are not configured to allow connections from other computers. If you have a new installation of SQL Server, ensure the SQL Server service is running and listening on the correct ports. See the Microsoft SQL Server documentation for more information.
If you are not the database administrator, contact the database administrator if you receive errors when connecting that indicate the instance is not accepting connections.
Additional configuration is required on the SQL Server and client machine to use encrypted connections.
Install the ODBC driver for SQL Server
Obtain the 64-bit Microsoft ODBC driver for SQL Server from the Microsoft Download Center or from My Esri. Always use the Microsoft ODBC driver that is supported for the version of SQL Server to which you want to connect. Install the driver on all computers where ArcGIS Pro and ArcGIS Server are installed.
If you do not have the privileges to install software on the machines where ArcGIS clients are running, you'll need to have your IT department install and configure the Microsoft ODBC driver for you.
Note:
If ArcGIS Server and SQL Server are installed on the same server, a separate ODBC driver is not required on that machine.
When connecting from ArcGIS Server on Ubuntu to a supported version of SQL Server, you must install the Microsoft unixodbc-dev package on all ArcGIS Server machines in addition to the ODBC driver.
Create a database connection
You must have a database connection (.sde file) that authenticates the connection to the database. To use the database connection file with ArcGIS Server, you must save user information with the connection file.
You can call the ArcPy CreateDatabaseConnection function from one of the machines in the ArcGIS Server site that needs to connect to the database. See Create Database Connection in the ArcGIS Pro help for information about running this function.
Using the database connection file with ArcGIS Server requires the following:
You must save database-authenticated, password-based Entra ID user information with the connection file.
Note:
You cannot register a database connection that uses Microsoft Entra multifactor authentication (MFA) with an ArcGIS Server site.
If you use operating system authentication or Entra Integrated authentication to connect, ensure that SQL Server or Azure SQL Database can authenticate the ArcGIS Server account.
Tip:
Ensure the account used for the connection has the appropriate privileges on the data that the account needs to access. If the connection uses operating system authentication and you will publish web services using this connection, ensure that the ArcGIS Server account has the appropriate privileges on the data included in the web service. See Privileges for geodatabases in SQL Server and Privileges for using ArcGIS with a SQL Server database for more information.
Register the connection file
To allow ArcGIS Server sites to access the data, use the database connection file you created to add a registered data store in ArcGIS Pro or add a data store item in the portal.