Archive

Why is msvcr80.dll, not msvcr90.dll been including in Splunk 5?

Path Finder

According to the Release Note, version of Python in Splunk 5 is 2.7.3.

Reference: http://docs.splunk.com/Documentation/Splunk/5.0.2/ReleaseNotes/Python

But in Python 2.7.3 downloaded from python.org, msvcr90.dll has been included, not msvcr80.dll.

I have tried to use third-part library "pyodbc for Python 2.7" to access MS SQL Server, the library works in Python 2.7.3. In Splunk 5, it does not work since it depends on msvcr90.dll.

I still have no idea to use pyodbc in Splunk 5. Can someone help me?

0 Karma
1 Solution

Path Finder

I have solved the problem by rebuilding pyodbc.pyd library.

Required items:

  • Visual Studio 2005

includes the compiler using msvcr80.dll.

  • Python 2.7.3 source code

includes Python command.

  • pyodbc source code

includes build option in setup.py.

Building pyd file:

Running python.exe in Python 2.7.3\PC\VS8.0 folder to build setup.py.

Check library dependencies:

Running Dependency Walker tool.

View solution in original post

Path Finder

I have solved the problem by rebuilding pyodbc.pyd library.

Required items:

  • Visual Studio 2005

includes the compiler using msvcr80.dll.

  • Python 2.7.3 source code

includes Python command.

  • pyodbc source code

includes build option in setup.py.

Building pyd file:

Running python.exe in Python 2.7.3\PC\VS8.0 folder to build setup.py.

Check library dependencies:

Running Dependency Walker tool.

View solution in original post

Path Finder

Drainy, you are correct. I should not replace any files within Splunk.

Pyodbc is the third-party library that is not available in Splunk. So I rebuilt it to let it depend on msvcr80.dll using in Splunk. And I copied it to bin directory in my App. It will not be overwritten during Splunk upgrade.

0 Karma

Champion

If you are replacing any files within Splunk just be wary that you will need to replace these any time you upgrade Splunk - it will overwrite them each time otherwise.

0 Karma

Champion

Although Splunk updates the version of Python that ships with Splunk, as I understand it is still a custom build for Splunk and as such some libraries may not be updated or supported (I had some issues a year or so ago with a missing library).

For MS SQL connectivity, depending on what you want to do, you may find this app helpful;
http://splunk-base.splunk.com/apps/50803/splunk-db-connect

0 Karma

Path Finder

Thank you, Drainy. I am really new to Python.
I have found the way to solve the problem.

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!