I have an ArcGIS Pro core host application that happily connects to a file GDB
targetGeodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(this.gdbTargetConnrection, UriKind.Absolute)));
, BUT as soon as I switch to connect to a enterprise geodatabase .sde file
targetGeodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri(this.gdbTargetConnrection, UriKind.Absolute)));
where this.gdbTargetConnrection = ‘C:\DeleteMe\SDE\xyz@xyz.sde’ an Oracle 11g geodatabase
I get the following error:
ArcGIS.Core.Data.GeodatabaseEnterpriseException: The gsrvr dll for a direct connection could not be loaded. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80050144
at ArcGIS.Core.Internal.IGeodatabaseIOP.Geodatabase_OpenFromEnterpriseGeodatabase(String path)
at ArcGIS.Core.Data.GeodatabaseUtil.OpenDatastore(String path)
--- End of inner exception stack trace ---
at ArcGIS.Core.Data.GeodatabaseUtil.OpenDatastore(String path)
at ArcGIS.Core.Data.Geodatabase.Open(Uri uri)
at ArcGIS.Core.Data.Geodatabase..ctor(DatabaseConnectionFile databaseConnectionFile)
at SSP.MLGW.Server.AnnotationSync.AnnotationSyncProcessor.Go() in
Code snippet:
using (var gdbTarget = new Geodatabase(new DatabaseConnectionFile(new Uri(@C:\DeleteMe\SDE\xyz@xyz.sde, UriKind.Absolute))))
{
......
}
Using a DatabaseConnectionProperties instead of a DatabaseConnectionFile yield the same error.
I have Pro 2.6 installed.
Using ArcGIS Pro or ArcCatalog I can connect via C:\DeleteMe\SDE\xyz@xyz.sde without issue, so we know the Oracle client is installed and working.
Any help would be greatly appreciated.