The sdeservice command

The sdeservice administration utility manages the ArcSDE services and registry entries on Windows platforms. Creating a service adds Windows registry entries.

Use the modify option to modify existing registry entries such as SDEHOME or SDE_DBA_PASSWORD. Use the register option to register new entries not provided by default, such as ADMIN_DATABASE. The unregister option removes the entry from the server registry.

The delete operation deletes the ArcSDE service and all related registry entries.

Usage syntax

The ArcSDE administration command line tools use UNIX-style command syntax and notation according to the following conventions:

sdeservice -o create -p <ArcSDE_admin_password> [-n] [-H <sde_directory>]
[-i <service>] [-u <service_user>] [-P <service_user_password>] [-s <data_source>]

[-i <service>] [-N]

sdeservice -o list [-i <service>]

sdeservice -o modify -r <registry_keyword> -p <ArcSDE_admin_password> -v <new_value> [-i <service>]

sdeservice -o register -r <registry_keyword> -v <value> -p <ArcSDE_admin_password> [-i <service>]

sdeservice -o unregister -r <registry_keyword> -p <ArcSDE_admin_password> [-i <service>]

sdeservice -h

sdeservice -?


An operation performs a specific task related to the command and is specified with the -o option. The following operations are available with the sdeservice command:




Create an ArcSDE service on a Windows server.


Delete an ArcSDE service from a Windows server.

You must stop the service before you can delete it. This can be done from the Windows services list or using the sdemon command.


Display service information for all or a specified ArcSDE service.


Modify an existing registry keyword.


Add a registry keyword to the Windows registry.


Remove a registry keyword from the Windows registry.


Each operation has a set of options. Because options are prefaced with a specific letter, you can pass them in any order. Options are case sensitive, so be sure to use the correct case.

Depending on the operation, some options are required and some are not, as indicated with the square brackets ([ ]). The following options are available with the sdeservice command:




Identify to which DBMS the service connects and the service dependency.

A service dependency identifies a service that should start before the ArcSDE service. DB2INSTANCE, SQLSERVERINSTANCE, SID, and PGINSTANCE are optional and are used to identify an instance of a database, either remote or local.

  • SID (default: ORCL)
  • DB2INSTANCE (default: DB2-0)
  • SQLSERVERINSTANCE: SQL Server named instance or data source (default: MSSQLServer)
  • PGINSTANCE (default:postgresql-x64-9.0)

-h or -?

Use either of these options to see the syntax of a command.

If you are running the command from a C shell, use -h or "-\?".


The ArcSDE home directory (SDEHOME); only needed if the SDEHOME variable isn't set or multiple services are in use.


ArcSDE service name; required if the default value, esri_sde, is not used.


Exclude database service from list of services that are ArcSDE dependent.


No verification is performed; the operation begins immediately after being invoked


Specify an operation.


The DBMS password for the geodatabase administrator


The ArcSDE service user password (Windows service logon account password)


Register/Unregister/Modify the following Windows registry keywords:

  • ADMIN_DATABASE: The database that uses the ArcSDE service
  • SDEHOME: The ArcSDE software location
  • SDE_DBA_USER: The user name of the geodatabase administrator
  • SDE_DBA_PASSWORD: The password of the ArcSDE administrator database user


The name of the DBMS instance to which the ArcSDE service connects


The ArcSDE Windows service account user

The specified user must be a Windows user who has administrator permissions on the server computer or must be granted the log on as a service privilege. Include the domain name if needed. For example, if you are logged in to the LAMBERT domain and your user name is joe, enter LAMBERT\joe. You should be logged in as this user when you create the service.

When using Windows authentication for the DBMS, the service user must also have the Replace a process level token permission to switch the security context of the gsrvr.exe process to the connecting user.


The registry value you are setting or modifying


Create an ArcSDE service

Use the create operation to make a new ArcSDE service on a machine with a Windows operating system. In all create examples, you must manually edit %windir%\system32\drivers\etc\services and %SDEHOME%\etc\services.sde to add the service name and port number.

This example creates a new ArcSDE service for Informix:

sdeservice -o create -d INFORMIX -p -i esri_inf 
-u informix -P sde.inf

The following example creates a new ArcSDE service for Microsoft SQL Server:

sdeservice -o create -d SQLSERVER -p 
-i arcsde -H z:\arcgis\arcsde\sqlexe

In this example, a new ArcSDE service, esri_psql, is created for a PostgreSQL geodatabase on a machine named server4. The name of the PostgreSQL instance is postgresql-x64-9.0.

sdeservice -o create -d POSTGRESQL,postgresql-x64-9.0 
-i esri_psql -s server4

Please enter SDE DBA password:

Successfully created and registered esri_psql

Notice that in the previous example, the ArcSDE administrator's password was not included in the command with the -p option. If omitted, you are prompted to provide the password.

This example creates a new SQL Server ArcSDE service pointing to a named instance called Oceans\GIS1:

sdeservice -o create -d SQLSERVER,Oceans\GIS1 -p 
-i esri_sde01 -H z:\arcgis\arcsde\sqlexe

The instance name in the previous statement could have been specified with the -s option instead, since for SQL Server the instance name and data source are the same. For example:

sdeservice -o create -d SQLSERVER -s Oceans\GIS1 
-p -i esri_sde01 -H z:\arcgis\arcsde\sqlexe


It is assumed the ArcSDE administrator user for which you are providing the password (-p) is SDE. It is also assumed that the name of the database to which the service applies is SDE. If your ArcSDE administrator user is not SDE, such as when you use a DBO schema in SQL Server, you must set the SDE_DBA_USER registry key to the login name of the DBO user using sdeservice -o register. If the name of your database is not SDE, you must set the ADMIN_DATABASE registry key to the name of your database using the sdeservice -o register command.

Delete an ArcSDE service

The delete operation deletes an existing ArcSDE service from a Windows server.

This example deletes an ArcSDE service on PostgreSQL:

sdeservice -o delete -i esri_pgs -d POSTGRESQL

Display service information

The list operation displays service information for all ArcSDE services or an ArcSDE service specified in the command. Below, information will be listed for the service miss:

sdeservice –o list –i miss

SDE service Information
Name: ArcSde Services(miss)
SDEHOME: C:\ArcGIS\ArcSDE\sqlexe
Datasource: MOOSE
Admin_database: gisdb
Version: 10.0.0


If the service name is esri_sde, you do not need to specify the -i option; you could just type sdeservice -o list.

Add a keyword to the Windows registry

This example registers an ADMIN_DATABASE (database with system tables) named Seamounts:

sdeservice -o register -d SQLSERVER -r ADMIN_DATABASE 
-v Seamounts -i sde2 -p spatial.dat

Modify a registry keyword

Use the modify operation to modify an existing Windows registry keyword. This example changes the setting in the registry for the SDEHOME location:

sdeservice -o modify -r SDEHOME -p 
-v c:\ArcSDE2\ora10gexe -d ORACLE,ORCL

Remove a keyword from the Windows registry

The unregister operation removes an existing keyword from the Windows registry. Here, the registry keyword added in the last example is unregistered:

sdeservice -o unregister -r ADMIN_DATABASE -d SQLSERVER 
-i sde2 -p