Is it possible to start a database read-only when it needs recovery? I have a DB which stopped with "max file size reached", so DB says it needs recovery when I try to start it. So my wish would be to start the DB read-only to do an unload. Any advice? |
Hitting the max file size means that you are either on an old FAT filesystem or your dbspace file is very large. On NTFS with a 4K database page size you should be able have dbspace files up to 1TB in size. If you are not using a filesystem that supports large files, you could copy everything to a filesystem that does. Does the database fail to recover if you just start it in normal mode? I don't think you can start a database in read-only mode if it needs recovery. You could probably use in-memory mode though with '-im nw' which shouldn't touch the file and modifications will be kept in memory. I vaguely recall that "nw" mode requires a different licence. There is also "-im v" mode (validation mode) which doesn't require a separate licence and allows writes by recovery but then is read-only. That said, we still "logically" allocate pages when using in-memory mode so you might still hit the same error. DB file size is currently 2TB, recovery says 100% complete but then fails still with "max file size" reached, leaving the DB in dirty mode.
(23 Jun, 10:05)
Martin
Replies hidden
Is starting the database on an engine with a higher page size (so probably 16K or 32K) a workaround?
(23 Jun, 10:16)
Volker Barth
2
Okay. You can try the in-memory modes but I suspect they won't help you. If they don't work we might have other options. First, I would recommend that you have a saved copy of the existing database files. Then you might proceed as follows:
(23 Jun, 10:23)
John Smirnios
Comment Text Removed
file copy needs some time, I will keep you updated, thanks so far for your suggestions
(23 Jun, 10:36)
Martin
Happy to help. BTW, are you actually getting assertion 201143 or 201144 ("page %x in file %d is beyond maximum file size %x")? I cannot find the actual message you provided. Please let me know which of the assertion failures you are seeing or the exact message.
(23 Jun, 11:29)
John Smirnios
We tried -im v but it requested a license
(26 Jun, 04:25)
Martin
No assertion, it is treated as "internal error"
(26 Jun, 04:39)
Martin
2
Approach 1 worked, the database can be started now and we will do the unload, thanks for your help!!
(26 Jun, 04:41)
Martin
|
According to that question and that one, I'd say "no" - but I would try to start it in read-only mode (probably with a copy of that database) anyway... lol, both my own questions ...
(23 Jun, 10:08)
Martin
|
Well, in generally in RDBMS it is generally not possible to start a database in a read only mode when it needs recovery. Whenever database required recovery it means that there is the problem with the consistancy of database which you can further perform by taking appropriate steps that you can find over Google. Thanks |