set COMMIT mode in db2 clp
As default, DB2 CLP will do commit after you issue each DB2 statements or SQL automatically.
If you want to change it instead of issuing COMMIT or ROLLBACK manually, do following.
SQLLIB\BIN> db2
db2 => list command options
-c ON
db2 => update command options using c off
db2 => list command options
-c OFF
This change will only exists during this session. The setting will lose when you close this CLP and open CLP next time.
following cmd will get the same result with above.
SQLLIB\BIN> db2 list command options
-c ON
SQLLIB\BIN> db2 +c
db2 =>
db2 => list command options
-c OFF
db2 => quit
SQLLIB\BIN> db2 list command options
-c ON
There's also the way to keep the settings forever, do following.
SQLLIB\BIN\> db2 list command options
-c ON
SQLLIB\BIN\> db2set db2options=+c
SQLLIB\BIN\> db2 list command options
-c OFF
This change will take effection immediately even for others having been opened CLP windows. And will keep along.
Use following cmd set it back to ON.
SQLLIB\BIN> db2set db2opptions=-c


