FAQ: Why am I getting "Error 000732, < dataset name > does not exist or is not supported", in a script run outside the ArcGIS environment?
Why am I getting "Error 000732, < dataset name > does not exist or is not supported", in a script run outside the ArcGIS environment?
In a geoprocessing model or script tool in a toolbox, users can refer to SDE data sources by a 'relative' path that contains the ArcCatalog connection name, such as:
The reference to 'Database Connections' is understood by ArcMap and ArcCatalog, but not by Windows. If a user runs a script having this type of connection string from a command line, scheduled task, Python development product, or other non-Esri environment, it is necessary to use the full Windows path to the connection file (.sde) on disk. A valid full path might look like this:
'C:/Users/<myusername>/AppData/Roaming/ESRI/Desktop10.3/ArcCatalog/Connection to mydb.sde'
By default, a connection file created in ArcCatalog is saved to the Windows user profile, but users can copy this file anywhere and reference it in any desired location. The Windows user profile is typically located in:
'C:/Users/<myusername>'The full path to the .sde connection file can be found in the ArcCatalog Catalog Tree: Database Connections folder. Right-click the database connection, Properties > General tab. The Name field shows the full connection string.
Last Published: 2/7/2022
Article ID: 000011874
Software: ArcGIS for Desktop Advanced 10.1 ArcGIS for Desktop Basic 10.1 ArcGIS for Desktop Standard 10.1 ArcGIS-ArcEditor 10 ArcGIS-ArcInfo 10 ArcGIS-ArcView 10