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-18       - By Jared Still

Reply:     1     2     3     4     5     6     7  

You will need to revoke access during this time,
and regrant it when finished.

You can revoke access to and rename a table while
another session is querying it.

In the case of revoking access, it will not take effect until
the other session ends.

In the case of the table rename, the other session will be
unable to access the table using the old name as soon
as the query finishes.

This is all getting rather complex, are you sure this process
is necessary?

Jared

On Fri, 18 Mar 2005 12:59:32 +0100, Denys van Kempen <dvkempen@(protected)> wrote:
> Jared,
>
> Thanks for you reply. However one issues remains. We need to guarantee
> that nobody can attempt to access any of the 2 tables while I'm
> switching
>
> What we want to do is
> 1 Lock table A, table B
> 2 Rename A to C
> 3 Rename B to A
> 4 Rename C to B
> 5 Release table A, table B
>
> If I can't lock during processing, another user might attempt and fail
> a select on A after step 2.  (or B after step 3).
>
> I tried locking the table but the rename went ahead regardless. Any ideas?
>
> Thanks for you time.
>
> Denys
>


--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
--
http://www.freelists.org/webpage/oracle-l