dbTalk Databases Forums  

under-transaction ?

comp.database.oracle comp.database.oracle


Discuss under-transaction ? in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
CM
 
Posts: n/a

Default under-transaction ? - 02-20-2004 , 09:05 AM






Hello,

Is it possible to create a transaction in a transaction?

BEGIN T1

INSERT into t1 values(2);

BEGIN T2

INSERT into t1 values(3);

ROLLBACK T2

COMMIT T1

I will have liked that the "ROLLBACK" of the T2 transaction
does not disturb the "INSERT" made in the principal transaction.
If that exists, which are commands SQL for Oracle 9i? Thank you very much.
(And excuse me for my imperfect English)

Christophe



Reply With Quote
  #2  
Old   
VS
 
Posts: n/a

Default Re: under-transaction ? - 02-20-2004 , 11:10 PM






CM
I have 8 years in Oracle and have never needed this
What you would like to do ?
INSERTs take time. I would analyze data before doing it or use EXCEPTION for
something extraordinary

"CM" <le-spam-je-dis-non (AT) ulg (DOT) ac.be> wrote

Quote:
Hello,

Is it possible to create a transaction in a transaction?

BEGIN T1

INSERT into t1 values(2);

BEGIN T2

INSERT into t1 values(3);

ROLLBACK T2

COMMIT T1

I will have liked that the "ROLLBACK" of the T2 transaction
does not disturb the "INSERT" made in the principal transaction.
If that exists, which are commands SQL for Oracle 9i? Thank you very
much.
(And excuse me for my imperfect English)

Christophe





Reply With Quote
  #3  
Old   
Hilarion
 
Posts: n/a

Default Re: under-transaction ? - 02-23-2004 , 02:41 AM



Quote:
I will have liked that the "ROLLBACK" of the T2 transaction
does not disturb the "INSERT" made in the principal transaction.
If that exists, which are commands SQL for Oracle 9i? Thank you very much.
(And excuse me for my imperfect English)
Read about SAVEPOINT

Hilarion




Reply With Quote
  #4  
Old   
kstahl
 
Posts: n/a

Default Re: under-transaction ? - 02-23-2004 , 06:04 AM



CM wrote:

Quote:
Hello,

Is it possible to create a transaction in a transaction?

BEGIN T1

INSERT into t1 values(2);

BEGIN T2

INSERT into t1 values(3);

ROLLBACK T2

COMMIT T1

I will have liked that the "ROLLBACK" of the T2 transaction
does not disturb the "INSERT" made in the principal transaction.
If that exists, which are commands SQL for Oracle 9i? Thank you very much.
(And excuse me for my imperfect English)

Christophe


Read about autonomous transactions. They might be what you need.



Reply With Quote
  #5  
Old   
Chris Leonard
 
Posts: n/a

Default Re: under-transaction ? - 03-01-2004 , 01:39 PM



In addition to what others have posted, you might want to read up on
AUTONOMOUS TRANSACTIONS.

--
Cheers,
Chris

___________________________________

Chris Leonard, The Database Guy
http://www.databaseguy.com

Brainbench MVP for Oracle Admin
http://www.brainbench.com

MCSE, MCDBA, OCP, CIW
___________________________________

"CM" <le-spam-je-dis-non (AT) ulg (DOT) ac.be> wrote

Quote:
Hello,

Is it possible to create a transaction in a transaction?

BEGIN T1

INSERT into t1 values(2);

BEGIN T2

INSERT into t1 values(3);

ROLLBACK T2

COMMIT T1

I will have liked that the "ROLLBACK" of the T2 transaction
does not disturb the "INSERT" made in the principal transaction.
If that exists, which are commands SQL for Oracle 9i? Thank you very
much.
(And excuse me for my imperfect English)

Christophe





Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.