Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

No BEGIN TRANSACTION in DB2?

2,752 views
Skip to first unread message

Douglas Doole

unread,
May 1, 1998, 3:00:00 AM5/1/98
to

In DB2 transactions are implicitly started with the first SQL
statement following a CONNECT, COMMIT or ROLLBACK. So yes, if you
make changes over the span of an hour and then issue ROLLBACK,
everything from the last hour will be undone.

Each application has the ability to control whether it can see
uncommitted changes through it's isolation level. If the application
sets its isolation level to Uncommitted Read, it will be able see
changes made by other applications even if those changes haven't been
committed. The default isolation level of Cursor Stability will not
allow an application to see uncommitted changes. (See the UDB
Administration Guide for a complete discussion of isolation levels.)

Hope this helps.
___________________________________________________________________________
Doug Doole
DB2 Universal Database Development
IBM Toronto Labs


David Marvin

unread,
May 1, 1998, 3:00:00 AM5/1/98
to
Also, if you need distributed unit of work see the DB2 CLI Programmer's Guide.

FYI...Db2 support fot Microsoft Transaction Server was made available
in fixpack 9024 for DB2 NT/95.

ray....@cmsx.com wrote:

> I have looked in the DB2 documentation regarding transactions
> and it appears that there is no BEGIN TRANSACTION statement.
>
> I found COMMIT and ROLLBACK and according to the docs these
> statements affect all updates, deletes, inserts, etc... that
> have occurred on the connection since the last COMMIT or ROLLBACK.
>
> Does this mean I could be posting changes for an hour without issuing
> a COMMIT or ROLLBACK and then issue a ROLLBACK and all the changes
> that I made in the last hour would go away?
>
> Also, any change made to the database (i.e. insert etc..) are
> immediately available to other users of the system even if I have
> not issued a COMMIT. When I have worked with SQL Server and Oracle, a BEGIN
> TRANSACTION can be issued and none of the changes can be seen by the other
> users until I issue a COMMIT TRANSACTION. Is there a similiar mechanism in
> DB2?
>
> I'm working with DB2 UDB 5.0 and VB5 using RDO 2.0.
>
> Thanks in advance!
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading

--
David Marvin
DRDA & DUOW Development
DB2 Universal Database & DB2 Connect
IBM Toronto Laboratory

DB2 product information at http://www.software.ibm.com/data/db2/
DB2 product support at http://www.software.ibm.com/data/db2/library/
DB2 produc publications at http://www.software.ibm.com/data/db2/library/ and
follow link
DB2 performance reports at http://www.software.ibm.com/data/db2/performance/

vcard.vcf
0 new messages