SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Restore with no backup


Restore with no backup

Author
Message
Vikka
Vikka
Old Hand
Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)

Group: General Forum Members
Points: 303 Visits: 151
My co-worker was trying to move a production database from one disk to another. He didn't do a backup and then he dropped a database. He doesn't have any experience/education in DB Administration. We need to help him to restore it.

I thought that db and logs are just files. When files are deleted they go to the Recycle Bin. Maybe it's a crazy idea, but would it be possible to get those files from recycle bin and restore a db from them ?

Are there any other ways to restore a database that was not backed up?

The guy may lose his job and I feel sorry for him.. though he did a dumb thing without telling anybody..
David Benoit
David Benoit
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3380 Visits: 3650
Unfortunately there is nothing you can do once you have dropped the database. If you had detached it then you might be ok.

Are you sure there are no backups?

Very sorry to hear that this happened to you. Hope all will be well with your co-worker.

David

@SQLTentmaker

“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
Loner
Loner
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3558 Visits: 3350
My question is why would anyone in your office let someone without any DB administration experience to handle moving a production database. Maybe the one who told that guy to move the database should be fired instead of that poor guy that had no clue what he was doing.
Vikka
Vikka
Old Hand
Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)

Group: General Forum Members
Points: 303 Visits: 151
My co-worker should have had guts to say "No", I don't know what I am doing and I don't want to poke around when I am in the middle of some other project and it's late at night..

Or at least keep other programmers in the loop and ask for advice. I cannot blame only our boss. It's maybe 70% boss' fault and still 30% of my co-worker. You've got to have guts to say NO.
David Benoit
David Benoit
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3380 Visits: 3650
Yes, admitting that we don't know how to do something is critical in our work.

Ultimately there is no point in pointing fingers, just learning lessons and growing. Hopefully no one will be too hurt by this and the customer that you are working for will not be too adversly affected.

David

@SQLTentmaker

“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
RBarryYoung
RBarryYoung
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14770 Visits: 9518
Vika (8/28/2008)
I thought that db and logs are just files. When files are deleted they go to the Recycle Bin. Maybe it's a crazy idea, but would it be possible to get those files from recycle bin and restore a db from them ?


I believe that the Recycle feature is off by default on Server Disks.

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Jeffrey Williams 3188
Jeffrey Williams 3188
SSCertifiable
SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)

Group: General Forum Members
Points: 7717 Visits: 9971
rbarryyoung (8/28/2008)
Vika (8/28/2008)
I thought that db and logs are just files. When files are deleted they go to the Recycle Bin. Maybe it's a crazy idea, but would it be possible to get those files from recycle bin and restore a db from them ?


I believe that the Recycle feature is off by default on Server Disks.


And I believe that if you drop the database, SQL Server will delete the files without using the recycle bin. I could be wrong, but also - if the database files were too large for the recycle bin they wouldn't end up there anyways.

Jeffrey Williams
Problems are opportunities brilliantly disguised as insurmountable obstacles.

How to post questions to get better answers faster
Managing Transaction Logs

David Benoit
David Benoit
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3380 Visits: 3650
Yes, it deletes the files automatically. From BOL

"Dropping a database deletes the database from an instance of SQL Server and deletes the physical disk files used by the database. If the database or any one of its files are offline when it is dropped, the disk files are not deleted. These files can be deleted manually by using Windows Explorer. "

I tested this earlier hoping I was wrong because I felt so bad for the situation.....

David

@SQLTentmaker

“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
homebrew01
homebrew01
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4865 Visits: 9108
Who made the decision not to have daily backups ? Can't just blame that on your co-worker too, can you ?



Vikka
Vikka
Old Hand
Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)Old Hand (303 reputation)

Group: General Forum Members
Points: 303 Visits: 151
Guys,
all that you said is correct. I checked the recycle bin on the server. No db files there, in fact it's empty.

The database suppose to be setup on the disk where everything gets backed up automatically but following the written instructions (that had an error in the path!) he set it up on a different disk ( where nothing gets backed up). Database was in use for a while and then it was discovered that it doesn't get backed up.

The same evening it was discovered that programmer was told to move it to another drive asap. Yes, bosses told him/approved the procedure. The guy didn't do any manual backup before following the order, didn't tell the rest of us, never moved db in his live, and he is fearless!

I always have that fear in my guts that I'll do something wrong and I think it over and over and try it on the test db. He just goes ahead and does things and bosses tell him to do things and it's dangerous. Somehow he thought he needed to drop db before restoring it on a different disk. Maybe he mixed up drop and de-attach commands or maybe just didn't think but it's too late to know. We re-created the schema from other db but data was gone.

Yes, it should be a lesson but there is a pattern of being fearless for bosses and for him and this is no good. I hope we are safe and will keep our jobs LOL
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