Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 13 Feb 2008 @ 14:10:54 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Problem while converting procedures from oracle
 
From:   Geoffrey Rommel

  can I use ROLLBACK; and COMMIT; as it is in teradata..?  


  because in teradata we have BT & ET for each transacion.. Is it effects any functionality if i use rollback & commit as usaul .?  


Teradata supports two transaction modes: Teradata (sometimes called BTET) and ANSI. Most customers use Teradata mode. In this mode, all requests are committed automatically unless you explicitly start a transaction with BT and end it with ET. In ANSI mode, nothing is committed until you issue a COMMIT.

For example, in Teradata mode:

     BT;
       insert...;  /* withdrawal */
       insert...;  /* deposit */
     ET;

In ANSI mode:

     insert...;  /* withdrawal */
     insert...;  /* deposit */
     commit work;

The transaction mode applies to a session, so it is possible to run a BTET session and an ANSI session on the same Teradata instance. Likewise, a stored procedure can be written with ANSI syntax; it must then be run in an ANSI session. Most people, however, prefer to stick with BTET.

As for converting procedures from Oracle, I would repeat Glenn's words of caution from another thread: in Teradata, most things should be done in set-based SQL, not with cursors.



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016