Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 Restoring Data for 1 User

Author  Topic 

tomrippity
Starting Member

37 Posts

Posted - 2014-01-28 : 16:26:55
I apologize if this question has been answered before (it probably has), but I wasn't sure what terms to search for so I am asking again. Feel free to redirect to older threads though!

If my application has multiple users and 1 user did something completely ridiculous and ruined all of their data, how could I restore all of that users data to a previous time without affecting the other users.

Just imagine if it were facebook and one user accidentally deleted all of their timeline posts. How would facebook be able to revert the DB back to a point where that user still had all of their posts, but all of the other users didn't lose the post they made past that point?

Thanks in advance!

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2014-01-28 : 16:36:38
assuming your multiple users data is all in the same database you can't. Not unless you maintained audit tables or only performed logical deletes. logical deletes would be if you didn't actually delete rows but instead set a "deleted" flag which the frontend honored.

As far as FB is concerned I have no idea. But I would imagine that a timeline is simply a graphical presentation of a sequence of posts. You are not deleting the posts simply the presentation of them. Probably anything you post to facebook will outlive us all.

Be One with the Optimizer
TG
Go to Top of Page

tomrippity
Starting Member

37 Posts

Posted - 2014-01-28 : 16:39:39
quote:
Originally posted by TG

assuming your multiple users data is all in the same database you can't. Not unless you maintained audit tables or only performed logical deletes. logical deletes would be if you didn't actually delete rows but instead set a "deleted" flag which the frontend honored.



Thanks for the response. This is actually the approach that I am taking, but I always fear the worst and that I may have overlooked something or some glitch causes 1 user to lose everything.

Appreciate the response!
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2014-01-28 : 17:16:03
Don't fear the worst - plan for it

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -