Re: What to do with this situiation 2

From: (wrong string) ªü´ö Thenardier <Thenardier_at_POBoxes.com>
Date: 1997/10/06
Message-ID: <34391a36.11468287_at_news.netvigator.com>#1/1


Hi Thomas,

Thanx for ur reply, but i have sth still dont understand.

On Fri, 03 Oct 1997 18:18:48 GMT, tkyte_at_us.oracle.com (Thomas Kyte) wrote:

>It doesn't work that way. If you commit and the commit succeeds all of the
>records are there. If you commit and the commit does not succeed, none of the
>records are there. The data will either be fully saved or not at all -- thats
>the whole purpose of transactions.

But the data must have been stored somewhere in the system, right? Could the server detect such situation and *automatically rollback* those troubled data?

>If the problem is the user needs to be able to know if the transaction succeeded
>or failed after such a situation (blackout during the commit), then all you need
>to do is piggy back an extra insert just prior to the commit. For example, you
>are going to commit, instead of just saying commit, do something like:
>
> insert into commit_tab ( msg ) values
> ( USER || ' committed transaction ' || trans_name || ' at ' || sysdate );
>
> commit;

 Is commit_tab a built-in function (procedure?) in Oracle?  Can u give me an example to illustrate this more?

>then, the user can query the commit_tab to see if their transaction was
>committed or not (lack of record indicates the transaction rolled back, presence
>of record indicates all data saved).

Thanks again, Thomas

Thenard

--
********************************************************
***                                                  ***
***   ¦³°ÝÃD¶Ü¡H          Got a problem?             ***
***   §äªü´ö§a¡A          Just ask Thenardier,       ***
***   ¥L·|±N¥¦Åܦ¨¨aÃø¡I  he'll make it a tragedy!   ***
***                                                  ***
********************************************************
Received on Mon Oct 06 1997 - 00:00:00 CEST

Original text of this message