Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Rename table transaction

Rename table transaction

From: Denys VAN KEMPEN <DVANKEMPEN_at_cartesis.com>
Date: Tue, 15 Mar 2005 11:05:46 +0100
Message-ID: <D038A2651F1BD411B1ED00805F715E8A0E72EE99@archibald.cartesis.com>


Could anybody inform me how to wrap a number of rename table operations into a transaction?  

You can do this on SQL Server with

BEGIN TRANSACTION EXECUTE sp_rename 'tableA, 'tableX'

EXECUTE sp_rename 'tableB, 'tableA'

EXECUTE sp_rename 'tableX, 'tableB'

GO

COMMIT   On Oracle rename table is DDL so rollback or commit is meaningless. However, we need to guarantee that all commands either succeed or fail.    

Thanks  

Denys van Kempen


CARTESIS http://www.cartesis.com
Great performances start with confidence (TM)

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

Vous recevez ce message car vous avez communique votre adresse email au moins une fois a Cartesis. Conformement a l'article 34 de la loi Informatique et Libertes du 6 janvier 1978, vous disposez d'un droit d'opposition, d'acces et de rectification des donnees vous concernant soit par courrier a l'adresse: Cartesis - Legal Department, 23-25 rue de Berri, 75008 Paris soit par email: legal_at_cartesis.com.


--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 15 2005 - 05:46:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US