You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by "Liu, Yuan (Yuan)" <yu...@esgyn.cn> on 2018/01/23 03:29:45 UTC

Set autocommit to OFF in db level

Hi Trafodioneers,

As I know we can use "set transaction autocommit off" in session level in Trafodion.
Do we have an approach to set autocommit to off in database level, if yes, how to realize it?

Best regards,
Yuan


RE: Set autocommit to OFF in db level

Posted by "Liu, Yuan (Yuan)" <yu...@esgyn.cn>.
Hi Selva & Anoop, 

Thank you all.

Best regards,
Yuan

-----Original Message-----
From: Selva Govindarajan [mailto:selva.govindarajan@esgyn.com] 
Sent: Tuesday, January 23, 2018 2:16 PM
To: dev@trafodion.apache.org
Subject: RE: Set autocommit to OFF in db level

As per the JDBC application, the default mode is auto-commit mode. Trafodion T4 connection is also set to auto commit by default.
Same is the case with ODBC specification. Trafodion ODBC driver also sets the connection to SQL_AUTOCOMMIT_DEFAULT. SQL_AUTOCOMMIT_DEFAULT is SQL_AUTOCOMMIT_ON.

Selva

-----Original Message-----
From: Anoop Sharma [mailto:anoop.sharma@esgyn.com] 
Sent: Monday, January 22, 2018 9:27 PM
To: dev@trafodion.apache.org
Subject: RE: Set autocommit to OFF in db level

hi, set transaction statements are runtime stmts and only impact that session when issued.
They are not like a cqd (control query default) that could be set at system level.

By default, autocommit is OFF. But sqlci and trafci set it to ON at startup by internally issuing 'set transaction autocommit on'. This is done so interactive statements could be treated as standalone stmts and would commit any transaction started for them.
If a user specified transaction is being used by issuing 'begin work', then autocommit will be OFF.

From an application program, autocommit will be OFF by default. 

Am not sure if there is a connectivity/client property that could be set to turn autocommit ON or OFF.
Someone familiar with connectivity can answer that.

anoop

-----Original Message-----
From: Liu, Yuan (Yuan) [mailto:yuan.liu@esgyn.cn]
Sent: Monday, January 22, 2018 7:30 PM
To: dev@trafodion.apache.org
Subject: Set autocommit to OFF in db level

Hi Trafodioneers,

As I know we can use "set transaction autocommit off" in session level in Trafodion.
Do we have an approach to set autocommit to off in database level, if yes, how to realize it?

Best regards,
Yuan


RE: Set autocommit to OFF in db level

Posted by Selva Govindarajan <se...@esgyn.com>.
As per the JDBC application, the default mode is auto-commit mode. Trafodion T4 connection is also set to auto commit by default.
Same is the case with ODBC specification. Trafodion ODBC driver also sets the connection to SQL_AUTOCOMMIT_DEFAULT. SQL_AUTOCOMMIT_DEFAULT is SQL_AUTOCOMMIT_ON.

Selva

-----Original Message-----
From: Anoop Sharma [mailto:anoop.sharma@esgyn.com] 
Sent: Monday, January 22, 2018 9:27 PM
To: dev@trafodion.apache.org
Subject: RE: Set autocommit to OFF in db level

hi, set transaction statements are runtime stmts and only impact that session when issued.
They are not like a cqd (control query default) that could be set at system level.

By default, autocommit is OFF. But sqlci and trafci set it to ON at startup by internally issuing 'set transaction autocommit on'. This is done so interactive statements could be treated as standalone stmts and would commit any transaction started for them.
If a user specified transaction is being used by issuing 'begin work', then autocommit will be OFF.

From an application program, autocommit will be OFF by default. 

Am not sure if there is a connectivity/client property that could be set to turn autocommit ON or OFF.
Someone familiar with connectivity can answer that.

anoop

-----Original Message-----
From: Liu, Yuan (Yuan) [mailto:yuan.liu@esgyn.cn]
Sent: Monday, January 22, 2018 7:30 PM
To: dev@trafodion.apache.org
Subject: Set autocommit to OFF in db level

Hi Trafodioneers,

As I know we can use "set transaction autocommit off" in session level in Trafodion.
Do we have an approach to set autocommit to off in database level, if yes, how to realize it?

Best regards,
Yuan


RE: Set autocommit to OFF in db level

Posted by Anoop Sharma <an...@esgyn.com>.
hi, set transaction statements are runtime stmts and only impact that session
when issued.
They are not like a cqd (control query default) that could be set at system level.

By default, autocommit is OFF. But sqlci and trafci set it to ON at startup by
internally issuing 'set transaction autocommit on'. This is done so interactive
statements could be treated as standalone stmts and would commit any transaction
started for them.
If a user specified transaction is being used by issuing 'begin work', then autocommit
will be OFF.

From an application program, autocommit will be OFF by default. 

Am not sure if there is a connectivity/client property that could be set to turn autocommit ON or OFF.
Someone familiar with connectivity can answer that.

anoop

-----Original Message-----
From: Liu, Yuan (Yuan) [mailto:yuan.liu@esgyn.cn] 
Sent: Monday, January 22, 2018 7:30 PM
To: dev@trafodion.apache.org
Subject: Set autocommit to OFF in db level

Hi Trafodioneers,

As I know we can use "set transaction autocommit off" in session level in Trafodion.
Do we have an approach to set autocommit to off in database level, if yes, how to realize it?

Best regards,
Yuan