Error after moving a datafile [message #453971] |
Mon, 03 May 2010 04:11 |
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 #455957 is a reply to message #453971] |
Thu, 13 May 2010 14:56 |
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
|
|
|