on 2013 Jul 26 8:09 AM
Database recovery can be a time consuming task, so does any tool exists, which give you information about the need to recover and also possibly about the extent of recovery which will be performed, like last checkpoint in relation to transaction logfile or so, without starting the database?
Request clarification before answering.
Attempting to start the database in read-only mode will tell you this information:
dbsrvX <database.db> -r
**Error** - Database cannot be started -- <filename> cannot be started read-only because it requires recovery.
... but you will end up starting the database in read-only mode if it doesn't require recovery.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you try to disable the transaction log (dblog -n foo.db) for a database that requires recovery, it will fail with the message "Database quit abnormally last time it was used. Database recovery must be performed before proceeding."
However, you MUST remember to enable the log again if you successfully disable it!
Jeff's suggestion of using read-only mode is probably safer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's no API available to make that determination. It actually gets a bit more complex than I originally thought too. A successful invocation of "dblog -n foo.db" really means "the transaction log is not needed for recovery". There are at least three separate indications of "needs recovery": checkpoint log, undo log(s), and redo log. I believe the read-only mode will check all three.
User | Count |
---|---|
52 | |
8 | |
5 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.