[DataDirect][ODBC lib] Driver Manager Message file not found. Please check for the value of InstallDir in your odbc.ini in Informatica - odbc

I am using informatica, I have Singlestore DB which I am trying to connect.
I am able to login to singelstore DB using Singlestore ODBC Driver as below.
Singlestore version:8.0.5
SS ODBC Driver version: 1.1.1
Singlestore is self managed.
[abc#rnd-2 ~]$ isql SingleStore-server
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> ^C
While I am trying to connect informatica with Singlestore using ODBC Connection, I am gettion error:
Message Code: WRT_8001
Message: Error connecting to database...
WRT_8001 [Session s_test Username dev DB Error -1
[DataDirect][ODBC lib] Driver Manager Message file not found. Please check for the value of InstallDir in your odbc.ini.
Database driver error...
Function Name : Connect
Database driver error...
Function Name : Connect
Database Error: Failed to connect to database using user [dev] and connection string [SingleStore-server].]Message Code: WRT_8001
Message: Error connecting to database...
WRT_8001 [Session s_test Username dev DB Error -1
[DataDirect][ODBC lib] Driver Manager Message file not found. Please check for the value of InstallDir in your odbc.ini.
Database driver error...
Function Name : Connect
Database driver error...
Function Name : Connect
Database Error: Failed to connect to database using user [dev] and connection string [SingleStore-server].]
My location of odbc.ini file: /etc/odbc.ini
odbc.ini
[SingleStore_server]
Description=SingleStore server
Driver=/home/abc/singlestore-connector-odbc-1.1.1-centos7-amd64/libssodbca.so
SERVER=<>
USER=<>
PASSWORD=<>
DATABASE=<>
PORT=<>
I added path in .bash_profile, but still getting same error:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ODBCINI=/etc/odbc.ini
Pls let me know how to resolve this error.
Ref link: https://knowledge.informatica.com/s/article/577839?language=en_US
https://knowledge.informatica.com/s/article/Error-connecting-to-database-DataDirect-ODBC-lib-Driver-Manager-Message-file-not-found-Please-check-for-the-value-of-InstallDir-in-your-odbc-ini-while?language=en_US
https://docs.singlestore.com/managed-service/en/developer-resources/connect-with-application-development-tools/connect-with-odbc/the-singlestore-odbc-driver.html

Reg export ODBCINI=/etc/odbc.ini, I have seen Informatica always use their ODBC drivers. Can you please check if you have single store drivers available in /<INFA_HOME>/ODBCX.version/odbc.ini​ file? If yes, i highly recommend to use it.
If yes, please see if you can test the ODBC driver with Infa provided tool $INFA_HOME/tools/debugtools/ssgodbc -d dsn -u username -p password [-v] against your DB. This will ensure you have no issues with ODBC setup.
You can find all about this here link.
If no, then, pls make sure you have installed correct version single store ODBC drivers (32 or 64 bit) and Informatica user have RWX permission on them. Then,
Add the driver path to LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$HOME/server_dir:$ODBCHOME/lib;
set ODBCINI=/etc/odbc.ini
grant access - chmod 777 /etc/odbc.ini
see if the tool ssgodbc is able to establish connection.

Please see the following examples of integrating SingleStore data with Informatica:
JDBC - https://www.cdata.com/kb/tech/singlestore-jdbc-informatica-cloud.rst
ODBC - https://www.cdata.com/kb/tech/singlestore-odbc-informatica.rst

Related

How to connect PostgreSQL installed on ubuntu using R

I have installed the Ubuntu postgreSQL very quickly, using the following command,
$sudo apt install postgresql postgresql-contrib
And I login into the database using he following command,
$sudo -i -u postgres
$psql
Then I create the table and index of my database in it. I can see that the database is correctly imported, and have index created, and the database is ready to go.
But the problem is in the R program, I use the library(RPostgreSQL) to connect to the database, I have filled the connection details as follows,
connection <- dbConnect(driver, dbname='testchr22', host='localhost', port=5432, user= 'postgres', password='')
But all the connection failed.
But my problem is the database connection always have problems, I didn’t set up the password, I don’t know what password should include.
I have always encounter the following errors, forever, and don't know where I got it wrong.
Error in postgresqlNewConnection(drv, ...) : RS-DBI driver: ()
Calls: batchAnnotate -> dbConnect -> dbConnect -> postgresqlNewConnection
Execution halted

Pyodbc connection to Azure Synapse fails

I am using pyodbc to connect to an azure synapse db from a centos box.
I get
"Unable to set SQL_ATTR_CONNECTION_POOLING attribute"
right from the pyodbc.connect() method.
I did try to set pyodbc.pooling = False, before trying to get the connection, but then I get
"'utf-8' codec can't decode byte 0xf5 in position 2: invalid start byte"
which is weird since I am not executing any query, just pyodbc.connect(...)
I also tried to set odbc trace but I get nothing in the log...
Here's my env:
OS: CentOS Linux release 7.5.1804 (Core)
Python: Python 3.7.4
Pyodbc: Version: 4.0.30
ODBC: unixODBC 2.3.7
odbcinst.ini:
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.6.so.1.1
UsageCount=1
Is there a way to troubleshoot ?
Forgot to mention that I get the same message if I use the wrong driver name, or any of the other connection params.
thank you in advance
We are glad to hear that the error is solved.
For details, please see the GitHub here:
https://github.com/mkleehammer/pyodbc/issues/847#issuecomment-733087938

"[unixODBC][Driver Manager]Data source name not found, and no default driver specified" despite /etc/odbc.ini having the DSN

Getting the "[unixODBC][Driver Manager]Data source name not found, and no default driver specified" despite /etc/odbc.ini having the DSN referenced in the connection string. Why would this be happening and what can be done?
Trying to set up pyodbc for connecting to MSSQLServer using the docs (centos 7). Yet, when trying to actually connect to the database,
import pyodbc
# setup db connection
server = 'myserver'
database = 'mydb'
username = 'myusername'
password = 'mypassword'
cnxn_str = 'DSN=MyMSSQLServer;DATABASE='+database+'UID='+username+'PWD='+password+'MultipleActiveResultSets=True;'
cnxn = pyodbc.connect(cnxn_str)
getting error "[unixODBC][Driver Manager]Data source name not found, and no default driver specified", even though when running:
[mapr#mnode01 ~]$ cat /etc/odbc.ini
[MyMSSQLServer] Driver=ODBC Driver 13 for SQL Server
Description=My MS SQL Server
Trace=No
Server=<now using my sql server ip>
I can see that the DSN that I referenced in the python code is recorded in the /etc/odbc.ini file. Does anyone know what could be going on here? Thanks.
Note: I initially ran the pyodbc setup exactly as specified in the docs, but later re-did this step to use the ip address of the sql server I wanted to connect to:
vi /home/user/odbcadd.txt
[MyMSSQLServer] Driver = ODBC Driver 13 for SQL Server
Description = My MS SQL Server
Trace = No
Server = <my sql server ip>
and just re-ran the write to odbc.ini:
sudo odbcinst -i -s -f /home/user/odbcadd.txt -l
The solution commented by user Gord Thompson solved my problem. The ~/odbcadd.txt file that I was using to fill the /etc/odbc.ini file needed to have the 'Driver=' line on a separate line from the DSN to look like:
[mapr#mnode01 ~]$ cat /etc/odbc.ini
[MyMSSQLServer]
Driver=ODBC Driver 13 for SQL Server
Description=My MS SQL Server
Trace=No
Server=172.18.4.38

connect to FileMaker Server with pyodbc

I have a FileMaker db running on FileMaker Server 14 on a Mac Mini and I'm trying to get at it with pyodbc. It's not going well.
First, what works:
telnet 192.169.19.3 2399
ssh Name#192.169.19.3
tsql -H FM-Server -p 2399 -U Name -P pwd
One weird thing about that last one is that it gives me a seconds counter:
1
2
not a prompt, although I can still type commands in. I'm not sure what that means and couldn't find any info about it.
Now, what doesn't work:
tsql -LH 192.169.19.3
tsql -LH FM-Server
isql FM-Server Name pwd
No listed info for the FileMaker Server, isql gives me [ISQL]ERROR: Could not SQLConnect which is just so helpful you know
One issue is that at this point I've sort of forgotten if I should be using FM ODBC or FreeTDS as my driver in pyodbc, luckily neither of them work:
>>> c = pyodbc.connect("DRIVER={FreeTDS};DSN=FM-Server;UID=Name;PWD=pwd")
pyodbc.Error: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)')
>>> c = pyodbc.connect("DRIVER={FileMaker ODBC};DSN=FM-Server;UID=Name;PWD=pwd")
pyodbc.Error: ('08S01', '[08S01] [unixODBC][FileMaker][FileMaker ODBC] Failed to connect to listener (2) (65535) (SQLDriverConnect)')
Giving it just the DSN freezes the window. Here's my configs:
odbc.ini | /usr/local/Cellar/unixodbc/2.3.4/etc/odbc.ini
[FM-Server]
Driver = FreeTDS
Host = 192.169.19.3
ServerName = FM-Server
UID = Name
PWD = pwd
Port = 2399
odbcinst.ini | /usr/local/Cellar/unixodbc/2.3.4/etc/odbcinst.ini
[ODBC Drivers]
FileMaker ODBC = Installed
FreeTDS = Installed
[FileMaker ODBC]
Driver = /Library/ODBC/FileMaker ODBC.bundle/Contents/MacOS/fmodbc.so
Setup =
[FreeTDS]
Description = FreeTDS
Driver = /usr/local/Cellar/freetds/1.00.9/lib/libtdsodbc.0.so
Setup = /usr/local/Cellar/freetds/1.00.9/lib/libtdsodbc.0.so
UsageCount = 1
freetds.conf | /usr/local/Cellar/freetds/1.00.9/etc/freetds.conf
[FM-Server]
host = 192.169.19.3
port = 2399
tds version = 8.0
Any info is much appreciated and shout to the resources here, here, and elsewhere for helping me get even this far.
I was able to solve this with the following, slightly abbreviated
brew uninstall freeDTS
brew uninstall unixODBC
pip uninstall pyodbc
re-installed pyodbc with ActualTech's installer (not sure if necessary): http://www.actualtech.com/python-osx-odbc.php
switched my odbc.ini to read "Driver=FileMaker ODBC" instead of "Driver=freeTDS" but given the code I actually ran I'm not that that's necessary:
python
import pyodbc
c = pyodbc.connect("DRIVER={FileMaker ODBC};SERVER=192.169.19.3;PORT=2399;UID=Name;PWD=pwd")
and magically that worked. idk man

Is there any CLI way to show information about Glassfish JDBC connection pool?

The only relevant command that I found is:
NAME
list-jdbc-connection-pools - lists all JDBC connection pools
EXAMPLES
This example lists the existing JDBC connection pools.
asadmin> list-jdbc-connection-pools
sample_derby_pool
__TimerPool
Command list-jdbc-connection-pools executed successfully.
What I want is to display the information about particular connection pool. Such as:
asadmin desc-jdbc-connection-pool sample_derby_pool
name: sample_derby_pool
databaseName: oracle
portNumber: 1521
serverName: test
user: testUser
...
Try running:
asadmin get * | more
The above command will display all GlassFish attributes. Pipe it to grep to get just the pool properties you are interested in:
asadmin get * | grep TimerPool
Hope this helps.

Resources