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:
- - <letter> or - <word>: Specifies a command option, for example, -o, -a, or -interleave
Letters are both lowercase and uppercase, so it is important that you input the correct case.
- Text enclosed in greater than and less than signs (< >): Required argument; replace with appropriate value.
For example, -u <DB_user_name> could become -u mlogin.
- Pipe ( | ): A list of mutually exclusive arguments; pick one from the list.
- Square brackets ([ ]) : An optional parameter; if no value is provided, the default value is used.
- Curly brackets ({ }): Encloses a list of choices separated by a pipe symbol
sdeservice -o create -p <ArcSDE_admin_password> [-n] [-H <sde_directory>] [-d {ORACLE,SID | SQLSERVER,SQLSERVERINSTANCE | DB2,DB2INSTANCE | INFORMIX | POSTGRESQL,PGINSTANCE}] [-i <service>] [-u <service_user>] [-P <service_user_password>] [-s <data_source>]
sdeservice -o delete [-d {ORACLE,SID | SQLSERVER,SQLSERVERINSTANCE | DB2,DB2INSTANCE | INFORMIX | POSTGRESQL}] [-i <service>] [-N]
sdeservice -o list [-i <service>]
sdeservice -o modify -r <registry_keyword> -p <ArcSDE_admin_password> -v <new_value> [-i <service>] [-d {ORACLE,SID | SQLSERVER,SQLSERVERINSTANCE | DB2,DB2INSTANCE | INFORMIX | POSTGRESQL}]
sdeservice -o register -r <registry_keyword> -v <value> -p <ArcSDE_admin_password> [-i <service>] [-d <ORACLE,SID | SQLSERVER,SQLSERVERINSTANCE | DB2,DB2INSTANCE | INFORMIX | POSTGRESQL>]
sdeservice -o unregister -r <registry_keyword> -p <ArcSDE_admin_password> [-i <service>] [-d {ORACLE,SID | SQLSERVER,SQLSERVERINSTANCE | DB2,DB2INSTANCE | INFORMIX | POSTGRESQL}]
sdeservice -h
sdeservice -?
Operations
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:
Operation | Description |
---|---|
create | Create an ArcSDE service on a Windows server. |
delete | 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. |
list | Display service information for all or a specified ArcSDE service. |
modify | Modify an existing registry keyword. |
register | Add a registry keyword to the Windows registry. |
unregister | Remove a registry keyword from the Windows registry. |
Options
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:
Option | Description |
---|---|
-d | 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.
|
-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 "-\?". |
-H | The ArcSDE home directory (SDEHOME); only needed if the SDEHOME variable isn't set or multiple services are in use. |
-i | ArcSDE service name; required if the default value, esri_sde, is not used. |
-n | Exclude database service from list of services that are ArcSDE dependent. |
-N | No verification is performed; the operation begins immediately after being invoked |
-o | Specify an operation. |
-p | The DBMS password for the geodatabase administrator |
-P | The ArcSDE service user password (Windows service logon account password) |
-r | Register/Unregister/Modify the following Windows registry keywords:
|
-s | The name of the DBMS instance to which the ArcSDE service connects |
-u | 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. |
-v | The registry value you are setting or modifying |
Examples
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 sde.space -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 spatial.data
-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 spatial.data
-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 spatial.data -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
----------------------------------
RDBMS: SQLServer
Name: ArcSde Services(miss)
SDEHOME: C:\ArcGIS\ArcSDE\sqlexe
Datasource: MOOSE
Admin_database: gisdb
Version: 10.0.0
Status: SERVICE_RUNNING
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 spatial.data
-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 spatial.data