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: oracle 9i problems.. renaming datafiles

Re: oracle 9i problems.. renaming datafiles

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Thu, 20 Jun 2002 10:18:15 +1000
Message-ID: <aer714$6q1$1@lust.ihug.co.nz>

"Knut Talman" <knut.talman_at_mytoys.de> wrote in message news:3D10BA40.B75B3CDB_at_mytoys.de...
> mikeDesouza wrote:
>
> > I am trying to rename a datafile in oracle 9 release 1. I perform the
> > following steps but somehow it fails and i have to perform media
recovery .
> > when I try and rename the datafile its say that some process is using in
,
> > so when i try and bring it online it says it needs media recovery
>
> AFAIK you can't rename the file when the database is open. Shutdown the
> instance, startup mount, rename the file (on OS level *and* in the
database) and
> open the db.
>

Of course you can. Taking the tablespace offline is like shutting down part of the database, so the procedure is: take tablespace offline, drop to the O/S and do the necessaries, issue the 'alter database datafile rename x to y' command to tell the controlfile what you've been up to, bring the tablespace back on line.

The only time this doesn't work, of course, is when it's the SYSTEM datafile that's being renamed, since you can't offline the system tablespace. If that's the case, then your shutdown-rename-mount-tell controlfile-open method is the only way of doing it.

Regards
HJR
> Regards,
>
> Knut
Received on Wed Jun 19 2002 - 19:18:15 CDT

Original text of this message

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