I am on Mariadb 10.4.13 and am trying to pull data from an MSSQL 2016 standard edition server. I downloaded and installed unixODBC and configured the CONNECT engine plugin using the instructions on - https://mariadb.com/resources/blog/getting-microsoft-sql-server-data-into-mariadb-with-the-connect-storage-engine/
When I try to connect from Mariadb to MSSQL to pull data, it fails with "Login Timeout Expired" error.
The UnixODBC driver is working, as I am able to make the connection thru sqlcmd. Its just not working thru MariaDB database and CONNECT engine. Can you please help?
Thanks
[root@stage plugin]# cat /etc/odbcinst.ini
[SQL Server Native Client 11.0]
Description=Microsoft SQL Server ODBC Driver V1.0 for Linux
Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0
Threading=1
UsageCount=1
[root@stage sqlncli-11.0.1790.0]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2327
Server version: 10.4.13-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use mdtest;
Database changed
MariaDB [mdtest]> CREATE TABLE temp_BB ENGINE=CONNECT tabname='temp_BB' CONNECTION='Driver=SQL Server Native Client 11.0;Server=10.10.x.x;Database=ACS_test;UID=yser1;PWD=mypass' TABLE_TYPE='ODBC' ;
ERROR 1105 (HY000): SQLDriverConnect: [unixODBC][Microsoft][SQL Server Native Client 11.0]Login timeout expired
MariaDB [mdtest]>
[root@stage-app-1 plugin]# sqlcmd -D -S c-mssql -U user1 -d ACS_test -P mypass -Q "select count(*) from temp_bb;"
-----------
108
(1 rows affected)
[root@stage-app-1 plugin]# cat /etc/odbc.ini
[c-mssql]
Description=Microsoft SQL Server ODBC Driver V1.0 for Linux
Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0
Server=10.10.x.x
Port=1433
NeedODBCTypesOnly = 1
[root@stage-app-1 plugin]#
Its just failing with the Login Timeout Expired error when connecting thru MariaDB. Can you please help?
Thanks