Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Rename table transaction

Rename table transaction

2005-03-15       - By Denys VAN KEMPEN

Reply:     1     2     3     4     5     6     7  

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@(protected)

***********************************************************************



--
http://www.freelists.org/webpage/oracle-l