Discussion:
Accessing SQL/MP using pyodbc.
(too old to reply)
Andrew
2013-04-09 18:30:06 UTC
Permalink
Hello,

I have been trying to access some of our SQL/MP databases using the non-stop odbc driver and the pyodbc api. I have been having problems with pyodbc and want to know if this is even possible? Have any of you got this working?

ODBC driver version: 2.10.20004.02

Pyodbc version: 3.0.6

Python version: 2.7

pyodbc error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pyodbc.Error: ('08001', "[08001] [Tandem][ODBC Driver] Unable to connect to data
source (10060) (SQLDriverConnect); [01000] [Microsoft][ODBC Driver Manager] The
driver doesn't support the version of ODBC behavior that the application reques
ted (see SQLSetEnvAttr). (0)")
Robert Hutchings
2013-04-09 20:14:03 UTC
Permalink
Hi..

Can you show us your "connect" statement, i.e.
"cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=localhost;DATABASE=testdb;UID=me;PWD=pass')"

or something like that...obviously you have a version mismatch somewhere between pyodbc/ODBC/NonStop SQL/MP...
Andrew
2013-04-09 21:30:26 UTC
Permalink
Hey Robert,

I have tried a few different methods of connections string and different API's which all give that same behavior error. Honestly the biggest question I have is if it's even possible to use python at all.

example:

db = pyodbc.connect('DRIVER={NonStop SQL};SERVER=10.10.10.10;DATABASE=my_nonstop_catl;UID=Andrew;PWD=12345')
Robert Hutchings
2013-04-09 22:41:15 UTC
Permalink
I am not sure about Python, although ODBC shouldn't really care about what language is used to create a connection. The NonStop OBBC Server product has a command-line interface called noscom (if memory serves..). There may be some informational commands that would help in this case...
Andrew
2013-04-09 23:53:46 UTC
Permalink
Hey Robert,

Some good news. I have got it running. I believe it was because I was using a very old version of the non-stop odbc driver. I added the new version and deleted all the DSNs and did the odbc test and it worked. Pyodbc is also working.

How do I flag post as fixed?
Robert Hutchings
2013-04-10 00:09:09 UTC
Permalink
Oh, cool! I don't know how to mark this as fixed...I guess people can just read the thread and see that it is fixed.

Good work Andrew!
Bill Honaker
2013-04-10 04:26:24 UTC
Permalink
One thing you could share for future reference is the versiosn of the
ODBC/MP server on NonStop and the ODBC Driver that worked. This
information is available in the softdocs for each version of the
server but it would help to know that this particular version works
with pyodbc. You already posted thy pyodbc version.

Thanks, and great work!



On Tue, 9 Apr 2013 16:53:46 -0700 (PDT), Andrew
Post by Andrew
Hey Robert,
Some good news. I have got it running. I believe it was because I was using a very old version of the non-stop odbc driver. I added the new version and deleted all the DSNs and did the odbc test and it worked. Pyodbc is also working.
How do I flag post as fixed?
Andrew
2013-04-10 19:05:08 UTC
Permalink
I used the following. I am not sure what version of odbc is running on our non-stop.

windows xp SP3 32bit
python 2.7 32bit
pyodbc-3.0.6.win32-py2.7
NonStop ODBC driver: 2.10.20508.18
SQL/MP version: A350
Robert Hutchings
2013-04-11 23:31:52 UTC
Permalink
OK, thanks Andrew.
UDAY
2021-04-14 13:04:32 UTC
Permalink
Post by Robert Hutchings
OK, thanks Andrew.
How can i get DRIVER={NonStop ODBC/MX 3.6} driver?
UDAY
2021-04-14 13:07:12 UTC
Permalink
I am getting error when using that NonStop Sql in driver field, help is very much aooreciated.
Randall
2021-04-14 19:05:53 UTC
Permalink
Post by UDAY
I am getting error when using that NonStop Sql in driver field, help is very much aooreciated.
Can you share the error that you are getting? I'm not sure help can be given if we don't know the error.
Bill Honaker
2021-04-14 19:11:55 UTC
Permalink
Post by UDAY
Post by Robert Hutchings
OK, thanks Andrew.
How can i get DRIVER={NonStop ODBC/MX 3.6} driver?
Can you provide more details? Based only on the thread this was posted in, are you looking for the OSS ODBC driver to run on the NonStop within Python?
Or are you looking for ODBC Drivers for Windows or Linux?

If it's the OSS driver it should be installed on your server along with SQL/MX. It should be documented in the manual, search the Nonstop Manuals at HPE.
Bill Honaker
2021-04-14 19:13:06 UTC
Permalink
Post by UDAY
Post by Robert Hutchings
OK, thanks Andrew.
How can i get DRIVER={NonStop ODBC/MX 3.6} driver?
Bill Honaker
2021-04-14 21:00:36 UTC
Permalink
Post by UDAY
Post by Robert Hutchings
OK, thanks Andrew.
How can i get DRIVER={NonStop ODBC/MX 3.6} driver?
The latest manual I found is this one: https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=c03682428

It is for 3.2.1, but the location and usage is the same, I believe.It says that the driver is ZODBCDLL and is in $SYSTEM.ZMXODBC...
However on the J series I just logged into it'sa actually YODBCDLL. It's probably different on L series.

I would suspect that a symbolic link might be installed in /usr/lib... But I don't see any signs of that.

If the version you have on your system is not 3.6, you will need to get the updated driver through HPE support. It has to be installed by your systems manager.
It's typically installed with an SPR or RVU, using Software Essentials.
UDAY
2021-04-15 13:56:46 UTC
Permalink
This post might be inappropriate. Click to display it.
UDAY
2021-04-15 14:11:24 UTC
Permalink
Post by UDAY
Post by UDAY
Post by Robert Hutchings
OK, thanks Andrew.
How can i get DRIVER={NonStop ODBC/MX 3.6} driver?
The latest manual I found is this one: https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=c03682428
It is for 3.2.1, but the location and usage is the same, I believe.It says that the driver is ZODBCDLL and is in $SYSTEM.ZMXODBC...
However on the J series I just logged into it'sa actually YODBCDLL. It's probably different on L series.
I would suspect that a symbolic link might be installed in /usr/lib... But I don't see any signs of that.
If the version you have on your system is not 3.6, you will need to get the updated driver through HPE support. It has to be installed by your systems manager.
It's typically installed with an SPR or RVU, using Software Essentials.
pyodbc.Error: ('01S00;,'[01S00] [Microsoft][ODBC Driver Manager] Invalid connection string attribute (0) (SQLDriverConnect)
is the error i am getting
import pyodbc
usr = "xxx"
pas = "xxx"
conn = pyodbc.connect('DRIVER={NonStop ODBC/MX 3.6};SERVER=TCP:127.0.0.1/18000;UID=%s;PWD=%s' % (usr,pas))
cursor = conn.cursor()
same thing replacing server ip:port , username and pwd
and i am able to connect to database using java and jdbc
Bill Honaker
2021-04-16 20:33:28 UTC
Permalink
Uday,

Thank you for finally telling us this is for a client on Windows.

The ODBC/MX Client Drivers manual should answer all your questions:

https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=a00090058en_us

Page 20 of the PDF tells you where on your NonStop you can find the client drivers, and details the installation procedures.
Verification of the install is desceribed at the bottom of page 23.

At the bottom of page 26, configuration of data sources is described for Windows.

On page 33, the Data Source configuration is described. There is no automated discovery for SQL/MX ODBC sources.
Your system managers will have to give you Network, Data Access, and credentials information.

I hope that the information in the Manual is helpful to you.
Bill
Post by UDAY
Post by UDAY
Post by Robert Hutchings
OK, thanks Andrew.
How can i get DRIVER={NonStop ODBC/MX 3.6} driver?
The latest manual I found is this one: https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=c03682428
It is for 3.2.1, but the location and usage is the same, I believe.It says that the driver is ZODBCDLL and is in $SYSTEM.ZMXODBC...
However on the J series I just logged into it'sa actually YODBCDLL. It's probably different on L series.
I would suspect that a symbolic link might be installed in /usr/lib... But I don't see any signs of that.
If the version you have on your system is not 3.6, you will need to get the updated driver through HPE support. It has to be installed by your systems manager.
It's typically installed with an SPR or RVU, using Software Essentials.
pyodbc.Error: ('01S00;,'[01S00] [Microsoft][ODBC Driver Manager] Invalid connection string attribute (0) (SQLDriverConnect)
is the error i am getting
import pyodbc
usr = "xxx"
pas = "xxx"
conn = pyodbc.connect('DRIVER={NonStop ODBC/MX 3.6};SERVER=TCP:127.0.0.1/18000;UID=%s;PWD=%s' % (usr,pas))
cursor = conn.cursor()
same thing replacing server ip:port , username and pwd
Loading...