Creating an ArcSDE Service on Windows using ArcGIS 10.1
Beginning with ArcGIS 10.1, the process of creating an ArcSDE service has changed. There is no ArcSDE Post Installation wizard, and the “Create ArcSDE service” operation (as part of the wizard) is no longer supported.
And more significantly, the default means of connecting to the geodatabase is via Direct Connections. However, if there is still a need for an ArcSDE service (application server connection) at the 10.1 release, one can be manually created and registered (depending on DBMS) using the following workflow:
Edit the service files on windows
1. Open the services.sde file in a text editor.
This file is in the ArcSDE\sdehome\etc folder.
2. Define the service name and TCP/IP port number on which the ArcSDE service will accept connection requests by doing one of the following:
• Remove the comment mark (#) from the default entry esri_sde 5151/tcp.
• Add a unique service name and TCP/IP port number, for example, arcsde 4000/tcp.
3. Open the Windows services file which is generally located in C:\Windows\System32\drivers\etc.
4. Copy the service entry you defined in the services.sde file and paste it into the Windows service file.
5. Save and close both services files.
Once the service information is defined, you can create the service.
Create the ArcSDE service using the sdeservice command
You must first execute the sdeservice command with the create operation. On all databases except Oracle, execute the sdeservice command again with the register operation to specify with which database this new service will be used.
Syntax to execute this against a geodatabase in SQL Server is as follows:
sdeservice -o create -d SQLSERVER,SQLSERVERINSTANCE -i <service> -p <ArcSDE_admin_password> [–n] [–H <sde_directory>] [–u <service_user>] [–P <service_user_password>] [–s <data_source>]
sdeservice -o register -d SQLSERVER,SQLSERVERINSTANCE -r ADMIN_DATABASE -v <registry_value> -i <service> -p <ArcSDE_admin_password>
Syntax to execute this against a geodatabase in Oracle is as follows:
sdeservice -o create -d ORACLE,SID –i <service> –p <ArcSDE_admin_password> [–n] [–H <sde_directory>] [–u <service_user>] [–P <service_user_password>] [–s <data_source>]
The contents in brackets ([ ]) are optional depending on your situation. For more information on using the sdeservice command, see the sdeservice command topic in the Administration Command Reference provided with the ArcSDE application server installation.
1. Open an MS-DOS command prompt window on a computer from which you have access to the ArcSDE commands.
2. Type the sdeservice command with the create operation.
The following examples show creating a service when ArcSDE and the database are installed on the same server.
sdeservice -o create -d SQLSERVER,MYSERVER\SSINSTANCE
-i esri_sde -p sdepasswd
sdeservice -o create -d ORACLE,ORA2 -i esri_sde
-p sdepasswd -s myserver
The following example shows creating a service when ArcSDE is installed on a remote Windows server to the Database server. Type the sdeservice command with the create operation and include the –n option.
sdeservice -o create -p sdepasswd
-d SQLSERVER,MYSERVER\SSINSTANCE -n -i esri_sde
3. Type the sdeservice command with the register operation to register the database.
sdeservice -o register -d SQLSERVER,MYSERVER\SSINSTANCE
-r ADMIN_DATABASE -v sde -i esri_sde –p sdepasswdcls
4. If you are using a dbo-schema geodatabase, type the sdeservice command with the register operation to register the user with which the giomgr will connect to the database.
sdeservice -o register -d SQLSERVER,MYSERVER\SSINSTANCE
-r SDE_DBA_USER -v esri_sde -i esri_sde
Once the service has been created, use the sdemon command or Windows services menu to start it.
Connecting to your ArcSDE service from ArcGIS Desktop
This step is completely new at the 10.1 release. In order to connect to your new or existing ArcSDE service, you need to create an ArcSDE connection file using the Create ArcSDE Connection File geoprocessing tool or a Python script.
The following steps explain how to connect to an enterprise geodatabase using an ArcSDE service:
1. Start ArcMap or ArcCatalog.
2. Open the Create ArcSDE Connection File geoprocessing tool.
The Create ArcSDE Connection File tool is in the Workspace toolset of the Data Management toolbox.
3. Browse to the location where you want the connection file to be created to populate the ArcSDE Connection File Location text box.
4. Type a name for the connection file.
The file name must include the .sde file extension.
5. In the Server text box, type the name of the server where ArcSDE is installed.
6. Type the port number of the ArcSDE service in the Service text box.
7. Depending on which database management system you use, type the following in the Database text box.
• Oracle: Do not type anything in the Database text box.
• SQL Server: Type the name of the SQL Server database that contains your geodatabase.
• PostgreSQL: Type the name of the PostgreSQL database that contains your geodatabase.
• DB2: Type the alias of the DB2 database that contains your geodatabase.
• Informix: Type the Open Database Connectivity data source name for the Informix database that contains your geodatabase.
8. If you want to connect to a geodatabase in SQL Server using an operating system authenticated login, uncheck Database authentication; otherwise, leave this option checked.
9. If Database authentication is checked, type the name of the valid database user in the Username text box.
10. If Database authentication is checked, type the password of the database user in the Password text box.
11. If you want the user and password information stored with the ArcSDE connection file, check Save username and password.
If this is unchecked, you will be prompted to provide the user name and password each time you connect using this connection file.
12. If you want to connect to a version other than DEFAULT, type the name of the geodatabase version in The following transactional version will be used text box.
13. If you want to connect to that version the next time you use the connection file, check Save the transactional version name with the connection file.
An ArcSDE connection file is created in the location you specified.
You can right-click the ArcSDE connection file, select copy – and paste in a different location such as your Database Connections folder.