ERROR: Unable to load server library - SQL SRV 2014

03-31-2016 11:31 AM
New Contributor II


I'm running a new client system image through it's paces and I can't get PYTHON CMD LINE to connect to database.

  1. System image - Windows 7 Ent SP1
  2. SQL Server 2014 Database
  3. SQL Server 2012 Native Client (SDK) installed (11.1.3000)
  4. ArcGIS 10.3.1, all extensions - Clean install - no patches to date
  5. Added ArcGIS 10.3.1 - Desktop Background Geoprocessing (64 Bit) - adds 64 Bit Python
  6. Python27 - default install

System connects to DB fine with ArcCat and ODBC with the SLQ Server 2012 Native Client. When trying to run script, the tool runs fine in ArcCat, but when trying to run outside of ArcMap via cmd line it fails:

ERROR: Unable to load server library (c:\program files (x86)\arcgis\desktop10.3\bin\sdemssqlsrvr103.dll)

, Error = -324

I've tried running it with both 32/64 Python installations, same error. I know the database client drivers for Oracle were an issue 32 / 64 bit, fixable with PATH. But, I thought this was not an issue with the latest version of SQL Server 2012 native client (i.e. both 32/64 bit libraries are installed automatically). Other users may need the capability to run Python and connect to db out side of ArcMap (R or other 3rd party script environments).

Any help asap would be appreciated, the image gets deployed on multiple workstations Monday.



0 Kudos
1 Reply
New Contributor II

Culprit is the Desktop Background Geoprocessing (64 Bit) adding 64 bit Python (don't get me wrong, that is great!).

Default PythonPath - HKLM\Software\Python\PythonCore\2.7 - c:\Python27\ArcGISx6410.3 installed with the BGP patch. ESRI Default Desktop PythonPath - HKLM\Sofware\ESRI\Python10.3 - c:\Python27\ArcGIS10.3.

Native desktop tools like require 32 bit issues with the sql driver, despite what the error message indicates. But, if you try to run a tool in a script independent of ArcGIS Desktop (say a scheduled task to compress geo database), you need to explicitly call c:\Python\ArcGIS10.3\python.exe (32 bit), otherwise it will default to c:\Python\ArcGISx6410.3\python.exe (64 bit).

Not sure what I did wrong in initial test when it failed with  32 bit Python, but it works now. doh.


0 Kudos