To publish ArcGIS Server web services that access the data in your Microsoft SQL Server database (whether or not the database contains a geodatabase), your ArcGIS Server site must connect to the database. To configure that connection, you need to do the following:
- Install SQL Server client software on the ArcGIS Server machines and the ArcGIS Desktop client machines.
- Grant privileges on the data to be published.
- Connect to the database.
- Register the connection file with your ArcGIS Server site.
Install the SQL Server client
Install SQL Server odbc client software on all ArcGIS client machines that will connect to a SQL Server database. You can obtain the SQL Server client installation from Microsoft.
If you do not have privileges to install software on the machines where ArcGIS clients are running, you'll need to have your IT department install the SQL Server odbc client for you.
If your ArcGIS client is installed on a machine with a 64-bit operating system, run the 64-bit SQL Server client installation; it installs both the 32- and 64-bit clients, allowing you to connect from both the 32-bit ArcMap and 64-bit ArcGIS Server and ArcGIS Pro software. If you have ArcMap installed on a 32-bit operating system, run the 32-bit SQL Server client installation.
If your ArcGIS client is installed on the same machine as SQL Server, you do not need to install the SQL Server client because the files that are needed to connect are installed with the database management system.
See Connect to SQL Server from ArcGIS for more information.
Grant privileges
The user with which you connect to the database must be granted privileges to access the data to be published. The privileges and the circumstances under which you need to grant them are as follows:
Privilege | Description |
---|---|
CONNECT | By default, the ability to connect to the database is granted to the public database role. If CONNECT has been revoked from the public role, you must grant it to individual database users or roles. |
SELECT privileges on the datasets to be published | You must grant the database user (if using database authentication) or ArcGIS Server account (if using operating system authentication) at least SELECT privileges on the datasets to be published. |
INSERT, UPDATE, or DELETE privileges on the datasets to be published | To edit data through a feature service, privileges sufficient to edit must be granted on the datasets in the database. |
If you will be registering the geodatabase as a managed database for a stand-alone or federated ArcGIS Server site, the user with which you connect must have privileges sufficient to create data in the geodatabase and must have a default schema that matches the database user name. See Privileges for geodatabases in SQL Server or Privileges for using ArcGIS with a SQL Server database for more information.
The database administrator must grant the first privilege. If the data is in a geodatabase, the data owner must grant the required privileges on the datasets. If the data is in a database, the data owner can grant privileges from ArcGIS, or the database administrator can use database tools to grant the required privileges.
Connect to SQL Server
You'll need the following information to register a SQL Server database with an ArcGIS Server site:
- The type of database management system to which you are connecting (in this case, SQL Server).
- The name of the SQL Server instance.
- The type of authentication to be used: database or operating system.
If database authentication is used, you must provide a valid database user name and password and save this information with the connection file.
If operating system authentication is used, use a domain account for the ArcGIS Server account, add it as a login to the SQL Server instance, and map it to a user you create in the database. ArcGIS Server will use this account to connect to the database.
- The name of the database to which you want to connect.
Register with ArcGIS Server
You can register the database from ArcGIS Server Manager, the Manage registered data stores pane in ArcGIS Pro, or the Catalog tree in ArcMap. If the ArcGIS Server site is federated an ArcGIS Enterprise portal, you can register the database by adding a user-managed data store item in the portal.
See the following for an explanation of registration options and how to register the database: