How to fast reinstatement new data and objects on a copy of a irreparable database

  • Hello,

    One of our database have several failures, we cant repair it.

    Actually all data and objects are available on the corrupted database.

    We are using :

    - sql server 2008 R2 (standard edition)

    - recovery model : Simple

    - compatibiliry level : SQL server 2005 (90)

    Shemas replication scripts have been generated (using ssms) and we write a piece of code for migrating data between the old and a new database.

    Our problem : We cant stop the old database during the copy.

    My question, during the maintenance some data will be written to the old database.

    What is the best/simple way to temporaly store this diferencial data for a post maintenance fast reinstatement ?

    If there's a best way to duplicate this corrupt database using some tools or other prodcedures, your suggestions are welcome 🙂

  • Whilst not my area of expertise I do have a couple of questions:

    If the database has failed and you cannot repair and data will be written to the old database during your re-create surely the failures you have cannot be that bad if you can access all data and objects and still have the thing function?

    What exactly are the problems your facing which lead you to say the database cannot be repaired?

  • So you have a database that is saying it is corrupt, you have no certain way of knowing that you are not making the corruption worse because you are still updating it, and are worried about the downtime while you salvage what data is left.

    My advice is to bite the bullet and schedule some downtime where you can copy out of your database everything that is still available.

    You should also work out scripts that can check the new database for application integrity. The declared RI you have can deal with physical integrity and warn you of child records with missing parents, etc. However declarative RI cannot warn you if a parent has no children when your application expects that it should have.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply