cancel
Showing results for 
Search instead for 
Did you mean: 

Pre-allocate disk space prior to recovery

13,479

I would like to pre-allocate disk space before applying multiple log files to a database is this possible. One additional complication is the database has auditing turned on.

Version 9.0.2.3804

Thanks Jim

Accepted Solutions (0)

Answers (1)

Answers (1)

Breck_Carter
Participant

If you are using dbsrv9 -a to apply the transaction logs in recovery mode to a backup copy of the database, then I think the answer is "no".

The reason is that you have to run ALTER DBSPACE to pre-allocate disk space, and that implies you are going to start the database in normal mode (without -a) before applying the logs, and once you do that, you can't run dbsrv9 -a to apply the logs because the database is now "a different database" (the transaction log has been updated and ends at a different offset).

An alternative is to run dbtran and apply the resulting SQL commands, but if the transaction logs are large, that's a nasty task that is fraught with error... and probably much slower than just letting dbsrv9 grow the database file for you. Don't forget to defragment the drive afterwards.

The Help suggests dbsrv9 -c big-amount when your using -a if you want to speed things up.

VolkerBarth
Contributor
0 Kudos

I guess the situation is the same for newer versions, right?

Breck_Carter
Participant

Yes... V10 introduced -ad -ar and -as as enhancements/alternatives to -a but none of those address the situation described above.