Registering a SQL Server database with the server
As a server administrator, you have the option to register your data folders, databases, and geodatabases with ArcGIS Server. Data registration gives the server a list of locations that the server administrator has verified that the GIS server can access. Data registration also helps the GIS server understand how to adjust data paths when publishing across machines.
The following sections describe how to prepare your ArcGIS client to connect to a SQL Server database (whether the database contains a geodatabase or not), and register the database with ArcGIS Server.
Installing the SQL Server Native Client
The SQL Server Native Client software must be installed on all ArcGIS client machines that will connect directly to the database.
On 64-bit operating systems, run the 64-bit SQL Server Native Client installation; it installs both the 32- and 64-bit clients, allowing you to connect from both the 32-bit ArcGIS for Desktop and the 64-bit ArcGIS Server applications. If you have ArcGIS for Desktop installed on a 32-bit operating system, run the 32-bit SQL Server Native Client installation.
If your ArcGIS client is installed on the same machine as SQL Server, you do not need to install the SQL Server Native Client because the files that are needed to connect are installed with the database management system.
See Setting up a connection to SQL Server for more information.
Granting 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:
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 | The user or ArcGIS account must have at least SELECT privileges on the datasets to be published. See Granting and revoking privileges on datasets for instructions on granting privileges. |
INSERT, UPDATE, and/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. See Granting and revoking privileges on datasets for instructions on granting privileges. |
If you will be registering the geodatabase as a managed database, 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 User privileges for geodatabases in SQL Server for more information.
Connecting to SQL Server
To register a database with the server, you must provide connection information. There are two ways you can do this:
- Import an existing .sde file that contains the connection information.
You can create a Database Connection (.sde) file from the Catalog tree in ArcGIS for Desktop, using the Create Database Connection geoprocessing tool or a Python script.
- Provide your connection information at the time of registration.
No matter which way you choose, you must provide the following information to connect directly to a SQL Server database:
- The type of DBMS 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. You must 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
If you want to connect to an enterprise geodatabase in SQL Server using an ArcSDE service, you must create a .sde file using the Create ArcSDE Connection File geoprocessing tool or a Python script. Then you must import the connection when you register the geodatabase with ArcGIS Server.
Registering the database with ArcGIS Server
You can register the database from Server Manager or the Catalog tree in ArcGIS for Desktop. See the following topics for an explanation of registration options and how to register the database: