Search code examples
sql-serversphinx

Sphinxsearch + SQL Server = unknown type 'mssql'; skipping


I'm trying to index some data from SQL Server and getting no luck with that:

Ubuntu 16.04

apt-get install sphinxsudo add-apt-repository ppa:builds/sphinxsearch-rel22
apt-get update
apt-get install sphinxsearch

/etc/sphinxsearch/sphinx.conf

source src1
{
        # data source type. mandatory, no default value
        # known types are mysql, pgsql, mssql, xmlpipe, xmlpipe2, odbc
        type = mssql

        #####################################################################
        ## SQL settings (for 'mysql' and 'pgsql' types)
        #####################################################################

        # some straightforward parameters for SQL source types
        sql_host = 192.168.*.*
        sql_user = ****
        sql_pass = ****
        sql_db   = DatabaseName
        sql_port = 1433  # optional, default is 3306
        ...
}

indexer --all

Sphinx 2.2.9-id64-release (rel22-r5006)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'test1'...
ERROR: source 'src1': unknown type 'mssql'; skipping.
ERROR: index 'test1': failed to configure some of the sources, will not index.

After all I've tried to compile sphinx from sources but there is no with-mssql option available in configure file:

 Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-debug            compile slower debug version (default is disabled)
  --with-assert           compile optimized build but with debugging
                          assertions (default is disabled)
  --with-mysql            compile with MySQL support (default is enabled)
  --with-static-mysql     link statically with MySQL library (default is no)
  --with-mysql-includes   path to MySQL header files
  --with-mysql-libs       path to MySQL libraries
  --with-syslog           compile with possibility to use syslog for logging
                          (default is yes)
  --with-pgsql            compile with PostgreSQL support (default is
                          disabled)
  --with-static-pgsql     link statically with PostgreSQL library (default is
                          no)
  --with-pgsql-includes   path to PostgreSQL header files
  --with-pgsql-libs       path to PostgreSQL libraries
  --with-libstemmer       compile with libstemmer support (default is
                          disabled)
  --with-libexpat         compile with expat XML library suppport (default is
                          autodetect)
  --with-re2              compile with RE2 library support (default is
                          disabled)
  --with-re2-includes     path to RE2 header files
  --with-re2-libs         path to RE2 libraries
  --with-rlp              compile with RLP library support (default is
                          disabled)
  --with-iconv            compile with iconv support (default is autodetect)
  --with-unixodbc         compile with UnixODBC support (default is
                          autodetect)

Is there any chance to make sphinxsearch be able to index data from SQL Server? Thank you for your attention and answers! Have a nice day!


Solution

  • I think MSSQL driver only works on windows builds. Historically MSSQL wasnt available for linux, so the driver never been implemented on linux.

    Maybe can use the ODBC driver (which I think is http://www.unixodbc.org/)

    found this: http://www.unixodbc.org/doc/FreeTDS.html