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 -> Re: moving datafiles

Re: moving datafiles

From: craig <someone_at_nowhere.com>
Date: Fri, 13 Feb 2004 13:38:26 -0700
Message-ID: <gBaXb.72411$fD.38968@fed1read02>


I'm no pro to take it all with a grain of salt. As far as I know, making a tablespace read only just means no more transactions can be made against the database.

Existing transactions could still be pending against that Tablespace? Or not because you just update once a day, but does Oracle know this fact? What about forcing a checkpoint?

Have you putting the tablespace in backup mode to do this?

Just bouncing off some ideas, but my best guess is that oracle is preventing the move because it "thinks" the file is being used or "could" have pending updates.

"Chuck" <chuckh_nospam_at_softhome.net> wrote in message news:Xns948E9046CF8DBchuckhsofthomenet_at_130.133.1.17...
> Can someone explain to me why this won't work?
>
> I need to move a datafile on a very busy tablespace. The objects in the
> tablespace are only updated once a day, after that it's 100% read. I want
> to move the file during this 100% read time. The conventional method is
> to take the tablespace offline, move the file in the o/s, rename it in
> Oracle, and bring the tablespace back online. I want to keep the
> tablespace available throughout the entire operation so I thought I would
> try the following.
>
> o Place the tablespace in read only mode.
> o Copy the datafile to the new filesystem
> o Rename the datafile in Oracle.
> o Bring the tablespace back online
> o Delete the original file from the operating system.
>
>
> This is pretty much what's documented in the 8i SQL reference page 8-73
> (for those who require proof you've actually read the documentation).
>
> "Once a tablespace is read only, you can copy its files to read-only
> media. You must then rename the datafiles in the control file to point
> to the new location by using the SQL statement ALTER DATABASE ...
> RENAME."
>
> The only difference is I'm copying it to another read/write media, not
> read-only media. When I try it however I get the following error when I
> try to rename the file in oracle. Why?
>
> SQL> alter database
> 2 rename file '/u23/oradata/DBATOOL/test01.dbf'
> 3 to '/u22/oradata/DBATOOL/test01.dbf';
> alter database
> *
> ERROR at line 1:
> ORA-01511: error in renaming log/data files
> ORA-01121: cannot rename database file 11 - file is in use or recovery
> ORA-01110: data file 11: '/u23/oradata/DBATOOL/test01.dbf'
>
>
> --
> Chuck
> Remove "_nospam" to reply by email
Received on Fri Feb 13 2004 - 14:38:26 CST

Original text of this message

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