Home » RDBMS Server » Server Administration » rename datafile
rename datafile [message #129353] Sun, 24 July 2005 15:01 Go to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
Is there a way to move and rename system, sysaux, temp, examples and other Oracle installed datafiles? I know the alter system rename datafile ... to ... I just do not know what state the database must me in. How about nomount? I want to get away from their silly names and locations.
Re: rename datafile [message #129386 is a reply to message #129353] Sun, 24 July 2005 23:26 Go to previous messageGo to next message
Achchan
Messages: 86
Registered: June 2005
Member
I think your problem is not that names,Maybe the path where they are.You can change it by making tablespaces offline and then renaming datafiles with qualified path.
I recommand do not mess orcle default tablespaces specially system.It can be dangerous.
-Good luck
Re: rename datafile [message #129393 is a reply to message #129386] Mon, 25 July 2005 00:21 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
HI

The database has to be in mount stage or tablespace offline for renaming the datafiles.

Yes, Achanan is right. Your main issue is probably path of datafiles & not the name itself.

As for renaming, you can rename any file in mount stage.

Regds
Girish

[Edit]: Small addition

[Updated on: Mon, 25 July 2005 00:22]

Report message to a moderator

Re: rename datafile [message #129984 is a reply to message #129393] Wed, 27 July 2005 10:01 Go to previous message
alliejane
Messages: 59
Registered: July 2005
Location: Glasgow
Member
Hi,

Just to clarify.

You can rename/move all the datafile within your database, however the type of datafile will dictate whether the database should be in mounted stage or can be open.

If your datafiles are from the SYSTEM, SYSAUX (10g), ROLLBACK/UNDO tablespaces then your database must be in mounted mode.

The sintax will be.

1. shutdown immediate
2. Rename/ move files as required.
3. startup mount
4. alter database rename file 'old file name' to 'new file name';
(the file must already be in the new location - Oracle will check)
5. startup.

I suggest this is how you do all the datafiles you need to rename, however it is possible to rename while the database is open as long as the files arn't in the SYSTEM SYSAUX OR UNDO tablespaces.

1. Alter tablespace ts_name offline;
2. Rename/move files as required.
3. alter tablespace ts_name rename datafile 'old file name' to 'new file name';
4. alter tablespace ts_name online;


Hope that helps.

AJ
Previous Topic: IMporting data to a schema
Next Topic: Data Block Sizing
Goto Forum:
  


Current Time: Thu Sep 26 22:53:15 CDT 2024