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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Rename a datafile

Re: Rename a datafile

From: <hemantchitale_at_charteredsemi.com>
Date: Wed, 30 Jan 2002 18:25:45 -0800
Message-ID: <F001.004015E7.20020130175525@fatcity.com>

A tablespace is a logical concept. Tablespace names are available only from the
Data Dictionary --- when the Database is OPEN. DataFiles are physical. DataFile names are in the ControlFile.

If you want to move a datafile when the database is OPEN, you must take the Tablespace Offline and move and then rename the file.

If you can afford to MOUNT but not OPEN the database, you can do an ALTER DATABASE RENAME FILE <old> TO <new>.

Note that in both cases you must actually move or copy the file to the new location yourself, using the OS's move or copy command before you execute the Rename in Oracle. Oracle will NOT move the file for you.

Hemant K Chitale
Principal DBA
Chartered Semiconductor Manufacturing Ltd

Joe LaCascio <jlacasci_at_wheatonma.edu> 31/01/2002 09:05 AM Sent by: root_at_fatcity.com

Okay, I don't have the manuals with me and can't for the life of me remember the correct syntax to do this...

Is it:

shutdown database
startup no noumt (or startup mount)
alter tablesapce evisions
rename datafile '/full_path/file_name' to '/full_path/new_name';

I'm on 8.1.6 and this complains saying the database isn't open.

It can't be open to rename a datafile...

Thanks,
Joe

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Joe LaCascio
  INET: jlacasci_at_wheatonma.edu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: hemantchitale_at_charteredsemi.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Wed Jan 30 2002 - 20:25:45 CST

Original text of this message

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