Select to view content in your preferred language

SDE Connection error

2601
4
Jump to solution
09-09-2013 07:29 PM
DianeBird
Occasional Contributor
We are trying to run a python script on the server on a feature class within an SDE database.
The error code reads:  ERROR 000732: Input Features: Dataset does not exist or is not supported.

import arcpy, csv, os
import arcpy._mapping
import arcpy.da

arcpy.env.workspace = "Database Connections\\ARC1_SQLExpress(2).sde"
theDBfile = "L3_Edits.DBO.L3_Lines"
fcoutput = "L3_Edits.DBO.L3_verts"
arcpy.FeatureVerticesToPoints_management(theDBfile,fcoutput,"ALL")


We are running ARC 10.2; Windows Server 2008 R2. 
Our SDE connection is missing something... None of the examples we have seen have shown anything else workable.
Any suggestions?
Tags (2)
1 Solution

Accepted Solutions
MathewCoyle
Honored Contributor
Your "Database Connections" folder is user specific ("%APPDATA%\ESRI\Desktop10.1\ArcCatalog"). When dealing with servers it is best to store them in a location all users can access. Otherwise you will run into issues if another user or the system attempts to execute the script they won't be able to find that location.

View solution in original post

0 Kudos
4 Replies
MathewCoyle
Honored Contributor
Can you post all your code? Are you sure the connection file exists in that location? Are you attempting to run this as a service/task while not logged in?

Also, please read this on posting code.
http://forums.arcgis.com/threads/48475-Please-read-How-to-post-Python-code
0 Kudos
DianeBird
Occasional Contributor
Can you post all your code? Are you sure the connection file exists in that location? Are you attempting to run this as a service/task while not logged in?

Also, please read this on posting code.
http://forums.arcgis.com/threads/48475-Please-read-How-to-post-Python-code


Thank you for your comments and link.
The connection is what we see in Catalog under "Database Connections".  Should we be looking under "Database Servers"?
This code is the beginning of a conversion of programs written and working for shapefiles.
We are just learning Python and trying to figure out how to connect to our SDE database.
0 Kudos
MathewCoyle
Honored Contributor
Your "Database Connections" folder is user specific ("%APPDATA%\ESRI\Desktop10.1\ArcCatalog"). When dealing with servers it is best to store them in a location all users can access. Otherwise you will run into issues if another user or the system attempts to execute the script they won't be able to find that location.
0 Kudos
DianeBird
Occasional Contributor
Ah haa!  Thank you.
That was the bit of information we needed.  We copied the connection file to a C:\Data folder and it worked.

arcpy.env.workspace = "C:\\Data\\Connection to ARC1_SQLExpress (2).sde"


Thanks again!
0 Kudos