[GIS] How to Register a Spatial View when ArcSDE is direct connect only

arcgis-10.0direct-connectenterprise-geodatabasesdelayersql server

I have an ArcSDE 10.0 set up with MS SQL 2008 R2 Database, on direct connect. There is no service running, nor installed.

I have created a spatial view built on a couple of tables. I have followed the steps given in
Creating a spatial view in SQL Server using SQL and registering it

The View can now been seen in MS SQL Server management studio. It is also seen in ArcCatalog as a table.

Now I need to register it with ArcSDE, so that it is seen as a featureClass.
This requires that I run the sdelayer -o register command.
The problem is that since there is no service installed, I cannot run the command.

What is the solution in this case? How do I register this spatial view so that it appears as a layer to ArcGIS?

Best Answer

You would specify the direct connection string in the -i parameter.

For an Oracle DB, this worked for me: sdelayer -o register -l XXXXXXX.XXXXXXXXX,SHAPE -G 2269 -t SDO_GEOMETRY -C XXX_ID,USER -e ns -u XXXX -p XXXX -i sde:oracle11g:XXXX.XXXXX, but I had to set an SDEHOME (e.g. c:\Program Files\ArcGIS\Desktop).

For a SQL Server DB, you would use sde:sqlserver:<instance_name> (looked up from Direct connections from ArcSDE commands to a geodatabase in SQL Server)

Now that I'm looking at the Oracle direct connection help, it looks like you can specify the SDEHOME in the connection string(e.g. sde:oracle11g:XXXX.XXXXX;SDEHOME=c:\Program Files\ArcGIS\Desktop). But I've never done it this way and I only see it in the Oracle help, so I'm not sure if it works for other databases.

Related Question