ERROR: Unable to load server library - SQL SRV 2014

2666
1
03-31-2016 11:31 AM
SusanMcClendon1
New Contributor II

Hi,

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 enable_enterprise_gdp.py 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.

Thanks,

Susan

0 Kudos
1 Reply
SusanMcClendon1
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 enable_gdb.py require 32 bit Python...no 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.

Susan

0 Kudos