2
votes
1answer
21 views

RuntimeError: Field is not editable when using InsertCursor on ArcSDE geodatabase with ArcFM installed?

We are running ArcGIS Desktop 10.1 SP1, and also have ArcFM installed. I have this simple code: workspace = "C:\\my.sde" arcpy.env.workspace = workspace edit = arcpy.da.Editor(arcpy.env.workspace) ...
1
vote
1answer
35 views

How to create a model which executes a SQL stored procedure with user-provided parameters?

How can I create an ArcToolbox that executes a SQL stored procedure and asks the user for two inputs? As it stands now, I have to log in to my SQL server and run an execute statement for the stored ...
1
vote
2answers
64 views

Exporting lists of Feature classes and fields from SDE

I'm using matt wilkies' arcplus module http://gis.stackexchange.com/a/5943/16793 to export a list of feature classes within an SDE database to a text file. I've also written a tool to write field ...
2
votes
0answers
31 views

Replacing double quotes in filename using [closed]

I am working with data in an SDE, when I create a new feature class within the SDE I get a file name which contains my user name in double quotes. I do not have administrative permissions to the SDE ...
1
vote
1answer
35 views

Select parcels from SDE layer using table list and exporting to shapefiles

Using a table of county fips codes and state name, I need to select from a large parcel layer stored in SDE and export to individual shapefiles based on the fips code and state name from the table. ...
3
votes
1answer
119 views

How do I change to a Historical version using Python and arcpy

I am having an issue trying to change to a historical version on an SDE feature class using Python and arcpy.ChangeVersion_management. I am able to manually change the version to a specific date and ...
1
vote
2answers
94 views

How to copy selected features from one sde feature class to another with different attributes using Arcpy?

I am new to Arcpy scripting, I need help on copying the features to SDE feature class. My Scenario: We have 2 Geo databases running on Oracle 11g ArcSDE 10.2 . I have been asked to write the python ...
0
votes
1answer
35 views

Identifying inserts, updates, deletes, and conflicts between a parent and child version in ArcSDE with ArcPy

I'm looking for a way to identify records that have changed between the present and the last time a version was reconciled. It would also be great to be able to identify conflicting records. Ideally ...
1
vote
0answers
104 views

Using arcpy.CopyFeatures_management results in a 000210 using a database connection that does not contain saved credentials

Currently have a problem running CopyFeatures_management in ESRI's ArcGIS 10.1 The following shows two Enterprise Geodatabase connection files. One includes the username and password and the other ...
1
vote
1answer
80 views

Backup several SDE database connections

This question stems from my previous question on how to list databases based on SDE. Now I want to copy them and have it written as a function so I can list out each database connection below it so ...
2
votes
2answers
125 views

ListFeature classes in SDE

I have this code: def backSDE(ActiveSDE): arcpy.env.overwriteOutput = True arcpy.env.workspace = ActiveSDE fcs = arcpy.ListFeatureClasses() print fcs #Databases ActiveSDE = ...
0
votes
1answer
91 views

arcpy.ListDatasets() returns emtpy list

I'm having trouble getting the ListDatasets (or any of the list functions) to return anything but an empty list when pointed at our SDE geodatabase, but the same code works for a file geodatabase. I ...
1
vote
0answers
113 views

Running python script outside of Arcmap's python console

My codes works fine in Arcmap's python windows. But when I try to run it in a command promt windows, It says that; ERROR 000837: The workspace is not the correct workspace type. But it works fine ...
0
votes
1answer
48 views

registering or unregistering as versioned a future dataset with python

As you know, you can store feature classes in arcsde in two ways. Firts, in the root path: sde_conn_file.sde/FeatureClass Second, in a dataset: sde_conn_file.sde/DataSet/FeatureClass How can I ...
4
votes
2answers
168 views

How to transfer attributes to thousands of local points from ArcSDE feature class with millions of polygons?

I have a set of points and a huge feature class with topographic information (OS MasterMap for who knows it). I'm talking millions of polygons huge. I want to transfer attributes of the polygons to ...
1
vote
2answers
93 views

Using Python to connect to Multiple SDE Database Connections

I am writing a script that accesses multiple sde Database connections. I have set the script to include accessing the environment workspace: import arcpy arcpy.GetParameterAsText(0) ...
2
votes
2answers
102 views

Is there a way to do a python batch script for Analyze and Compress on SDE Databases?

I created and modified python scripts based off of ERSI's example (http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000v7000000), however, what would be great is to be able to batch ...
1
vote
1answer
265 views

Why does copying ArcSDE datasets and features in Python give ERROR 000732 & 000735?

Go easy, I'm new to python I keep getting a kick back that says this: ERROR 000732: Input Features: Dataset 'Database Connections\Wyoming.sde\Supporting_MT_DBO_Geology' does not exist or is not ...
2
votes
0answers
95 views

Data loss after compressing geodatabase in ArcSDE

I suffer sometimes from data loss after compressing ArcSDE geodatabase, this geodatabase contains versioned feature classes, so the compressing script reconciles and compress the geodatabase: # ...
1
vote
1answer
136 views

Why does FeatureClassToFeatureClass field mapping create shapefile with no attribute values on local machine from ArcSDE?

I have inherited taking over and supporting and ArcSDE GIS database. We have a process that we must do every 6 months to export certain features from the ArcSDE database into shape files so that they ...
1
vote
1answer
226 views

How to edit PostgreSQL geodatabase table using ArcPy?

I'm trying to update a table using a python script and it's not working. The table resides in a postgres geodatabase and is versioned. I have also verified my user permissions (I'm the admin). The ...
0
votes
0answers
81 views

Arcpy ERROR 000732 using tools from Toolbox (Copy, FeatureToFeature etc.)

I have got a lot of feature classes in my sde postgreSQL database. When I check the existence of sde database using arcpy.Exists(inGDB) I get the True result. In the case when I check the existence ...
0
votes
1answer
48 views

How to store both fixed and variable attributes as a feature class?

I have a live data feeds as an XML file from the Internet. I need to use Python and ArcPy lib to store each feed as a point feature in a feature class of an ArcSDE datbase. The xml looks like: ...
1
vote
0answers
21 views

Fix broken SDE layers with Arcpy - unexpected error [duplicate]

We are in the middle of our ArcGIS 9.3 to 10.1 migration project and we have a lot of custom map documents (from different users) that among others, point to our current 9.3 SDE database. After our ...
1
vote
1answer
39 views

How can I avoid creating a new cursor object repeatedly while counting features in a large SDE Database?

I would like to get a script running much faster than it is now. The script completes on my machine in about 33 minutes. It generates a report that counts features with specific attributes in one ...
4
votes
2answers
297 views

Checking current user privileges for an SDE dataset with Python/arcpy

I am managing data distribution via an ArcSDE Oracle gdb to a number of users (schemas?), each of which can only have read only access to datasets they have requested access to, and have then been ...
1
vote
0answers
81 views

Why might ArcPy, TableToTable, MakeQueryTable and ArcSDE have performance issue in IDLE?

I have written a Python script tool to do: Make Query Table Table To Table (with fieldmapping). The code is nothing more than arcpy.MakeQueryTable("table1;table2;table3", ...
0
votes
3answers
405 views

Arcgis CopyFeatures tool extremely slow when exporting to SDE

I have about 10 points in a file gdb that I am attempting to copy over to an sde feature set. In arcpy and in model builder it takes about a minute to execute. Do you know of any tips to speed this ...
0
votes
0answers
146 views

Arcpy - change layer from sde connection to file geodatabase

We are copying data from our corporate office to field offices and we are creating a file geodatabase at these field offices. We are copying the layers that point to sde and they need to point to the ...
0
votes
0answers
79 views

zonal statistics from mosaic dataset

I'm trying to to do the following: def calcZonalStatistics(raster): # Set environment settings arcpy.env.workspace = r"C:\MyFileGDB.gdb" # Set local variables inZoneData = "Database ...
0
votes
1answer
127 views

Is there a way to change environment settings of a dataset without creating a new one?

I am trying to change the environment settings of an existing dataset. I found a workaround by first changing the environment settings in the SDE-database and then create a new dataset with now ...
5
votes
2answers
1k views

How to copy an SDE geodatabase to a file geodatabase using Python?

I would like to make an exact copy (domains, feature datasets, feature classes, etc.) of an SDE database to a file geodatabase. I have tried several possibilities, including: using the Copy (Data ...
2
votes
1answer
121 views

Renaming shapefiles with prefix while running arcpy.FeatureClassToGeodatabase?

I'm fairly new to the arcpy world. I am trying to create a script in 10.0 that will load a dataset (file geodatabase) into ArcSDE and rename the feature classes with a prefix, i.e. San_Diego_Bay -> ...
3
votes
1answer
655 views

Python: Change SDE data source for mxds in specific folder

I've searched all the forums and help and have made progess but recently got an error that has thrown me for a loop - also some mxds are not being changed at all! What I'd like my code to do: Iterate ...
1
vote
1answer
140 views

arcpy update cursor: can't connect to a database table

I am using updateCursor to retrieve some rows from a non spatial table using a connection of type "Spatial Database Connection" (That creates a .sde file) from ArcCatalog. However, it doesn't work, ...
2
votes
1answer
118 views

Arcpad checkout to an area

I would like to check out data from an SDE database but for performance sake, i prefer to delete all features outside of my survey area. i've tried to copy features in area from sde to a file GDB ...
3
votes
1answer
125 views

How can I list SDE versions using Python?

I have an SDE geodatabase with different versions for each user. How can I list each version using Python?
3
votes
1answer
215 views

How can I validate a table name on SDE with Oracle backend?

Second title: "Is arcpy.ValidateTableName broken on Oracle?" I have an Oracle SDE database 9.3.1 (service connection). My arcGIS client tools are version 10.0 SP5). I have some names of feature ...
1
vote
1answer
181 views

Database Connections folder is empty when viewed with ArcGIS tool

I'm trying to create an ArcGIS tool which accepts an SDE connection file as an input. I made a new interface with an input parameter and set the type to Database Connections. When I open the tool and ...
1
vote
1answer
93 views

Filter ArcSDE layers of the TOC into a combobox

I've a list of layers of the current workspace in a combobox, but I want to list only the layers of the ArcSDE Connection, not the others I've in the TOC. How can I filter the name of this layers?
3
votes
1answer
608 views

Arcpy does not execute “CopyFeatures_Management” to write a featureclass to an ArcSDE database

I have some problems with my Python script. The script gets an JSON with different information about images. The information includes general information about images and also the gps position of ...
8
votes
2answers
2k views

How can I more efficiently select related records?

Below is the code I'm using to replicate the "related tables" button in ArcMap. In ArcMap that button selects features in one feature class or table based on the selection of features in another ...
4
votes
1answer
366 views

Access Metadata from ArcSDE-tables using python

Is it possible to access the metadata of a feature class in a ArcSDE-data, using arcpy / python (on Arcgis 10.0). I suppose I could export the metadata to xml and parse the xml, but is there a more ...
5
votes
1answer
166 views

Why Can't ArcPy Search the Newly Created Feature

I'm running the following tool in ArcGIS 10. I have an ArcPy Script like this: import arcpy from arcpy import env env.workspace=r"C:/sde/lcimrl.sde" fc="SDE.ATTACHMENTS\SDE.attachment_points" fcRows ...
3
votes
1answer
144 views

Enabling ArcSDE Archiving with Python and C API using ArcGIS 10.0?

I have a script that does some register as versioned and updating privileges. How would I call into the c api for ArcSDE to enable archiving with python? ...
1
vote
1answer
464 views

Why does arcpy append from file geodatabase to SDE fail?

I'm trying to append a feature class from a file geodatabase to an Arcsde featureclass using this line of code: arcpy.Append_management("parcel_copy", sde_path+"parcel" ,"NO_TEST") This line works ...
1
vote
1answer
545 views

How to drop ArcSDE connection using Python scripting?

I want to be able to control connections to ArcSDE via python. Here is my script so far using ESRI's example. import arcpy from arcpy import env env.workspace = r"SDEConnection" fcList = ...
5
votes
2answers
861 views

Permanently replace/update server/service in each ArcSDE Layer in MXD?

Using the mxd.findAndReplaceWorkspacePaths method, if and MXD is updated and the path the the .sde connection file moves again all of the data sources will break again. Is there a method to ...
7
votes
3answers
3k views

How to delete feature class features faster (ArcPy)

I have written this script that recurses through all feature classes in a given set of feature datasets and deletes all their features. It appears to do the job but it runs pretty slowly. Is there ...
6
votes
1answer
272 views

Changes in synchronized replica not shown in ArcMap or ArcCatalog without refreshing

I am synchronizing a one-way replica in ArcEditor using Python. I tried adding RefreshActiveView and RefreshCatalog to the code, but I still need to refresh the synchronized database to see the ...