Solved

Rename Oracle  Datafile

Posted on 2006-07-12
3
1,332 Views
Last Modified: 2013-12-11
I accidently named a datafile NEWIMAGE_IMAGE05.URA instead of NEWIMAGE_IMAGE05.ORA

First  question is, how can I rename this datafile without taking the tablespace off line.

The Second Question is, what negative impact will it have on the tablespace, data retrival and data input in this wrongly named datafile.

Please send me e-mail notification at Kamal.Agnihotri@StanleyAssociates.com

Thanks


Kamal Agnihotri

0
Comment
Question by:KamalAgnihotri
3 Comments
 
LVL 8

Expert Comment

by:gvsbnarayana
ID: 17092568
Hi,
  I don't think that you will be able to rename a datafile without taking a tablespace offline. You should take the tablespace offline to do this.
There will not be any negative impact with renaming a datafile but you may need to take a full database backup after renaming a datafile.
HTH
Regards,
Badri.
0
 
LVL 14

Accepted Solution

by:
sathyagiri earned 50 total points
ID: 17094329
.ORA is just the OFA architecure compliant naming convention. It will not have any impact on your data retrival or anything.
Steps to rename data file
SVRMGR> alter tablespace app_data offline;
SVRMGR> alter tablespace app_date rename datafile '/u01/oracle/U1/data01.dbf ' TO '/u02/oracle/U1/data04.dbf ' ;
SVRMGR> alter tablespace app_data online;
0
 
LVL 16

Expert Comment

by:MohanKNair
ID: 17145242
It is possible to rename datafile if the database is in archivelog mode

Take the datafile offline, rename datafile, synchronize SCN of  the datafile and make datafile online

SQL> alter database datafile '<file name>' OFFLINE;
SQL> alter database RENAME FILE '<old file name>'   TO '<new file name>' ;
SQL> recover database;
SQL>alter database datafile '<new file name>' ONLINE;
SQL>
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and theā€¦
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now