(Migrated) Possibility of extending zato SQL connections to support mssql+pyodbc

(This message has been automatically imported from the retired mailing list)

Hi

I want to explore what will be required to get SQLServer supported in the
outgoing connections.

To start the discussion I would like to understand the current position on
supported connections.

It the list soley as a result of available services to test with, and need
to date or has some specific issue etc, come up in the past ?

I am hoping the former :wink:

I am starting to hunt down all the pieces required to achieve such a goal ,
such as

  • UI changes to support selection
  • tests
  • etc…

Any thoughts, comments welcome

T

On 23/03/15 04:34, Tim Hoffmn wrote:

To start the discussion I would like to understand the current position
on supported connections.

It the list soley as a result of available services to test with, and
need to date or has some specific issue etc, come up in the past ?

I am hoping the former :wink:

I am starting to hunt down all the pieces required to achieve such a
goal , such as

  • UI changes to support selection
  • tests
  • etc…

Hi Tim,

some time ago I was sent, in a private email, instructions regarding
what was needed to enable SQL Server in a user’s installation, here is a
verbatim copy:

https://gist.githubusercontent.com/dsuch/9a18aa95da3e711175dd/raw/16cd4a0ae8aae89263a114cd3baf7cbf41a7b0d6/sqlserver.txt

It’s pretty straightforward and resembles steps MySQL needed - simply
update a few lists/dicts containing information which databases are
supported.

Rafał Krysiak is currently working on Asible automation part of which
will include running Zato’s test suite against all of the databases
supported.

If you can confirm the steps above cover your needs, and possibly send a
pull request across, the tests will cover MS SQL as well so it will be
considered a supported database in 2.1.

Hi,
Been tinkering with this. The GUI accepts registering a MSSQL connection,
but ping fails with the following in the server.log:

2015-03-31 12:04:38,076 - =1B[1;33mWARNING=1B[0m - 3341:Dummy-1 -
SessionWrapper:22 - Could not ping:[testDB], session will be left
uninitialized, e:[Traceback (most recent call last):
File “/opt/zato/2.0.3/zato-server/src/zato/server/connection/sql.py”,
line 50, in init_session
self.pool.ping()
File “/opt/zato/2.0.3/zato-server/src/zato/server/connection/sql.py”,
line 143, in ping
self.engine.connect().execute(query)
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/en=
gine/base.py",
line 1890, in connect
return self._connection_cls(self, **kwargs)
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/en=
gine/base.py",
line 60, in init
self.__connection =3D connection or engine.raw_connection()
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/en=
gine/base.py",
line 1964, in raw_connection
return self.pool.unique_connection()
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/po=
ol.py",
line 280, in unique_connection
return _ConnectionFairy._checkout(self)
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/po=
ol.py",
line 645, in _checkout
fairy =3D _ConnectionRecord.checkout(pool)
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/po=
ol.py",
line 440, in checkout
rec =3D pool._do_get()
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/po=
ol.py",
line 964, in _do_get
return self._create_connection()
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/po=
ol.py",
line 285, in _create_connection
return _ConnectionRecord(self)
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/po=
ol.py",
line 411, in init
self.connection =3D self.__connect()
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/po=
ol.py",
line 539, in __connect
connection =3D self.__pool._creator()
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/en=
gine/strategies.py",
line 96, in connect
connection_invalidated=3Dinvalidated
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/ut=
il/compat.py",
line 199, in raise_from_cause
reraise(type(exception), exception, tb=3Dexc_tb)
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/en=
gine/strategies.py",
line 90, in connect
return dialect.connect(*cargs, **cparams)
File
"/opt/zato/2.0.3/eggs/SQLAlchemy-0.9.9-py2.7-linux-x86_64.egg/sqlalchemy/en=
gine/default.py",
line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
DBAPIError: (Error) (‘IM002’, ‘[IM002] [unixODBC][Driver Manager]Data
source name not found, and no default driver specified (0)
(SQLDriverConnect)’) None None

The data source does exist and works fine via isql and tsql outside of
Zato. Does Zato see /etc/freetds/ and /etc/odbc.ini ?

On Mon, Mar 23, 2015 at 6:12 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 23/03/15 04:34, Tim Hoffmn wrote:

To start the discussion I would like to understand the current position
on supported connections.

It the list soley as a result of available services to test with, and
need to date or has some specific issue etc, come up in the past ?

I am hoping the former :wink:

I am starting to hunt down all the pieces required to achieve such a
goal , such as

  • UI changes to support selection
  • tests
  • etc…

Hi Tim,

some time ago I was sent, in a private email, instructions regarding
what was needed to enable SQL Server in a user’s installation, here is a
verbatim copy:

https://gist.githubusercontent.com/dsuch/9a18aa95da3e711175dd/raw/16cd4a0=
ae8aae89263a114cd3baf7cbf41a7b0d6/sqlserver.txt

It’s pretty straightforward and resembles steps MySQL needed - simply
update a few lists/dicts containing information which databases are
supported.

Rafa=C5=82 Krysiak is currently working on Asible automation part of whic=
h
will include running Zato’s test suite against all of the databases
supported.

https://github.com/zatosource/zato-build

If you can confirm the steps above cover your needs, and possibly send a
pull request across, the tests will cover MS SQL as well so it will be
considered a supported database in 2.1.