If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > not atomic doesn't work properly. why?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-03-11, 09:52
gonnejp gonnejp is offline
Registered User
 
Join Date: May 2011
Posts: 1
not atomic doesn't work properly. why?

Hi,

I believe that
[not atomic] procedure doesn't do either COMMIT nor ROLLBACK,
but the caller can determine COMMIT or ROLLBACK.

I called the below TEST_PROC procedure like this:

db2⇒call TEST_PROC ()
db2⇒commit

and then, I checked TBL cl_sched,
but I couldn't find record (1).

Why?

Thanks in advance

'----------------------------------------------------------
CREATE PROCEDURE TEST_PROC ()
LANGUAGE SQL
BEGIN NOT ATOMIC

INSERT INTO cl_sched (class_code, day)
VALUES ('R11:TAA', 1);<----------------(1)

SIGNAL SQLSTATE '70000';

INSERT INTO cl_sched (class_code, day)
VALUES ('R22:TBB', 2);
END

'----------------------------------------------------------
Version:
DB2 Version 9.5 SQL PL
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On