0

I am setting up Sphinxsearch for Linux, also I have remote MSSQL Server. I have installed unixODBC and freetds accroding to documentation.

odbcinst.ini file:

[FreeTDS]
Description=v0.63 with protocol v7.3
Driver = /usr/local/lib/libtdsodbc.so
FileUsage = 1
CPTimeout = 5

odbc.ini file:

    [Sphinx]
    Driver = FreeTDS
    Description = MS-SQL
    Trace = No
    #Servername = mssql02
    Server = XX.XX.XX
    Port = 1433
    Database = DBNAME

    [Default]
    Driver = /usr/local/lib/libtdsodbc.so

freetds.conf file:

    [mssql02]
    host = XX.XX.XX
    port = 1433
    tds version = 7.3
    instance = MSSQL02

And the last but not least sphinx.conf file:

    source test
    {
    type            = odbc
    sql_host        = XX.XX.XX
    sql_user        = USERNAME
    sql_pass        = PASS
    sql_db          = DBNAME
    sql_port        = 1433
    odbc_dsn = DSN=Sphinx;Driver={/usr/local/etc/odbc.ini};Uid=USERNAME;Pwd=PASS
    ...more_config...
}

When using following command

indexer --all 

I get the following message:

ERROR: source 'test': unknown type 'odbc'; skipping.

Nevertheless isql command works fine:

$ isql Sphinx LOGIN PASS
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

What am I doing wrong? Any advice is appreciated.

Somchai
  • 21
  • 4
  • Make sure your Sphinx version supports odbc. What's that? Did you compile it yourself or where did you get it? – Manticore Search Apr 26 '19 at 01:43
  • Manticore Search, I have installed it in 2 ways: 1. sudo apt install sphinxsearch 2. Downloaded and untar from official webpage. Same error with 2 installs. – Somchai Apr 26 '19 at 07:31
  • UPD: searchd --version Sphinx 2.2.11-id64-release (95ae9a6) Copyright (c) 2001-2016, Andrew Aksyonoff Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com) I will try to download the latest version of sphinx - 3.1.1. Lets see how it works. – Somchai Apr 26 '19 at 07:43

1 Answers1

1

May this can be helpful for someone. The sphinxsearch version that I used was downloaded from ubuntu repos --version 2.2.11 I downloaded newest version from website --version 3.1.1 (commit 612d99f), it supports ODBC type. Now everything works fine! Thanks!

Somchai
  • 21
  • 4