Monday, March 26, 2012

Oh No This Is A Disaster

Ok, this is really bad.

A table has been accidentally DROPPED from our SQL Database...

We have the transaction log from the very day that this table was created...

However, as we are all C++ programmers (and not DB people!) we are not sure how to do this!

Could anyone explain how to recreate a table from a transaction log, perhaps up to a specific date - or point us to a resource on the web.

Thanks for any advice you can give. (Head now under the table, hiding from the management :mad:

Mark.Could you maybe restore from those old transaction logs (do you mean you have transaction log backups from the time the table was created)?
Notice that all tables, SPs etc will be restored then from the old times.|||Hi - thanks for the reply - In actual fact, the transaction log is complete - it has never been backed up...

In effect, I think what we need to do is replay the transaction log up until a certain point, BEFORE the table was accidentally dropped, thus, in effect 'rebuilding' the database (or maybe we can filter the transaction log for just one table?) from scratch.

We don't mind if we lose some data, say, up until the nearest check point before the accident, we can then manually re-enter the data...

Our current line of thinking is that we first need to backup the t/log (it will be a full backup since it's never been backed up) and then restore
it up until a certain point - however this is a programming shop and we're not really sure of the process/syntax required to do this - we just treat the server as a black box and pump data in/out with SQL Statements!!!

We're sinking fast!

The SQL server is SQL Server 7 - WE have just stopped the server and literally copied the disk files - just in case - we would like to take those files to a second box, so that we can work on it without causing any more damage(!) - Is there a method to do this?

Thanks again for any assistance you can offer.

Mark.|||Hi Mark,
I know that you can do a partial restore in SQl Server 2000 to a named mark in the transactional log but do not think this option is available to you with version 7. I just went searching on-line and found no evidence to counter my suspicions... Since you have never done a back-up of the transactional log, it is pretty useless to you. When is the last back-up you made for your database?

No comments:

Post a Comment