Question

Reg : Could not open SDE workspace using FME Python

  • 11 August 2014
  • 3 replies
  • 13 views

Badge
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 ?

3 replies

Userlevel 4
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
Badge
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 
Userlevel 4
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

Reply