on 2024 Jul 30 10:30 AM
We need to rebuild a database whilst keeping a live copy running, the method we have used for years follow these steps:
Originally this could be done within working day, but as the Database is now over 500GB rebuilding takes many days, meaning multiple daily backups have happened, each with a daily log and all these have to replayed on the rebuilt db in order before catching up on current live transaction log which takes a good while as well.
Does anyone have a better method?
Request clarification before answering.
We have 460 GB database files. It takes about 19 hours to perform a rebuild. Not sure if it is an option or benefit for you, but we run the database in an HA (we can't have our db down for any more then a few mins 24/7/365). The rebuild is done live on the mirror of the database in the HA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
They do not. I'm sure you don't want them to spread out.
Once the rebuild is done, I replace the mirror database files with the rebuilt ones. I let that run as is for some time, then failover the DB to the mirror. Once that runs for some time, I copy over the rebuilt database files to the node that is now the mirror. ZERO downtime.
The mirror does show as active, but if the DB fails over to it, there would be a resource issue, and the rebuild would have to be stopped immediately. Thankfully, this has never been put to the test.
no better approach, but what helped us in speed up the rebuild was to increase the pagefile to an extreme extent (e.g. 100GB or more) and of course use a fast SSD/Nvme for storage.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
33 | |
22 | |
17 | |
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.