473,394 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Recover Lost data files?

Hi
When we issue a DBCC SHRINKFILE with empty option, the data file
is removed and the space is alloted back to the OS.
Same way when we issue a an ALTER DATABASE to remove a database,
all the data files and transaction log files are dropped.
But can these files be recovered again by using any of the disk
recovery tools?

Achilles
Jul 20 '05 #1
1 1859
DBCC SHRINKFILE doesn't remove a data file it just removes unused space in a
file. ALTER DATABASE doesn't remove databases, although it can be used to
remove files (but only when they are empty of data). Since neither of these
statements actually removes any data from your database there isn't really
anything to recover. I doubt it would be feasible to restore a database to a
prior state using disk recovery tools and I definitely wouldn't recommend
you try as the likely result would be a corrupt database.

If you think you have lost some data for some reason then restoring from a
backup is your best course of action. But as I said, neither of the
statements you have mentioned should cause you to lose data even if you use
them in error.

Hope this helps.

--
David Portas
SQL Server MVP
--
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: anonymous | last post by:
I've got a disk that had the data files for my mysql server on it. From these files can I rebuild the database? I didn't do backups or anything like that, but I have the whole file system. What I...
5
by: Grant | last post by:
Hi Is there a way to recover deleted records from a table. A mass deletion has occurred and Access has been closed since it happened Louis
2
by: Dennis Breithaupt | last post by:
Hy all, I request your support for the following problem. (with "postmaster (PostgreSQL) 7.4.1") On a development-system I lost the pg_xlog-directory due to a system crash, where the physical...
1
by: im2kul2 | last post by:
I'd be GREATLY APRECIATED if someone could bail me out of this one! I logged into my server an hour ago just to find that the root partition is 100% filled: /dev/mapper/VolGroup00-LogVol00...
1
by: Dhungu Dhumbak | last post by:
Dear All, SOS Please Help. I have a MS-SQL DB with 4 .ndf files. One (first) .ndf file is missing. somehow got deleted??. Is there any way can rebuild my DB. The .MDF and .LDF files are in...
0
by: macm | last post by:
I have lost a few days worth of dev... I can recover the code behind files of the aspx page no problem, but I can not figure out how to recover the aspx (design) part of the code from the compiled...
1
by: =?Utf-8?B?SmVzdXMgTWFycXVleg==?= | last post by:
How to recover lost files or pictures that were deleted from the computer
2
by: nano2k | last post by:
Hello I accidentaly ran a DELETE command against a table with a wrong WHERE clause. My database had no backup, but the recovery model was Full. I am using SQL Server 2005. Is there a way, or...
3
by: Jerry Spence1 | last post by:
I have a project that has these files: frmCD.resx frmCD.Designer.vb frmCD.vb I had a virus which wiped out the frmCD.vb. Is it possible to regenerate it from the other files? -Jerry
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.