Select to view content in your preferred language

Alternatives to using SDE command line tools - Blog Discussion

61730
131
10-21-2013 07:40 AM
ChetDobbins
Esri Contributor
With the release of 10.2 and plans to deprecate the ArcSDE command line tools, you may be wondering how current tasks that use these tools can be completed elsewhere. This blog provides some workflows that have alternate user interface tools in ArcCatalog/ArcMap that will make transitioning as seamless as possible.

http://blogs.esri.com/esri/supportcenter/2013/10/04/do-this-not-that-alternatives-to-using-sde-comma...

We are very interested in hearing feedback from everyone who uses the ArcSDE commands, including questions, concerns, and ideas for making this successful. You can also contact Esri Support Services for specific ArcSDE commands that do not have comparable replacements.

This document outlines the planned changes in platform and functionality in the ArcGIS 10.2 release and
includes a reference to ArcGIS 10.1 deprecation notes.
http://downloads2.esri.com/support/TechArticles/W26496_W25918_DEPRECATION_PLAN_FOR_ARCGIS_101_and_10...
131 Replies
VinceAngelo
Esri Esteemed Contributor
In the meantime, I'm working on a python script to read the SDE.LAYER table, feed the appropriate fields into the sdelayer -o si_stats command, and strip the output to usable info and pluck that in a database.


That's not going to work when there is no 'sdelayer' utility.  The logic for generating an 'si_stats'
report requires thorough understanding of what si_stats is collecting, but generating an equivalent
report isn't difficult (I did so with an open source 'C' module [se_layergrid.c] released 1998). 
Porting that to an Add-In shouldn't be too difficult.

- V
0 Kudos
MelissaJarman
Esri Contributor
I private messaged you for a test case showing this behavior - Support Services would be very interested in seeing if the default calculation for the spatial index grids is not working as well as your manually entered values for the spatial index grid.

sdelayer -o si_stats is indispensible for maintaining some feature classes, and no equivalent is available in desktop at the current version. The GDBT spatial index examination tool at 10.0 sort of works, but command line works better and faster.

Today I had to use sdelayer -o si_stats to examine and redesign the spatial indexes for statewide parcels. Before change, took four minutes to draw at a reasonably large scale. After change, 6 seconds or less. The before-change spatial index was the one "estimated" automatically by ArcGIS desktop when the data were loaded. Take away this command line tool and our ability to provide well-performing data will be crippled.
0 Kudos
by Anonymous User
Not applicable
Melissa -

I did not receive your message. I have left a voicemail with the support line (main reception) with my contact information.
0 Kudos
GlennWolf
New Contributor
We have historically used the command "sdetable -o create_view" to create a Geospatial View (linking a registered table and feature class to have near-real-time data from a CIS system in the GIS, for labeling, mail lists, and other purposes).  What is the equivalent of this in 10.2?

Example:

A delete operation:

sdetable -o delete -t OurGeospatialView -N -q -u <username> -p <password>

A create operation:

sdetable -o create_view -T OurGeospatialView -t OurFeatureClass,OurRegisteredTable -c OurFeatureClass.OBJECTID,OurFeatureClass.SHAPE,OurFeatureClass.Col1,OurFeatureClass.Col2,OurRegisteredTable.CISCol1,OurRegisteredTable.CISCol2 -w "OurFeatureClass.JoinColumn=OurRegiteredTable.JoinColumn and OurFeatureClass.SubType = 6" -u <username> -p <password>

So this would give us a read-only Geospatial View (which acts like a feature class) with the following columns:
OBJECTID
SHAPE
Col1
Col2
CISCol1
CISCol2

Make sense?

Thanks,
Glenn
0 Kudos
VinceAngelo
Esri Esteemed Contributor
'sdetable -o create_view' should only be used with SDEBINARY storage feature classes
(which shouldn't be used in most situations).

The 10.2 equivalent is using SQL to create a view in the database, then registering
that view with 'sdelayer -o register', or just using the view in a QueryLayer.

- V
ScottBateman
Deactivated User
Almost 5 months and no response on the .SDX file export question that several of us have had....
0 Kudos
TomWeisenberger
Occasional Contributor

We require an alternative to load_only_io mode if Esri is going this route of abandoning SDE command line and offering geoprocessing alternatives.  Fortunately SDE command line is still installed from SDE 10 on our server and it still works with our newly upgraded 10.2 geodatabases.

I have a weekly update script that loads 2.3 million parcels from a spatial view to a stand-alone repository feature class.

When performing a simple truncate (TruncateTable) and load (Append), without setting the parcel feature class in load_only_io mode first - load time is over 7 hours!  Indexes rebuilt by RebuildIndexes then AnalyzeDatasets as recommended.

As we've traditionally done, by using SDE command line in python script subprocess, setting the feature class into load_only_io mode first, then back into normal_io mode - load time is less than an hour.  This works great and rebuilds indexes at the same time. We've had no problems with this process for years and are worried that progressive upgrades are actually moving somethings backwards without appropriate consideration of customers requirements and established processes.

Please provide either a separate "bulk-load" tool that efficiently loads data into SDE at the same rate or provide a geoprocessing tool that does the same SDE command line for load_only_io and normal_io so these can be accessed through arcpy.

Tom Weisenberger

Los Angeles County - Enterprise GIS


MelissaJarman
Esri Contributor

Tom - Give the 'Remove Spatial Index' tool a try - this should replace the commandline version of the sdelayer -o load_only / normal_io mode.

Within the current commandline administrators guide there is a statement about this tool with a globe indicating there is a recommended workflow within the user interface to try -

eg: load_only_io

Sets the input/output (I/O) mode of the layer to load-only, dropping the spatial index, and allowing only store and replace I/O operations

<esri globe> You can use the Remove Spatial Index geoprocessing tool or a Python script to drop the spatial index, placing the layer or feature class in load only I/O mode instead of this operation.load_only_io.png

0 Kudos
TomWeisenberger
Occasional Contributor

Melissa, thanks for your response.

I will investigate if this alternative will work for us.  This is the main parcel feature class used by several map services and by users throughout the enterprise - so lots of connections to it.  My main concern using this method is schema locks.  Even though the parcel load script runs at night I would need to add code to remove all connections/locks first in order to run Remove Spatial Index. I'm concerned about failures if any locks remain.  The command line would do it all regardless of any locks. (or does it remove connections/locks itself?) 

Tom Weisenberger

Los Angeles County - Enterprise GIS

0 Kudos
MelissaJarman
Esri Contributor

Sorry for my delay in response. I agree that the remove spatial index tool does appear to need an exclusive lock from my testing. I do not know if the commandline tool removes existing connections - maybe did not check for shared locks  against the datasets before dropping the spatial index previously. Please try the schemalockingenabled parameter within your map service to see if this alleviates the issues you are experiencing when trying to update the spatial index, etc.

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

0 Kudos