Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
2180
views
LibreOffice Base ODBC connection to MariaDB fails: "Data source name not found"
Linux Mint 20 (Ubuntu 20). MariaDB version: "mariadb Ver 15.1 Distrib 10.7.3-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2" I want to run LibreOffice Base as the front end, using ODBC. I have tried to follow the MariaDB instructions [here][1]. I have put the file libmaodbc.so in /usr/lib...
Linux Mint 20 (Ubuntu 20).
MariaDB version:
"mariadb Ver 15.1 Distrib 10.7.3-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2"
I want to run LibreOffice Base as the front end, using ODBC.
I have tried to follow the MariaDB instructions here .
I have put the file libmaodbc.so in /usr/lib64/. I believe this is the main connector file.
I have made a file /etc/odbcinst.ini as follows:
[MariaDB]
Description=MariaDB Connector/ODBC v.3.0
Driver=/usr/lib64/libmaodbc.so
UsageCount=1
and a file /etc/odbc.ini as follows:
[localdb]
Description = MariaDB connection to database
Driver = MariaDB
Database = localdb
Server = localhost
User = root
Password = root
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
When I try to connect using LO Base, this ODBC entry "localdb" is seen. But then when I test out the connection I get:
"[unixODBC][Driver Manager]Data source name not found, and no default driver specified"
"Data source name"? "default driver"?
Anyone know what I should do? My theory is that the odbc.ini file references the odbcinst.ini file, which in turn drives the libmaodbc.so file.
NB if I go as far as trying to actually make the connection, i.e. to get a list of tables in the database in LO Base, I get
"The connection to the data source "xxx"* could not be established
[ma-3.1.15]Can't connect to local server through socket '/var/run/mysqld/mysqld.sock' (13)" \* i.e. the LO Base filename minus the ".odb" extension. And also to check my socket (with the MariaDB service running): mike@M17A:~/MariaDB_files$ netstat -ln | grep mysql unix 2 [ ACC ] STREAM LISTENING 263752 /var/run/mysqld/mysqld.sock ... interesting: seems to suggest that the socket is alive and well. Also I **can** connect using
[ma-3.1.15]Can't connect to local server through socket '/var/run/mysqld/mysqld.sock' (13)" \* i.e. the LO Base filename minus the ".odb" extension. And also to check my socket (with the MariaDB service running): mike@M17A:~/MariaDB_files$ netstat -ln | grep mysql unix 2 [ ACC ] STREAM LISTENING 263752 /var/run/mysqld/mysqld.sock ... interesting: seems to suggest that the socket is alive and well. Also I **can** connect using
isql localdb
from the CLI: doesn't this suggest things are set up OK?
mike rodent
(1172 rep)
Apr 1, 2022, 11:30 AM
• Last activity: Apr 28, 2025, 10:01 AM
0
votes
1
answers
1096
views
NetSuite 64bit ODBC Driver installation on Ubuntu 18.04 Cluster giving error:- Can't open lib '/opt/netsuite/odbcclient/lib64/ivoa27.so
Have been running around this issue since 2-3 days now with no luck. Hope someone guides me and help resolve this issue here. I am running a Python application from /home/admin/app/example.py directory in a 3 node Ubuntu 18.04 clustered environment which is supposed to connect to NetSuite via ODBC a...
Have been running around this issue since 2-3 days now with no luck. Hope someone guides me and help resolve this issue here.
I am running a Python application from /home/admin/app/example.py directory in a 3 node Ubuntu 18.04 clustered environment which is supposed to connect to NetSuite via ODBC and read list of tables. The code and directory setup is same across all 3 nodes. There's a load balancer routing request to all these 3 nodes.
Here's example how the connection is made via PyODBC module:
import pyodbc
cnxn = pyodbc.connect('DSN=NetSuite;UID=user;PWD=pass'.format(dsn, uid, pwd), autocommit=True)
cursor=cnxn.cursor()
tables_list = []
for row in cursor.tables():
tables_list.append(row.table_name)
print (tables_list)
However, while running the python application on cluster, I am always getting error as:- **Can't open lib '/opt/netsuite/odbcclient/lib64/ivoa27.so**; even though the driver file, all its dependencies (via ldd command) and all the path variables i.e. $LD_LIBRARY_PATH, $ODBCINI and $OASDK_ODBC_HOME exists and is set to be available system-wide (added under /etc/environment file) as below on all the 3 nodes:
> PYTHON_APP_HOME=/home/admin/app/
> LD_LIBRARY_PATH="/opt/netsuite/odbcclient/lib64"
> ODBCINI="/opt/netsuite/odbcclient/odbc64.ini"
> OASDK_ODBC_HOME="/opt/netsuite/odbcclient/lib64"
Here's the output from "ldd" command for driver dependencies:
-rwxr-xr-x 1 root root 3277375 Jul 25 16:03 ivoa27.so
/opt/netsuite/odbcclient/lib64$ ldd /opt/netsuite/odbcclient/lib64/ivoa27.so
linux-vdso.so.1 (0x00007fff401a2000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fee1d589000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fee1d385000)
libicuuc.so.42 => /opt/netsuite/odbcclient/lib64/libicuuc.so.42 (0x00007fee1d12b000)
libicudata.so.42 => /opt/netsuite/odbcclient/lib64/libicudata.so.42 (0x00007fee1c0e6000)
libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007fee1bed8000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fee1bcb9000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fee1b930000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fee1b592000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fee1b37a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fee1af89000)
/lib64/ld-linux-x86-64.so.2 (0x00007fee1db3c000)
libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x00007fee1ad60000)
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007fee1ab5b000)
Below is how the steps were performed as per Netsuite driver README.txt instructions and the ODBC driver is setup similarly across all the 3 nodes on Ubuntu 18.04 OS.
1) The Netsuite 64bit Linux driver files/folders are unpacked and copied at location:
**$cd /opt/netsuite/odbcclient/***. This entire dir,sub-dir & files within have both r+x permissions.
2) Installed libraries **$sudo apt install unixodbc && apt-get install unixodbc-dev**
3) Executed script/command provided by Netsuite from dir /opt/netsuite/odbcclient:- **$source oaodbc64.sh** (since it's a bash shell). This sets up the same variables as shown above.
4) From the same directory/folder ran below command for registering it as system-wide Driver:
> $**sudo odbcinst -i -d -f /opt/netsuite/odbcclient/odbcinst.ini**
which returned message as:
> odbcinst: Driver installed. Usage count increased to 1.
> Target directory is /etc
> odbcinst: Driver installed. Usage count increased to 1.
> Target directory is /etc
5) Then ran below command also for installing it as system DSN:-
> $**sudo odbcinst -i -s -l -f /opt/netsuite/odbcclient/odbc64.ini**
After this, checked /etc directory where both odbc.ini and odbcinst.ini files where created/registered. Both *.ini files were also given execute permissions to all.
-rwxr-xr-x 1 root root 500 Jul 24 10:31 odbc.ini
-rwxr-xr-x 1 root root 199 Jul 24 10:31 odbcinst.ini
$odbcinst -j
unixODBC 2.3.4
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /opt/netsuite/odbcclient/odbc64.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
$odbcinst -q -d
[ODBC Drivers]
[NetSuite ODBC Drivers 8.1]
$odbcinst -q -s
[NetSuite]
[ODBC]
I am also able to connect from each individual nodes via isql and also by running the example.py via python shell locally.
> $**isql -v 'NetSuite' 'user' 'pass'**
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
But when running the same on cluster, it gives same error always. Please help. I am sure am missing something.
Here's the output of odbc.ini and odbcinst.ini files from /etc directory:
/etc$ more odbcinst.ini
[ODBC Drivers]
NetSuite ODBC Drivers 8.1=Installed
UsageCount=1
[NetSuite ODBC Drivers 8.1]
APILevel=1
ConnectFunctions=YYN
Driver=ivoa27.so
DriverODBCVer=03.52
FileUsage=0
SQLLevel=1
UsageCount=1
/etc$ more odbc.ini
[ODBC Data Sources]
NetSuite=NetSuite ODBC Drivers 8.1
[NetSuite]
Driver=/opt/netsuite/odbcclient/lib64/ivoa27.so
Description=Connect to your NetSuite account
Host=XXXXX.connect.api.netsuite.com
Port=1708
ServerDataSource=NetSuite.com
Encrypted=1
Truststore=/opt/netsuite/odbcclient/cert/ca3.cer
CustomProperties=AccountID=XXXXX;RoleID=XXXX
[ODBC]
Trace=0
IANAAppCodePage=4
TraceFile=odbctrace.out
TraceDll=/opt/netsuite/odbcclient/lib64/ddtrc27.so
InstallDir=/opt/netsuite/odbcclient
Tried below other things that didn't work:
1) Added ODBC variable paths within .profile,.bashrc ,/etc/profile,/etc/bash.bashrc other than /etc/environment.
2) Changed the owner of /lib64/ folder and all files within it and *.ini files under /etc from root to admin.
3) By creating symbolic links:
sudo ln -s /etc/odbcinst.ini /usr/local/etc/odbcinst.ini
sudo ln -s /etc/odbc.ini /usr/local/etc/odbc.ini
Thanks !!
ManiK
(111 rep)
Jul 27, 2020, 06:12 AM
• Last activity: Nov 22, 2022, 08:42 PM
1
votes
0
answers
149
views
Mac OS - specified driver could not be loaded
**Objective** Goal is to use an odbc connection between bigquery and excel. However, excel can't find the driver per the error image below. **Steps taken so far**: 1. download odbc driver from [google partner][1] 2. download [odbc manager][2] > open odbc manager > under system dsn > the google bigqu...
**Objective**
Goal is to use an odbc connection between bigquery and excel. However, excel can't find the driver per the error image below. **Steps taken so far**: 1. download odbc driver from google partner 2. download odbc manager > open odbc manager > under system dsn > the google bigquery driver is chosen and several key value pairs are filled per this pg34 of this link. **Error**
First error
Second error follows first once click "ok"
Goal is to use an odbc connection between bigquery and excel. However, excel can't find the driver per the error image below. **Steps taken so far**: 1. download odbc driver from google partner 2. download odbc manager > open odbc manager > under system dsn > the google bigquery driver is chosen and several key value pairs are filled per this pg34 of this link. **Error**
First error


IOIOIOIOIOIOI
(111 rep)
May 29, 2022, 04:22 PM
1
votes
1
answers
131
views
ODBC connection from a Linux box to MS SQLServer
I need to connect to MS SQLServer from a Linux box using ODBC from a Qt application I am developing. So far I have installed the ODBC MS SQLServer driver and Kerberos on the Linux box. Using kinit I am able to get a ticket for my windows user (mvincent@mydomain.local). I am logged into the Linux box...
I need to connect to MS SQLServer from a Linux box using ODBC from a Qt application I am developing.
So far I have installed the ODBC MS SQLServer driver and Kerberos on the Linux box. Using kinit I am able to get a ticket for my windows user (mvincent@mydomain.local).
I am logged into the Linux box as a local user (mvincent@linuxbox).
I am unsure how to get a ticket from windows active directory for my linux box login as mvincent@linuxbox is not in Active Directory.
I am using
Trusted_Connection=yes
in my ODBC connection string. The MS SQLServer instance is configured to only use Windows authentication so I can't use Uid=xxx
and Pwd=ssss
in the connection string.
How can I connect to MS SQLServer in the above scenario?
Michael Vincent
(111 rep)
Sep 29, 2015, 10:33 AM
• Last activity: Mar 9, 2022, 05:27 PM
4
votes
1
answers
4093
views
Problems with unixODBC and SQLite
I installed unixodbc, sqlite3 and libsqliteodbc. odbcinst.ini looks like this: [SQLite] Description=SQLite ODBC Driver Driver=libsqliteodbc.so Setup=libsqliteodbc.so UsageCount=2 [SQLite3] Description=SQLite3 ODBC Driver Driver=libsqlite3odbc.so Setup=libsqlite3odbc.so UsageCount=1 odbc.ini looks li...
I installed unixodbc, sqlite3 and libsqliteodbc.
odbcinst.ini looks like this:
[SQLite]
Description=SQLite ODBC Driver
Driver=libsqliteodbc.so
Setup=libsqliteodbc.so
UsageCount=2
[SQLite3]
Description=SQLite3 ODBC Driver
Driver=libsqlite3odbc.so
Setup=libsqlite3odbc.so
UsageCount=1
odbc.ini looks like this:
[mysqlitedb]
Description=My SQLite database
Driver=SQLite3
Database=/my_database.db
When I test connection like this:
isql -v mysqlitedb
it says Connected!
But when I try a SELECT statement it says:
SQL> select * from user
[S1000][SQLite]no such table: user (1)
[ISQL]ERROR: Could not SQLPrepare
What is wrong?
I known the table: user is present, because I get results when I do this:
sqlite3 /my_database.db
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from user;
1|admin|password
Dánjal Salberg Adlersson
(429 rep)
Jan 31, 2014, 04:21 PM
• Last activity: Sep 1, 2021, 04:18 PM
0
votes
0
answers
40
views
Table relations in Base with ODBC connected SQlite ZeitgeistDB (Base tells not supported)
There aren't too many programs, that provide access to the ZeitgeistDB in Linux. Tracker-Needle in Debian isn't even available, anymore. So i thought i might use LibreOffice Base to access the DB and create my own queries and formulars. But to make that work, i first need to set relations. I would f...
There aren't too many programs, that provide access to the ZeitgeistDB in Linux. Tracker-Needle in Debian isn't even available, anymore. So i thought i might use LibreOffice Base to access the DB and create my own queries and formulars.
But to make that work, i first need to set relations. I would figure them out, but Base tells me that they aren't supported.
I frequently use ODBC connections and remember seeing some sort of options like enabling a foreign key. Actually that should be everything needed to set relations. But it won't work. I already tried to find all possible options, but couldn't find anything.
Is there any way to make that work?
[ZeitgeistDB]
Description=Zeitgeist
Driver=SQLite3
Database=/home/user/.data/zeitgeist/activity.sqlite
Timeout=100000
StepAPI=No
ShortNames=No
FKSupport=Yes
SyncPragma=NORMAL
JournalMode=DELETE
BigInt=No
LoadExt=
WGRM
(828 rep)
Jul 25, 2021, 01:46 AM
• Last activity: Jul 25, 2021, 04:32 AM
0
votes
1
answers
269
views
Help my Python script communicate from Linux to ODBC inside KVM/Windows
I'm using the module [pyodbc](https://github.com/mkleehammer/pyodbc) in a Python script to connect to the Intuit application QuickBooks over a network. To accomplish this I'm using an ODBC plugin/DLL called [QRemote](https://qodbc.com/using-quickbooks-remotely/). This is all very easy and straightfo...
I'm using the module [pyodbc](https://github.com/mkleehammer/pyodbc) in a Python script to connect to the Intuit application QuickBooks over a network. To accomplish this I'm using an ODBC plugin/DLL called [QRemote](https://qodbc.com/using-quickbooks-remotely/) .
This is all very easy and straightforward on Windows using the Anaconda distribution of Python with
pydobc
. The connection string uses a DSN configured in [Microsoft's ODBC Data Source Admin](https://docs.microsoft.com/en-us/sql/odbc/admin/odbc-data-source-administrator?view=sql-server-ver15) together with the IP address for the remote machine I am connecting to:
import pyodbc
cn = pyodbc.connect(r'DSN=remote_clientname; IPAddress=192.168.0.50; Port=4500; RemoteDSN=local_clientname; openMode=F; OLE DB Services=-2;', autocommit=True)
The problem I'm having is I'm trying to run this same code executed on the Linux (Debian Buster) machine to communicate with this third-party DLL only supported on Windows. It was suggested I could accomplish this using KVM virtualization on Debian.
The Python connection on MS box to MS ODBC is very easy with PyODBC (A).
This is my first time with KVM and I don't have a clue about how to target the same MS ODBC DSN from Python script on Debian (B)
What I've done:
- Install the Microsoft driver for [Debian](https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15)
- Completed a successful installation of KVM and installed Windows and the third-party plugin for ODBC.
- Installed [Microsoft ODBC driver for SQL Server Linux](https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15)
**UPDATE:**
I have a [supporting question on SE](https://stackoverflow.com/a/67351905/343215) where PyODBC contributor GordThompson says, _"We cannot connect from one machine (e.g., Linux) to an ODBC DSN entry on another machine."_
*What do I need to have a script communicate with ODBC inside KVM/Windows?* Can I create an API out of the script at location (A) which can act as a proxy between script (B) and Microsoft's ODBC Data Source Admin?

xtian
(593 rep)
Apr 28, 2021, 12:04 AM
• Last activity: Jun 7, 2021, 02:55 PM
0
votes
1
answers
422
views
No package available on installing php_odbc on Centos7.9
I am trying to install php_odbc using yum install. But it shows me the following. Loaded plugins: fastestmirror, universal-hooks Determining fastest mirrors epel/x86_64/metalink | 39 kB 00:00:00 * EA4: 103.72.162.35 * cpanel-addons-production-feed: 103.72.162.35 * cpanel-plugins: 103.72.162.35 * bas...
I am trying to install php_odbc using yum install. But it shows me the following.
Loaded plugins: fastestmirror, universal-hooks
Determining fastest mirrors
epel/x86_64/metalink | 39 kB 00:00:00
* EA4: 103.72.162.35
* cpanel-addons-production-feed: 103.72.162.35
* cpanel-plugins: 103.72.162.35
* base: mirror.netweaver.uk
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: mirror.launtel.net.au
* updates: centos.mirrors.telekom.ro
EA4 | 2.9 kB 00:00:00
cpanel-addons-production-feed | 2.9 kB 00:00:00
cpanel-plugins | 2.9 kB 00:00:00
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
mysql-connectors-community | 2.6 kB 00:00:00
mysql-tools-community | 2.6 kB 00:00:00
mysql57-community | 2.6 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/13): cpanel-addons-production-feed/x86_64/primary_db | 19 kB 00:00:00
(2/13): cpanel-plugins/x86_64/primary_db | 36 kB 00:00:00
(3/13): epel/x86_64/group_gz | 95 kB 00:00:00
(4/13): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(5/13): EA4/7/x86_64/primary_db | 1.4 MB 00:00:00
(6/13): mysql-connectors-community/x86_64/primary_db | 72 kB 00:00:00
(7/13): mysql-tools-community/x86_64/primary_db | 85 kB 00:00:00
(8/13): mysql57-community/x86_64/primary_db | 258 kB 00:00:00
(9/13): epel/x86_64/primary_db | 6.9 MB 00:00:00
(10/13): base/7/x86_64/group_gz | 153 kB 00:00:00
(11/13): extras/7/x86_64/primary_db | 224 kB 00:00:00
(12/13): base/7/x86_64/primary_db | 6.1 MB 00:00:01
(13/13): updates/7/x86_64/primary_db | 5.6 MB 00:00:03
No package php_odbc available.
Error: Nothing to do
Tried yum clean all but it shows the same error. Any help is appreciated.
It was a typo with php_odbc and php-odbc. But am still getting no package available.
Edit:
The following is the output for yum repolist
[root@server ~]# yum repolist
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 103.72.162.35
* cpanel-addons-production-feed: 103.72.162.35
* cpanel-plugins: 103.72.162.35
* base: miroir.univ-lorraine.fr
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: mirror.aktkn.sg
* updates: mirrors.piconets.webwerks.in
repo id repo name status
!EA4/7/x86_64 EA4 ( EasyApache 4 ) 4,017+761
!cpanel-addons-production-feed/x86_64 cPanel Addons Production Feed 68
!cpanel-plugins/x86_64 cPanel Plugins project 55
!base/7/x86_64 CentOS-7 - Base 10,032+40
!epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12,721+803
!extras/7/x86_64 CentOS-7 - Extras 451
!mysql-connectors-community/x86_64 MySQL Connectors Community 185
!mysql-tools-community/x86_64 MySQL Tools Community 123
!mysql57-community/x86_64 MySQL 5.7 Community Server 484
!updates/7/x86_64 CentOS-7 - Updates 1,635+5
repolist: 29,771
Prachi
(1 rep)
Feb 19, 2021, 02:06 PM
• Last activity: Feb 20, 2021, 09:50 AM
1
votes
0
answers
249
views
MariaDB connector (remote)
I'm new to databases and have some very basic how-to/where-to questions: 1. I have successfully setup a MariaDB + phpmyadmin on my raspberrypi zero (running the latest diet-pi), including a database with a couple of columns, which works like a charm. 2. Now, under Windows, I would like to import the...
I'm new to databases and have some very basic how-to/where-to questions:
1. I have successfully setup a MariaDB + phpmyadmin on my raspberrypi zero (running the latest diet-pi), including a database with a couple of columns, which works like a charm.
2. Now, under Windows, I would like to import the data into Matlab, using
adodb_connect()
, created by the community (link ), to analyze some data that I stored in the database. From the docs of that file:
> Package adodb_toolbox allows communication with different types of databases through Microsoft's ADO (ActiveX Data Objects) OLEDB component. The package was designed to work on Microsoft SQL Server, Oracle, Microsoft Access, MySQL and other databases.
However I can't find good and straightforward guide on how to install ODBC on my raspberry pi (as far as I understand MariaDB should, for all intents and purposes, classify as a 'MYSQL database'), this usually means I'm not following the most common implementations anymore, which is why I'm asking for some general questions (after reading/googling):
- Would you (e.g. a poweruser or expert) have advice on a more straight forward option to import the data to Matlab (or even Java, or even Windows) from my SQL database rather than this OLEDB interface? (the goal here is to make the database as accessible as possible)
- Is there a good guide or resource I should follow to install this (database connector or whatever would be more advisable) on my raspberry pi?
thanks!
user2305193
(143 rep)
Sep 30, 2020, 06:12 PM
2
votes
1
answers
2686
views
unixODBC: Cannot load libmaodbc.so
I'm working on an embedded platform and I am trying to access a MariaDB through unixODBC. Trying to test the connection with isql I get the response: isql -v mydsn myuser mypw [01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/libmaodbc.so' : file not found The file /usr/lib/libmaodbc.so exis...
I'm working on an embedded platform and I am trying to access a MariaDB through unixODBC.
Trying to test the connection with isql I get the response:
isql -v mydsn myuser mypw
[unixODBC][Driver Manager]Can't open lib '/usr/lib/libmaodbc.so' : file not found
The file /usr/lib/libmaodbc.so exists:
ls -la /usr/lib/libmaodbc.so
-r-xr-xr-x 1 root root 403952 Sep 1 00:00 /usr/lib/libmaodbc.so
So I figured a dependency must be missing.
readelf -d /usr/lib/libmaodbc.so
Dynamic section at offset 0x4fb54 contains 30 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libodbcinst.so.2]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3]
0x0000000e (SONAME) Library soname: [libmaodbc.so]
[...]
I repeated the check - all four dependencies exist.
Next I wrote a test program, which tries to load the shared objects:
#include
#include
void tryLoadSo(const std::string& path) {
void* so = dlopen(path.c_str(), RTLD_NOW);
if(so) {
std::cout << "Loaded " << path << "!" << std::endl;
dlclose(so);
} else {
std::cout << "Failed to load " << path << "!" << std::endl;
}
}
int main() {
tryLoadSo("/usr/lib/libmaodbc.so");
tryLoadSo("/usr/lib/libodbcinst.so.2");
tryLoadSo("/usr/lib/libm.so.6");
tryLoadSo("/usr/lib/libc.so.6");
tryLoadSo("/usr/lib/ld-linux-armhf.so.3");
}
Output:
Failed to load /usr/lib/libmaodbc.so!
Loaded /usr/lib/libodbcinst.so.2!
Loaded /usr/lib/libm.so.6!
Loaded /usr/lib/libc.so.6!
Loaded /usr/lib/ld-linux-armhf.so.3!
Thus all the dependencies can be loaded, but libmaodbc cannot.
Is the shared object not configured for the correct plattform? Yes, it is. I compared it to libodbcinst.so.2 to make sure:
readelf -h /usr/lib/libmaodbc.so
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: ARM
Version: 0x1
Entry point address: 0x9a58
Start of program headers: 52 (bytes into file)
Start of section headers: 402952 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 7
Size of section headers: 40 (bytes)
Number of section headers: 25
Section header string table index: 24
readelf -h /usr/lib/libodbcinst.so.2
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: ARM
Version: 0x1
Entry point address: 0x1e60
Start of program headers: 52 (bytes into file)
Start of section headers: 53528 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 6
Size of section headers: 40 (bytes)
Number of section headers: 24
Section header string table index: 23
What could be going wrong? Why won't libmaodbc.so load?
DrP3pp3r
(165 rep)
May 3, 2019, 11:48 AM
• Last activity: Jun 17, 2020, 04:45 PM
0
votes
1
answers
935
views
/etc/odbcinst.ini used by 64 and 32 bits applications
I have the following `/etc/odbcinst.ini` file [root@]# cat /etc/odbcinst.ini [FreeTDS] Description=FreeTDS odbc driver #Driver=/usr/lib/libtdsodbc.so.0 Driver=/usr/lib64/libtdsodbc.so.0 UsageCount=1 I have applications compiled for 64 and 32 bits. [root@]# ldd prog_32 | grep odbc libodbc.so.2 => /li...
I have the following
/etc/odbcinst.ini
file
[root@]# cat /etc/odbcinst.ini
[FreeTDS]
Description=FreeTDS odbc driver
#Driver=/usr/lib/libtdsodbc.so.0
Driver=/usr/lib64/libtdsodbc.so.0
UsageCount=1
I have applications compiled for 64 and 32 bits.
[root@]# ldd prog_32 | grep odbc
libodbc.so.2 => /lib/libodbc.so.2 (0xf7563000)
[root@]# ldd prog_64 | grep odbc
libodbc.so.2 => /lib64/libodbc.so.2 (0x00007f6087202000)
As you probably noticed I have 2 entries in odbcinst.ini
file for Driver, one for 32 bits and the other for 64. The problem is that if I run program compiled for 64 bits while the Driver is 32 bits or the other way around my program fails at run time with the error
OTL error message = [unixODBC][Driver Manager]Can't open lib '/usr/lib/libtdsodbc.so.0' : file not found
So I go and replace the Driver entry in the odbcinst.ini
until next time it will happen to me which is quite frequent.
Is there a way to use 64 bit drive for 64 bits applications and 32 bits driver for 32 bits application without needing to comment out the entry in the configuration file?
e271p314
(359 rep)
Feb 15, 2018, 09:13 AM
• Last activity: Apr 16, 2019, 01:40 PM
2
votes
1
answers
7768
views
Connect to MariaDB (mysql) and MS Access mdb databases via localhost using unixODBC on Debian?
I'm a relative linux newby just trying to move my computing from Windows 10 to Debian. I have been struggling to setup shared dual boot access to my MS Access data bases. I have found it very hard to get unixODBC to work with MariaDB (or MySQL), and so will share with you what works below, as I answ...
I'm a relative linux newby just trying to move my computing from Windows 10 to Debian. I have been struggling to setup shared dual boot access to my MS Access data bases. I have found it very hard to get unixODBC to work with MariaDB (or MySQL), and so will share with you what works below, as I answer my own question here.
Elliptical view
(4349 rep)
Oct 2, 2016, 07:19 PM
• Last activity: Sep 30, 2017, 06:15 PM
1
votes
1
answers
956
views
Install libmyodbc on Ubuntu Yakkety (16.10)
How do I install libmyodbc on Yakkety? It was in Xenial, but I'm getting `Package 'libmyodbc' has no installation candidate` any thoughts? It's necessary for another piece of software i'm trying to install.
How do I install libmyodbc on Yakkety? It was in Xenial, but I'm getting
Package 'libmyodbc' has no installation candidate
any thoughts? It's necessary for another piece of software i'm trying to install.
Marc
(111 rep)
Apr 16, 2017, 07:48 PM
• Last activity: Apr 17, 2017, 10:19 AM
2
votes
1
answers
1580
views
unixODBC 2.3.0 "_S_create_c_locale name not valid" error
I am attempting to setup HANA Smart Data Access on an SLES 11 sp3 environment. For HANA to communicate with external data sources unixODBC 2.3.0 is used along with Microsoft ODBC Driver 11 for SQL Server 2012 (as I am attempting to connect to a MS SQL server db). I have my odbc.ini and odbcinst.ini...
I am attempting to setup HANA Smart Data Access on an SLES 11 sp3 environment. For HANA to communicate with external data sources unixODBC 2.3.0 is used along with Microsoft ODBC Driver 11 for SQL Server 2012 (as I am attempting to connect to a MS SQL server db). I have my odbc.ini and odbcinst.ini in my /etc directory and .odbc.ini in my home directory. Based on all examples to date these appear to be configured correctly (at one point they were not and I received an appropriate error for them, this has been resolved.)
I am now receiving a new error, which is only returned when I attempt to connect to a datasource listed in my odbc.ini files:
"terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
Aborted"
So far my attempts to resolve this include altering the ssh_config file to prevent ssh sending my local environment variables, setting LC_ALL to en_US.UTF-8 and LANG=en_US, setting LC_ALL to c, and various combinations in between. I have verified with locale -a that en_US.UTF-8, POSIX, and c are all installed. I found a reference to an issue with boost here https://svn.boost.org/trac/boost/ticket/4688 however this is 5 years old and the impact is listed to sles 10, not 11.
CVT
(21 rep)
Jan 15, 2016, 07:23 PM
• Last activity: Mar 23, 2017, 11:40 AM
2
votes
1
answers
1025
views
Does SQLDriverConnect (from unix-odbc) cache the DSN data? If so, how can I clear/purge it?
While using the UNIX-ODBC libraries from [unixodbc][1] site, I'm facing a problem with the `SQLDriverConnect` api. If I try to connect to my database twice in a row, first with incorrect DSN data *(Data Source Name data, placed in the `/etc/odbc.ini` generally)* & second with correct data, the secon...
While using the UNIX-ODBC libraries from unixodbc site, I'm facing a problem with the
SQLDriverConnect
api.
If I try to connect to my database twice in a row, first with incorrect DSN data *(Data Source Name data, placed in the /etc/odbc.ini
generally)* & second with correct data, the second attempt to connect also fails. The reason for the failure seems to be that the SQLDriverConnect
seems to use the incorrect data fed to it in the first run.
After scouring the net for any mention of it caching the data, it seems no one else has come across this particular problem (or my search was inadequate).
The use-case for me is that I'm providing a GUI where the user can manually fill the form with all the parameters and then click on a 'Test Connection' button. This will write (or overwrite) the details into the /etc/odbc.ini
file, and then attempt to connect to the database using the unixodbc
apis. If the test succeeds, the connection string returned from the SQLDriverConnect
will be populated onto the GUI. If it fails the GUI will display the failure and allow the user to edit the data on the form and click 'Test Connection' button again.
Problem: If user enter some incorrect data (say port number), the test fails and the user rectifies the data. When the user now tries to test the connection it should pass, as all the data is correct and is also populating into the odbc.ini
file properly. Maddeningly, it fails for the second retest. However, sometimes a third or fourth retest onwards it is able to connect properly.
Note that the reconnects should ideally be in the single run of the program as a re-run of the program doesn't seem to surface the problem. This is important for me at the tests will be triggered from server-side and won't have the luxury of restarting.
----------
System Details
--------------
Below are the details of the systems used for development and execution of the sample later:
Developement Machine
CentOS release 6.1 (Final)
2.6.32-131.0.15.el6.i686 {32bit machine}
Deployment Machine (CentOS)
Linux release 6.6 (Final)
2.6.32-573.el6.x86_64 {64bit machine}
unixODBC 2.2.14
/usr/lib/psqlodbcw.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
.
.
Sample code
-----------
**Build** the code with the libodbc, as below:
> g++ -g -o code code.cpp -lodbc
**Note** that you may have to ensure that the included files and the libraries are in place.
#include "../boost_1_52_0/boost/property_tree/ptree.hpp"
#include "../boost_1_52_0/boost/property_tree/ini_parser.hpp"
#include
#include
#include
#include
#include
#include "../unixODBC-2.3.4/include/sql.h"
#include "../unixODBC-2.3.4/include/sqlext.h"
#include "../unixODBC-2.3.4/include/odbcinst.h"
using boost::property_tree::ptree;
using namespace std;
void PopulateINI(const string& iniName, vector >& data);
bool TestConnection(const string& connStringIn, string& connStringOut);
static void extract_error(char *fn, SQLHANDLE handle, SQLSMALLINT type);
void PrintIniFile(const string& iniName, const string& sDSN);
int main(int argc, char* argv[])
{
if (argc != 2)
{
cout > vData;
vData.push_back(make_pair(sDSN + ".Description", "Description"));
vData.push_back(make_pair(sDSN + ".Driver", "PostgreSQL"));
vData.push_back(make_pair(sDSN + ".Database", "dvdrental"));
vData.push_back(make_pair(sDSN + ".Servername", "192.168.45.217"));
vData.push_back(make_pair(sDSN + ".Port", "1234")); //INCORRECT PORT NUMBER; '1234' instead of '5432'
vData.push_back(make_pair(sDSN + ".UserName", "postgres"));
vData.push_back(make_pair(sDSN + ".Password", "postgres"));
vData.push_back(make_pair(sDSN + ".Trace", "Off"));
vData.push_back(make_pair(sDSN + ".TraceFile", "stderr"));
vData.push_back(make_pair(sDSN + ".Protocol", "7.0"));
vData.push_back(make_pair(sDSN + ".ReadOnly", "No"));
vData.push_back(make_pair(sDSN + ".RowVersioning", "No"));
vData.push_back(make_pair(sDSN + ".ShowSystemTables", "No"));
vData.push_back(make_pair(sDSN + ".ShowOidColumn", "No"));
vData.push_back(make_pair(sDSN + ".FakeOidIndex", "No"));
vData.push_back(make_pair(sDSN + ".ConnSettings", ""));
//Populate ini with Incorrect data
PopulateINI(iniName, vData);
sleep(5); //Just so I can see the ini file changing
//First run - Call SQLDriverConnect
PrintIniFile(iniName, sDSN);
sConnStrOut.clear();
if(TestConnection(sConnStrIn, sConnStrOut))
{
cout >& data)
{
cout >::iterator it = data.begin(); it != data.end(); ++it)
{
cout first second >& data)
{
ptree pt;
read_ini(iniName.c_str(), pt);
for(vector >::iterator it = data.begin(); it != data.end(); ++it)
{
pt.put(it->first.c_str(), it->second.c_str());
}
write_ini(iniName.c_str(), pt);
}
bool TestConnection(const string& connStringIn, string& connStringOut)
{
bool fRC = false;
SQLRETURN retcode;
SQLHENV env=NULL;
SQLHDBC dbc=NULL;
SQLSMALLINT siOutConnStrLen;
connStringOut.resize(2048);
SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env);
SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, (void *) SQL_OV_ODBC3, 0);
SQLAllocHandle(SQL_HANDLE_DBC, env, &dbc);
retcode = SQLDriverConnect(dbc, NULL, (SQLCHAR*)connStringIn.c_str(), SQL_NTS, (SQLCHAR*)&connStringOut.at(0), 2048, &siOutConnStrLen, SQL_DRIVER_NOPROMPT);
if(SQL_SUCCEEDED(retcode))
{
connStringOut.resize(siOutConnStrLen);
fRC = true;
if(retcode == SQL_SUCCESS_WITH_INFO)
{
cout ((sDSN + "." + "Description").c_str()) ((sDSN + "." + "Driver").c_str()) ((sDSN + "." + "Database").c_str()) ((sDSN + "." + "Servername").c_str()) ((sDSN + "." + "Port").c_str()) ((sDSN + "." + "UserName").c_str()) ((sDSN + "." + "Password").c_str()) ((sDSN + "." + "Trace").c_str()) ((sDSN + "." + "TraceFile").c_str()) ((sDSN + "." + "Protocol").c_str()) ((sDSN + "." + "ReadOnly").c_str()) ((sDSN + "." + "RowVersioning").c_str()) ((sDSN + "." + "ShowSystemTables").c_str()) ((sDSN + "." + "ShowOidColumn").c_str()) ((sDSN + "." + "FakeOidIndex").c_str()) ((sDSN + "." + "ConnSettings").c_str()) ./code 1
OR
> ./code 2
Outputs
-------
For the full run ./code 1
, below is the output.
Notice that before the second attempt to connect, the odbc.ini
has been modified and read to display the correct 'port number'.
[PostgresTest01]
Description : Description
Driver : PostgreSQL
Database : dvdrental
Servername : 192.168.45.217
Port : 1234
UserName : postgres
Password : postgres
Trace : Off
TraceFile : stderr
Protocol : 7.0
ReadOnly : No
RowVersioning : No
ShowSystemTables : No
ShowOidColumn : No
FakeOidIndex : No
ConnSettings :
Failed to connect:
The driver reported the following diagnostics whilst running SQLDriverConnect
08001:1:101:[unixODBC]Could not connect to the server;
Connection refused [192.168.45.217:1234]
Test connection failed for sConnStrIn[DSN=PostgresTest01;]
====================================================================
Updating ini file with correct data...
Waiting for 15 secs
====================================================================
[PostgresTest01]
Description : Description
Driver : PostgreSQL
Database : dvdrental
Servername : 192.168.45.217
Port : 5432
UserName : postgres
Password : postgres
Trace : Off
TraceFile : stderr
Protocol : 7.0
ReadOnly : No
RowVersioning : No
ShowSystemTables : No
ShowOidColumn : No
FakeOidIndex : No
ConnSettings :
Failed to connect:
The driver reported the following diagnostics whilst running SQLDriverConnect
08001:1:101:[unixODBC]Could not connect to the server;
Connection refused [192.168.45.217:1234]
Test connection failed for sConnStrIn[DSN=PostgresTest01;]
.
.
Notice that in the second attempt, although the ini reflects the correct data printed 15 secs before the connection is attempted, the error message shows that the connection is refused to port '1234'.
> Connection refused [192.168.45.217:1234]
.
.
----------
.
.
For the quick run ./code 2
, immediately following the first run, after which the ini holds the correct data, below is the output.
It succeeds in connecting.
[PostgresTest01]
Description : Description
Driver : PostgreSQL
Database : dvdrental
Servername : 192.168.45.217
Port : 5432
UserName : postgres
Password : postgres
Trace : Off
TraceFile : stderr
Protocol : 7.0
ReadOnly : No
RowVersioning : No
ShowSystemTables : No
ShowOidColumn : No
FakeOidIndex : No
ConnSettings :
Test connection succeeded.
Connection String is [DSN=PostgresTest01;DATABASE=dvdrental;SERVER=192.168.45.217;PORT=5432;UID=postgres;PWD=postgres;SSLmode=disable;ReadOnly=No;Protocol=7.0;FakeOidIndex=No;ShowOidColumn=No;RowVersioning=No;ShowSystemTables=No;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=255;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=0;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=0;UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0;LowerCaseIdentifier=0;]
.
.
Questions
--------
Reiterating the questions here.
1. Why does ./code 1
result in both connection tests to fail?
2. Is SQLDriverConnect
somehow caching the data inspite of proper
deallocation of handles between the connect attempts?
3. How can this supposed cache be cleared, so as to let the second subsequent attempt succeed?
4. If it is indeed a bug, is there a workaround to achieve the desired result in subsequent test within the same run of the program (*remember that the tests have to be triggered from a server, which can't restart*)?
.
.
Ramakant
(23 rep)
Dec 8, 2016, 04:08 PM
• Last activity: Dec 8, 2016, 05:20 PM
1
votes
2
answers
347
views
Install python library on non-default python version
The system (RHEL 6.5) already have python installed in `/usr/bin/python` I installed another version(3.3) in another directory `/data/tools/python3`, as I do not have root permission. Now, I have 2 problem. 1. How can I call python 3.3 seperately ? 2. How to add module (pypyodbc) to python3.3 ? I in...
The system (RHEL 6.5) already have python installed in
/usr/bin/python
I installed another version(3.3) in another directory /data/tools/python3
, as I do not have root permission.
Now, I have 2 problem.
1. How can I call python 3.3 seperately ?
2. How to add module (pypyodbc) to python3.3 ?
I intent to use she-bang for calling scripts in 3.3
PraveenMathew
(11 rep)
Nov 2, 2016, 06:45 PM
• Last activity: Nov 3, 2016, 04:13 PM
0
votes
1
answers
491
views
ODBC Authentication with .pem files on Ubuntu server with Python
Using the below 3 PEM files I am able to connected successfully to a MySQL database on windows threw setting up a Data Source. (No problems here) - client-key.pem - client-cert.pem - ca-cert.pem But I also want to be able to connect via Python code on an Ubuntu server 10.04. I have Python and the My...
Using the below 3 PEM files I am able to connected successfully to a MySQL database on windows threw setting up a Data Source. (No problems here)
- client-key.pem
- client-cert.pem
- ca-cert.pem
But I also want to be able to connect via Python code on an Ubuntu server 10.04. I have Python and the MySQL Python Connector setup. But as expected fails trying to connect with the credentials alone since authorisation threw these PEM certificates are required.
**>>>** import mysql.connector
**>>>** cnx = mysql.connector.connect(user='odbc_user', password='mypassword',host='00.00.000.000',database='mydb')
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.6/dist-packages/mysql/connector/__init__.py", line 179, in connect
return MySQLConnection(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/mysql/connector/connection.py", line 95, in __init__
self.connect(**kwargs)
File "/usr/local/lib/python2.6/dist-packages/mysql/connector/abstracts.py", line 719, in connect
self._open_connection()
File "/usr/local/lib/python2.6/dist-packages/mysql/connector/connection.py", line 210, in _open_connection
self._ssl)
File "/usr/local/lib/python2.6/dist-packages/mysql/connector/connection.py", line 144, in _do_auth
self._auth_switch_request(username, password)
File "/usr/local/lib/python2.6/dist-packages/mysql/connector/connection.py", line 177, in _auth_switch_request
**raise errors.get_exception(packet)
mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'odbc_user'@'hide.ec2' (using password: YES)**
**>>>**
What I have tried based on searches but with no progress:
- Copied the 3 **.pem** files to **/usr/share/ca-certificates/** as **.crt** files.
- Ran
sudo update-ca-certificates
which added these to the **/etc/ssl/certs/ca-certificates.crt** file.
I'm no Linux guru and just trying anything I come across so if someone has done this before I would much appreciate the help.
SupermanKelly
(1 rep)
Oct 19, 2016, 08:58 AM
• Last activity: Oct 19, 2016, 02:01 PM
1
votes
0
answers
173
views
unixODBC and iODBC installed at the same time?
Is there any conflict with having unixODBC and iODBC installed at the same time? (It seems that some programs might depend on one or the other, at least if I try to uninstall iODBC, it also wants to unistall a bunch of other things like calligra and kexi.) I'm having trouble getting LibreOffice to c...
Is there any conflict with having unixODBC and iODBC installed at the same time?
(It seems that some programs might depend on one or the other, at least if I try to uninstall iODBC, it also wants to unistall a bunch of other things like calligra and kexi.)
I'm having trouble getting LibreOffice to connect using ODBC to either a MariaDB or MDBTools database, that is without crashing.
See full report and question here .
Elliptical view
(4349 rep)
Oct 10, 2016, 03:56 AM
0
votes
1
answers
1022
views
FreeTDS missing encryption support to connect to MS SQL
I'm running a Gentoo Linux and I'm trying to connect to MS SQL via `pyodbc` using `freetds`. I enabled the debug log in `freetds`. Now when I try to connect I'm seeing this: 18:13:00.841828 13523 (net.c:270):tds_open_socket: connect(2) returned "Operation now in progress" 18:13:00.955976 13523 (net....
I'm running a Gentoo Linux and I'm trying to connect to MS SQL via
pyodbc
using freetds
.
I enabled the debug log in freetds
. Now when I try to connect I'm seeing this:
18:13:00.841828 13523 (net.c:270):tds_open_socket: connect(2) returned "Operation now in progress"
18:13:00.955976 13523 (net.c:310):tds_open_socket() succeeded
18:13:00.955996 13523 (util.c:156):Changed query state from DEAD to IDLE
18:13:00.956017 13523 (net.c:741):Sending packet
0000 12 01 00 34 00 00 00 00-00 00 15 00 06 01 00 1b |...4.... ........|
0010 00 01 02 00 1c 00 0c 03-00 28 00 04 ff 08 00 01 |........ .(......|
0020 55 00 00 02 4d 53 53 51-4c 53 65 72 76 65 72 00 |U...MSSQ LServer.|
0030 d3 34 00 00 - |.4..|
18:13:01.190745 13523 (net.c:555):Received header
0000 04 01 00 25 00 00 01 00- |...%....|
18:13:01.190772 13523 (net.c:609):Received packet
0000 04 01 00 25 00 00 01 00-00 00 15 00 06 01 00 1b |...%.... ........|
0010 00 01 02 00 1c 00 01 03-00 1d 00 00 ff 0a 32 10 |........ ......2.|
18:13:01.190781 13523 (login.c:1057):detected flag 3
18:13:01.190783 13523 (login.c:1068):server required encryption but support is not compiled in
18:13:01.190785 13523 (login.c:466):login packet rejected
18:13:01.190821 13523 (util.c:156):Changed query state from IDLE to DEAD
This sounds like the support for some encryption is missing, but I don't know which one. My freetds
is complied with these configure parameters:
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --libdir=/usr/lib64 --with-tdsver=7.0 --enable-msdblib --enable-odbc --with-unixodbc=/usr --enable-krb5
As far as I know it's using libkrb5
for the encryption. These are the configure flags for my libkrb5
:
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --without-ldap --without-tcl --enable-pkinit --enable-thread-support --without-hesiod --enable-shared --with-system-et --with-system-ss --enable-dns-for-realm --enable-kdc-lookaside-cache --with-system-verto --disable-rpath --with-pkinit-crypto-impl=openssl
Does somebody know which configure flags I'm missing to be able to connect to MS SQL?
replay
(8723 rep)
Sep 24, 2015, 04:17 PM
• Last activity: Sep 24, 2015, 05:50 PM
Showing page 1 of 19 total questions