Skip to main content
Question

Reg : Could not open SDE workspace using FME Python

  • August 11, 2014
  • 3 replies
  • 109 views

Forum|alt.badge.img
Hello, 

 

 

I am trying to disconnect users of SDE using python . When I use the below code 

 

 

arcpy.DisconnectUser(arcpy.env.workspace, "ALL")

 

 

arcpy.env.workspace = r"C:\\Connections\\SDE.sde"

 

 

I am getting an error  Python Exception <TypeError>: Could not open SDE workspace.

 

 

Has anybody encountered this error ? Any Ideas ?
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • August 11, 2014
Hi,

 

 

Make sure to test the value of arcpy.env.workspace separately (if it's a connection file, try it using ArcCatalog, etc).

 

 

Also be aware that the connected user must have admin privileges in the database, more info here (http://resources.arcgis.com/en/help/main/10.1/index.html#//002q000000r8000000).

 

 

David

Forum|alt.badge.img
  • Author
  • August 11, 2014
Hello David, 

 

 

The Connection File works fine . I can connect using Arc Catalog also I can connect it using python Idle 

 

 

The connection has administrative privilege. 

 

 

Our SDE has Oracle as Backend Database 

david_r
Celebrity
  • August 12, 2014
Hi,

 

 

make sure that the connecting user has ALTER SESSION rights in Oracle.

 

 

If that doesn't help, I suggest perhaps also asking in an ArcGIS-forum.

 

 

David