I made a bit of a woopsy with adding a datafile to the wrong tablespace. In my initial panic as soon as i did it then i placed the datafile offline so no data would be written to it (this is a live database). I then thought to drop the datafille but i can't
ERROR at line 1:
ORA-03264: cannot drop offline datafile of locally managed tablespace
So i have to take it back online to do the drop but if i try and place online it tells me i need more media recovery (presuming just because the SCN has changed as there is no data in this file).
Now, it just so happens that RMAN is currently not operational on this database due to the version of Netbackup we are on not supporting 11g.
can i recover the datafile while the database is open?
alter database recover datafile '/ifs/dpp/live/data/IFSLIVEdts03.dbf';
alter database recover datafile '/ifs/dpp/live/data/IFSLIVEdts03.dbf'
ERROR at line 1:
ORA-00279: change 32018552 generated at 03/25/2011 14:28:22 needed for thread 1
ORA-00289: suggestion : /ifs/dpp/archivelogs/1_2544_741693934.dbf
ORA-00280: change 32018552 for thread 1 is in sequence #2544
Is media recovery completed? Is the data file online?
I don't understand why it was saying that as i had never originally asked it to recover the file.
It still says the same now when i try to place online or give the recover command (remember the database is open, not in mount stage)
I think i have seen how to do recover datafile in open database using RMAN but as mentioned earlier, RMAN currently unavailable for this database.
The database has been restarted since i raised this but was an auto restart over the weekend when i wasn't at work.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
You can do a recovery on the datafile even when the database is open. You must have the require archivelog to do the recovery on the file, then after all the logs are applied you can place the datafile online.