Written by

Question Yakov Berger · Nov 21, 2023

Configure SQL.OutboundAdapter to SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

Hi,

DBA has asked me to configure a working Business Operation using a SQL.OutboundAdapter (connecting to external MSSQL server) to run as TRANSACTION ISOLATION LEVEL READ UNCOMMITTED.

I would like help with an example of how this is done.

Thanks

Product version: IRIS 2023.1

Comments

Cristiano Silva · Nov 21, 2023

Hi Yakov,

You can set in the Connection String (JDBC) or using the adapter method SetConnectAttr

Check the database documentation to see the rigth values.

0
Yakov Berger  Nov 21, 2023 to Cristiano Silva

Thanks

can you provide an example of code ?

from the documentation i am not clear of the exact syntax.

0
Tani Frankel  Nov 23, 2023 to Yakov Berger

Hi Yakov,

You can see from the Docs here, for example re the Property ConnectAttrs (or later ConnectionAttributes):

ConnectAttrs

...

An optional set of SQL connection attribute options. For ODBC, they have the form:

attr:val,attr:val

For example, AutoCommit:1.

...

Set this property in the OnInit() method of your business operation or business service to specify the options to use at connection time.

For calling SetConnectAttr() see these Docs, for example:

If the connection has already been established, call the SetConnectAttr() method of the adapter. This method takes two arguments (the attribute name and the desired value) and returns a status. For example:
Set tout= ..Adapter.SetConnectAttr("querytimeout",10)

As to the name of the attribute and the appropriate value you should consult the SQL Server documentation (for example this, but this will be up to you to verify).

If you need more assistance than this please get in touch and we can work on this together.

0
Yakov Berger  Nov 28, 2023 to Tani Frankel

Hi Tani,

Will be in touch.

Thanks

0