Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


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


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

Author
Message
og-1134765
og-1134765
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 142
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 Smile
higgim
higgim
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1035 Visits: 2614
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?
EdVassie
EdVassie
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3144 Visits: 3815
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: SQL Server FineBuild 1-click install and best practice configuration of SQL Server 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005. 1 Dec 2016: now over 39,000 downloads.
Disclaimer: All information provided is a personal opinion that may not match reality.
Quote: "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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search