Monday, June 14, 2010

Running ArcSDE on Amazon EC2

Running ArcSDE on Amazon EC2

I have a project where I’m trying to setup 2-way geodata replication using ESRI ArcSDE with the parent database housed on Amazon EC2. In order to run ArcSDE on the amazon server I had to make a few tweaks. I set up an ArcSDE database on SQL Server 2008 Standard and found that I could not reconnect after I would stop and restart the instance. This seemed to be due to the new server name assigned each time you turn off/on an amazon instance. That name is used to reference the SQL Server instance by the esri_sde service. I worked around this by creating a new ArcSDE service and configured it to point to localhost for the database instance name. The database has functioned normally since the tweak. Here are the steps:

1. create a new esri_sde01 service
sdeservice -o create -d SQLSERVER,localhost -p ### -i esri_sde01 -H "C:\Program Files (x86)\ArcGIS\ArcSDE\sqlexe"

2. edit c:\windows\system32\drivers\etc\services to show esri_sde01 service - should look exactly like esri_sde service

esri_sde01 5151/tcp #ArcSDE for sqlserver

3. alter the registry so the service references sde as SDE_DBA_USER and Admin_database

sdeservice -o register -d SQLSERVER -r ADMIN_DATABASE -v sde -i esri_sde01 -p PASSWORD
sdeservice -o register -d SQLSERVER -r SDE_DBA_USER -v sde -i esri_sde01 -p PASSWORD

4. list the services to make sure everything is copacetic

sdeservice -o list

SDE service Information
--------------------------------------------------------------------
RDBMS: SQLServer
Name: ArcSde Service(esri_sde)
SDEHOME: C:\Program Files\ArcGIS\ArcSDE\sqlexe
Datasource: IP-0AA1198D\SQLEXPRESS
SDE_DBA_USER: sde
Admin_database: sde
Version: 9.3.0
Status: SERVICE_STOPPED

RDBMS: SQLServer
Name: ArcSde Service(esri_sde01)
SDEHOME: C:\Program Files\ArcGIS\ArcSDE\sqlexe
Datasource: LOCALHOST\SQLEXPRESS
SDE_DBA_USER: sde
Admin_database: sde
Version: 9.3.0
Status: SERVICE_RUNNING

5. Start the esri_sde01 service
sdemon -o start -i esri_sde01 -p ###

6. alter the startup settings for the esri_sde01 serivce in

computer:manage:configure:services:ArcSde service(esri_sde01)

Now you should be able to start and stop your Amazon instance and reconnect to your sde database no problem. If you have more than one elastic IP make sure you use the same one to reference your server. This doesn’t matter to the ArcSDE service but it is held in your connection settings in catalog.

No comments: