English

How To: Create an SDE schema geodatabase using the Enable Enterprise Geodatabase geoprocessing tool in SQL Server

Summary

The Enable Enterprise Geodatabase tool from ArcToolbox can take an existing database and create the geodatabase system tables, stored procedures, functions, and types within. This process allows the conversion of an enterprise database created in Microsoft SQL Server to an enterprise geodatabase for use with ArcGIS.

If there is a need to have the schema owned by the SDE user, the instructions provided describe the steps to set this up by setting up the SDE login/user within the database with proper permissions, and then making a connection to the database as the specific SDE user to implement the Enable Enterprise Geodatabase tool.

Note:
The SQL Server DBMS client for the ArcGIS client must be installed to perform this process. The SQL Server DBMS client can be downloaded from My Esri.

Procedure

Use an existing database or create a new database in SQL Server Management Studio.

  1. Right-click Databases, and click New Database.
  1. In the New Database dialog, select General.
  1. Under Select a page, click Options, and in the details pane, under Miscellaneous, make sure to set:
    • Allow Snapshot Isolation to True
    • Is Read Committed Snapshot On to True.
 
  1. Create an SDE login (if not already in the instance) and map it to the database created in Step 1 to create the SDE user within the database.
Note:
When adding/mapping the login to the database for the user, ensure that the username and default schema match.
[O-Image]
Note:
If the SDE login is not already created in the instance, be sure to add the Server Role of processadmin to the SDE login.
  1. Open the properties for the database and explore the permissions page to grant the proper permissions for the SDE user:
    1. Create Function
    2. Create Procedure
    3. Create Table
    4. Create View
    5. View Database State
    6. View Definition
[O-Image]
Note:
Use the script below to grant permissions to the SDE user for this newly-created database in SQL Server Management Studio:
use [SQL Server Database Name]
GO
GRANT CREATE FUNCTION TO [sde]
GO
use [SQL Server Database Name]
GO
GRANT CREATE PROCEDURE TO [sde]
GO
use [SQL Server Database Name]
GO
GRANT CREATE TABLE TO [sde]
GO
use [SQL Server Database Name]
GO
GRANT CREATE VIEW TO [sde]
GO
use [SQL Server Database Name]
GO
GRANT VIEW DATABASE STATE TO [sde]
GO
use [SQL Server Database Name]
GO
GRANT VIEW DEFINITION TO [sde]
GO
  1. Make a connection in ArcCatalog to the newly created SQL Server database as the SDE user.
    [O-Image]
  2. Navigate to the Enable Enterprise Geodatabase geoprocessing tool and use the SDE connection and the proper authorization file.
    • When using the wizard to authorize ArcGIS for Server, a keycodes file is written to the server where the software is installed.
    • If ArcGIS for Server was authorized on a Linux box, the keycodes file was created in: 
/arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release>/sysgen
  • If authorized on a Windows server, the file was created in:
..\Program Files\ESRI\License<release>\sysgen
  • If not already done, authorize ArcGIS for Server to create this file.
[O-Image]
Note:
When connecting to a non-geodatabase, this tool can be accessed by right-clicking the database connection, and clicking Enable Geodatabase.
[O-Image]

All related the system tables, stored procedures, functions, and types are now owned by the SDE schema.
[O-Image]
[O-Image]
 

Related Information

Last Published: 5/7/2020

Article ID: 000011998

Software: Legacy Products ArcMap 10.8, 10.7.1, 10.7, 10.6.1, 10.6, 10.5.1, 10.5, 10.4.1, 10.4, 10.3.1, 10.3, 10.2.2, 10.2.1, 10.2, 10.1, 10