Creating an ArcSDE Service on Windows using ArcGIS 10.1

September 27, 2012 at 9:17 am 2 comments


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

Steps:

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.

Steps:

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

If you do not specify a name with the –i option, the default name of esri_sde is used.

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

This creates an ADMIN_DATABASE value in the registry for the service, and registers a database named sde.

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:

Steps:

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.

Your connection properties will look something similiar to the below screenshot:

Tania T.

Entry filed under: Uncategorized. Tags: , , , , , .

Taking hold of the Python – Part 3 Compressing the ArcSDE geodatabase

2 Comments Add your own

  • 1. Anurag  |  November 9, 2013 at 10:08 pm

    hello Tania thanks for the help….Can you elaborate the steps after creating the service. I am using arcsde 10.2 for oracle 11g R2 on a 64-Bit 2008 Windows server. I am facing some issues regarding starting the service. I am new to this. Please do help.

    Reply
  • 2. Tania T  |  November 15, 2013 at 12:45 pm

    Hi. Could you please elaborate on the issue. Please also try restarting the service via the sdemon -o start -i . Are you receiving any specific error messages or numbers? Have you checked the sde_*.log?

    Here is a link to some helpful suggestions in troubleshooting the arcsde service:

    http://resources.arcgis.com/en/help/main/10.2/index.html#//002p00000047000000

    Hope it helps.

    Reply

Got something to say?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Subscribe to the comments via RSS Feed



Follow

Get every new post delivered to your Inbox.

Join 71 other followers

%d bloggers like this: