Tuesday, July 12, 2011

Undocumented parameter _allow_read_only_corruption


Some time ago we talked about the undocumented parameter _allow_resetlogs_corruption, which could help us to open a database in case we have corruption in our redo logs. In this post we will discuss another undocumented parameter that could be helpful in case of corruption: _allow_read_only_corruption.
This parameter should not be used without the support of Oracle itself. But if you want to do some tests to retrieve your data more quickly, you can make a copy of your corrupted database and try this hidden parameter. Just make sure that you have a copy, because playing with this kind of parameters you can corrupt your database much more.
The procedure to use this hidden parameter would be to shutdown abort your database to make sure it’s completly closed.
Then, startup the database in nomount mode, and set this parameter to on:
ALTER DATABASE SET _allow_read_only_corruption SCOPE=SPFILE;
Shutdown immediate the database, and then try to startup your database “normally”. It will open your database even if you have some corruption, or at least, it will try to do it.
The first thing you should do after opening the database in this mode is to export all the data, and recover as much as you can. You shouldn’t use the database in this instance as this is an inconsistent mode, and _allow_resetlogs_corruption.
Just be careful, and remember that if you use this kind of knowledge without knowing what you are doing, you are claiming for disaster.

No comments: