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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help renaming datafile...

Re: Help renaming datafile...

From: Tim Witort <trw_at_medicalert.org>
Date: 1997/04/04
Message-ID: <334592B3.71D9@medicalert.org>#1/1

Mike Burke wrote:
> > How can I rename a datafile used by the System tablespace? The only way I
> > can see to rename a datafile is to take the TS offline, which cannot be
> > done with the System TS.
>
> Allan,
>
> A SYSTEM tablespace datafile cannot be renamed while the database is open.
>
> Try this,
> SQLDBA> connect internal
> SQLDBA> shutdown normal
> SQLDBA> HOST copy 'original datafile' to 'new datafile'
> SQLDBA> startup restrict mount
> SQLDBA> alter database rename file 'original' to 'new';
> SQLDBA> alter database open
> SQLDBA> select * from DBA_DATA_FILES;
>
> If you've got time take a backup.
>
> Shutdown and restart the database.

Also, before and after you do anything which adds datafiles, changes them, adds tablespaces, etc., you should make a controlfile backup:

ALTER DATABASE BACKUP CONTROLFILE TO 'full path to control file'; ALTER DATABASE BACKUP CONTROLFILE TO TRACE NORESETLOGS; Do the above before and after. Obviously change the file name in the first statement each time. This will yield a control file copy and the corresponding SQL statements in a trace file to rebuild it if necessary.

Received on Fri Apr 04 1997 - 00:00:00 CST

Original text of this message

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