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 > Oracle > Autonomous Transactions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-03, 02:34
NoviceNo1 NoviceNo1 is offline
Registered User
 
Join Date: Jan 2003
Location: Woking
Posts: 107
Autonomous Transactions

Hi,
Does Oracle support Autonomous Transactions.
i want to issue a commit inside a database trigger.
how can i use Autonomous Transactions to achive this.

Please Help...
__________________
nn
Reply With Quote
  #2 (permalink)  
Old 01-14-03, 04:37
remivisser remivisser is offline
Registered User
 
Join Date: Dec 2002
Location: Netherlands
Posts: 118
pragma autonomous_transaction;

Yes you can, first declaration in your declare section hast to be "pragma autonomous_transaction".

Good Luck!


Remi

http://askremi.ora-0000.com
__________________
Remi Visser

Oracle Database Administrator
(OCP certified 8i)

Homepage: http://home.remidian.com/
Reply With Quote
  #3 (permalink)  
Old 01-14-03, 05:00
NoviceNo1 NoviceNo1 is offline
Registered User
 
Join Date: Jan 2003
Location: Woking
Posts: 107
Re: pragma autonomous_transaction;

Quote:
Originally posted by remivisser
Yes you can, first declaration in your declare section hast to be "pragma autonomous_transaction".

Good Luck!


Remi

http://askremi.ora-0000.com
Hi,
Cool.. Thanks it worked.
__________________
nn
Reply With Quote
  #4 (permalink)  
Old 01-14-03, 05:49
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Re: pragma autonomous_transaction;

Quote:
Originally posted by NoviceNo1
Hi,
Cool.. Thanks it worked.
You must be aware that by making this trigger autonomous, its work falls outside the scope of the main transaction - i.e. if the user issues a ROLLBACK of the triggering statement, the work done by the trigger will remain. Of course, that may be exactly what you want if you are doing something like logging user activity, but for some situations it would be the wrong thing to do, and could corrupt your database.
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
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