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.


Thanks Jim

asked 08 Oct '10, 17:22

Jim%20Diaz's gravatar image

Jim Diaz
accept rate: 0%

edited 03 Apr '13, 17:00

Volker%20Barth's gravatar image

Volker Barth

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.

permanent link

answered 09 Oct '10, 09:23

Breck%20Carter's gravatar image

Breck Carter
accept rate: 21%

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

(10 Oct '10, 15:02) Volker Barth

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

(11 Oct '10, 13:35) Breck Carter
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Oct '10, 17:22

question was seen: 6,328 times

last updated: 03 Apr '13, 17:00