DB2 - ODBC Connection protocol specific error code 10061 - db2

I installed DB2 FP 10.1 32-bit ODBC Driver on Windows 7 (64-bit) from the following URL
https://www-304.ibm.com/support/docview.wss?uid=swg21418043
I created a 'System DSN' and configured the following parameters
Hostname xxxxxx2x (DB2 server running on UNIX)
Port 5xxxx (Port is on state 'LISTENING')
Database dxxx
DBAlias dxxx
Protocol TCP / IP
And when I 'Connect' (Test Connection) from ODBC, I get the following error
SQL30081N A communication error has been detected.
Communication protocol being used: "TCP/IP". Communication API being used:
"SOCKETS". Location where the error was detected. Protocol specific error code(s) 10061. sqlstate=08001
To me settings are correct, not sure what am I missing

How did you create the System DSN? Windows 7 64-bit will create the DSN under the 64-bit ODBC Data Source Admin by default. I think I've had better luck creating it under the 32-bit version, which can be found at C:\Windows\SysWOW64\odbcad32.exe.

Related

Azure Data Factory - copy data from PostgreSQL on VM

I am trying to pull data from Postgresql on Azure using Azure Data Factory but have no luck. Both ADF and VM are in the same Azure Vnet.
In my VM networking settings I allowed port 5432 inbound access from ADF to VirtualNetwork. Similar outbound vnet to vnet.
I also installed ODBC driver on VM and added it to firewall.
I installed also the selfhosted integration runtime on VM which connects to ADF.
When creating a new Linked Service on ADF I chose PostgreSQL as source.
Not able to establish connection though.
Tried different settings:
-IP and DNS as servername
-self hosted and auto resolve integration runtime
-public and private IP
-no encryption and encryption
-temporarily turned off firewall on vm to test
still no success.
What am I missing?
password and database names are correct.
The error message I am getting when testing connection:
Error code
9603
Details
ERROR [08001] [Microsoft][ODBC PostgreSQL Wire Protocol driver]Connection refused. Verify Host Name and Port Number.
ERROR [HY000] [Microsoft][ODBC PostgreSQL Wire Protocol driver]Can't connect to server on 'xx.xxx.xxx.xx'
I would appreciate it if anyone could help.
Thank you
I found the solution. I need to use the ODBC connector as a linked service on ADF, not the PostgreSQL connector. Bingo!

SchemaCrawler Error opening socket to server DB2 database

I have tried to connect to a DB2 DB using the command line:
schemacrawler --server=db2 --host=*myhost* --port=*myport* --database=*db2database* --user=*myuser* --password=*mypassword* --info-level=minimum --command=list --log-level=CONFIG
I get the following error:
SchemaCrawler 16.11.7
Error: Could not connect to
jdbc:db2://pathtodb:retrieveMessagesFromServerOnGetMessage=true;, for
user 'user', with properties {}: [jcc][t4][2043][11550][4.28.11]
Exception java.net.ConnectException: Error opening socket to server
myserver on port myport with message: Connection timed out: connect. ERRORCODE=-4499, SQLSTATE=08001
I have the suspicion that there is a problem in the company's firewall that does not let me connect from SchemaCrawler. I can connect to the db with DBeaver from a virtual machine (Saas). Since DBeaver is running SaaS I do not have access to the VM and cannot test from there.
How could I check if the network is blocking SchemaCrawler requests from my local machine (Windows 10 Enterprise 1909)?
Windows-10 includes ping and tracert and nslookup tools (you run these in a CMD window). These ping and tracert may help you determine if there is IP-level connectivity between your Win10 box and the target Db2-server. Refer to any good textbook to learn how to use these tools.
Windows-10 also has its own software-firewall ( run from the start box if you search firewall) which needs you to add a rule to open the relevant port for tcp and udp traffic. Your login may need to have suitable permissions to make changes like this, so in some corporate environments access is restricted. If this is the case, open a ticket with relevant support teams, as that is not a matter for StackOverflow.
If adding such a rule does not fix your symptom, then you should contact the network support people in your company to open the relevant ports or provide another means for you to achieve the goal.
Note also that there are other tools (arguably better tools) to get a DDL report for a Db2 database, including the db2look utility which is present in the Db2 fat client, and also present on Db2-LUW servers. If the Db2-server runs on either i-series or Z/OS then other tools exist for those environments so talk with the relevant administrators.

How to update Pentaho Spoon JDBC drivers

I'm trying to connect to a postgresql 13 DB hosted on my computer using spoon.
I get the following error when trying to connect
Error connecting to database [DW] :org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
Error connecting to database: (using class org.postgresql.Driver)
The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.
org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
Error connecting to database: (using class org.postgresql.Driver)
The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.
I did some digging and that's due to an outdated JDBC driver. Can anyone help me update the driver? I have located the driver directory but the guide on the website https://help.pentaho.com/Documentation/5.4/0D0/160/030
is just crap, they require you to have a distribute-files.bat file? Which I couldn't find anywhere.
You do not have to follow all the steps. Just pasting the JAR file in the directory is enough.

password crypt authentication not supported error when connecting postgreSQL and automation anywhere

I am trying to connect Automation anywhere with postgreSQL For that I have created with all three below entries
Earlier , I was getting this error "test connection failed error in initializing provider. the specified dsn contains an architecture mismatch between the driver and application postgresql" when i was trying to connect 32 bit Automation anywhere to 64bit DNS, but after created 32 bit DNS and i am getting this error "password crypt authentication not supported".
Can anyone help me resolving this.
Thanks
Support for the insecure crypt password authentication method has been retired in PostgreSQL 8.4 in 2009.
I think you should use a less antique version of the ODBC driver.

connect failed with SQL-HY001

I am using Perl 5.14.2 on Ubuntu wheezy 64 bit.
I am trying to connect to a Pervasive SQL server v9.5 that is installed on a windows 2008 machine.
I tested the connection with isql and it works properly, I tested with the following command:
isql -v <db_name>
I use the DBD:ODBC v1.39 (latest version) perl module installed from cpan.
I am using the following command to connect to sql server:
use DBI;
my $db = DBI->connect('dbi:ODBC:Moked');
Moked is the connection name that was defined in the unixodbc v2.2.14 in odbc.ini.
/etc/odbc.ini
[Moked]
Driver=PERVASIVE_ODBC
Description=Pervasive ODBC Interface: Moked
ServerName=<ip>:<port>
DBQ=MIDA
UID=
PWD=
OpenMode=0
PvTranslate=
when I try to connect with the command i showed above I get error SQL-HY001 that by googling I understood that it relates to memory allocation, usually people get these while querying and not while trying to connect/
it seems that DBI does recognize the connection because if I type a different name, for example 'Moked2', i get the error SQL-IM002 instead.
any ideas?
how can I debug this issue further?
any information regarding the issue would be greatly appreciated.
thanks!
You are getting the memory allocation error because the PSQL v11 client cannot reliably connect to a PSQL v9.5 server. If you want to use the v11 client, you need the v11 server too. You might be able to get away with the v11 client at a Btrieve level but there were significant changes between v9 and v11 on the ODBC side.