Home » RDBMS Server » Backup & Recovery » Error after moving a datafile
Error after moving a datafile [message #453971] Mon, 03 May 2010 04:11 Go to next message
jsancheznav
Messages: 1
Registered: May 2010
Location: Barcelona
Junior Member
Hello all,

Yesterday, by mistake we have moved a datafile to a different directory executing "mv" command on linux. This morning the datafile was been mode to the rigth place.

Rigth now the datafile and tablespace status is online and working properly,because we can execute DML and DDL succesfully.

But, when we try to shutdown the database, Oracle shows us a message inform us the datafile is not synchronized and shutdown process is aborted.

If we synch the db by "alter system checkpoint", all the datafiles except the "moved" one are updated.

According to the view v$recover_file there's no datafile to recover.

I have to execute "alter database recover datafiles "..."?

BR,

Joan Sánchez
Re: Error after moving a datafile [message #453977 is a reply to message #453971] Mon, 03 May 2010 04:51 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member

http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/dfiles.htm#sthref1390
Re: Error after moving a datafile [message #455957 is a reply to message #453971] Thu, 13 May 2010 14:56 Go to previous message
nsingh49
Messages: 9
Registered: August 2007
Junior Member
Try this:
1. Shutdown abort
2. Startup mount.
3. select name from v$datafile.

See the current location for that datafile for that tablespace.

4. alter tablespace <tablespace> offline;

move the datafile to another location.

5. alter database rename file 'currentlocation' to 'newlocation';

eg: alter database rename file '/u01/oradata/test1/myfile.dbf' to '/u02/oradata/test1/myfile.dbf';

6. alter tablespace <tablespace> online;

7. alter database open;

Good Luck..


Nirmal
Previous Topic: Rman Duplicate database issue
Next Topic: Oracle RMAN Catalog vs. controlfile advantages
Goto Forum:
  


Current Time: Wed Oct 23 05:22:36 CDT 2019