transactions - Is rollback can work without savepoints in DB2? -


this question partially related this one

why transaction not rolled when using following sql:

insert testschema."test" (id, name) values (11111, 'sdfasdfasd');  rollback; 

as known db2/iseries documentation:

the rollback statement used end unit of work , out database changes made unit of work.

what indicator unit of work started or ended? rolled in example mentioned above?

i thankful answers , links.

ps. using db2/iseries v5r4.

pps. sorry bad english

everything in db2 done within scope of transaction. transaction ends on commit (either explicit or implicit) or rollback.

keep in mind that, default, many clients have autocommit parameter set true, means after every statement there implicit commit.

so, in example above, i'm going assume autocommit on, , insert committed immediately. thus, rollback statement did nothing.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -