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

Home -> Community -> Usenet -> c.d.o.server -> rename datafile without shutting down

rename datafile without shutting down

From: Christ Follower <christ_follower_at_my-deja.com>
Date: Wed, 26 Jan 2000 21:08:44 GMT
Message-ID: <86nnop$u2p$1@nnrp1.deja.com>


I have my database running in archive mode. Is it possible to rename a datafile without even bring the tablespace offline?

Here is what I did:

1. ALTER TABLESPACE my_table_space BEGIN BACKUP;
2. Use O.S. to copy the data file to 'new.dbf'.
3. ALTER DATABASE RENAME FILE 'old.dbf' TO 'new.dbf';

==> Oracle complains that the file is in use.
4. ALTER DATABASE DATAFILE 'old.dbf' OFFLINE;
5. Repeat step 3.
6. ALTER DATABASE DATAFILE 'new.dbf' ONLINE;

==> Oracle complains that media recovery is required.

I was hoping to use 'begin backup' feature so Oracle wouldn't write info to the datafile. But, at this point, I had no choice but run recovery from server manager. Also the tablespace/datafile was offline and the application cannot continue.

I wonder if there is a way to make such change "transparently" to the users.

Thanks.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Jan 26 2000 - 15:08:44 CST

Original text of this message

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