Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please go easy it’s a steep learn curve..

OK steps done so far

  1. Create files,
  2. Create file groups,
  3. Create partition function,
  4. Create partition scheme,
  5. Partition table associate files with filegroups
  6. Put data in the table.

All is good

Now to reverse

The drop data

  1. Drop the partition and associations,
  2. Drop partition scheme,
  3. Drop partition function,
  4. Drop file groups

But when I deleted the files from the folder in my SSMS, I than had problems validating my Databases.

I restored the files and SSMS is fine.

My question what is the correct process for deleting .ndf and .ldf files?

share|improve this question

migrated from Jan 21 '12 at 15:00

This question came from our site for professional and enthusiast programmers.

Describe more specifically what do you mean by "had problems validating my Databases". – Petr Abdulin Jun 20 '11 at 8:42
The indivdual databases failed to display in SSMS – icecurtain Jun 20 '11 at 9:45
up vote 2 down vote accepted

You can't delete the LDF file: it's essential.

For the NDF, you need to show that it's not used to SQL Server. You'd use DBCC SHRINKFILE with EMPTYFILE. Substitute xxx based on sys.database_files

share|improve this answer
I created few Ldf files as well what is the best way to remove these.? – icecurtain Jun 20 '11 at 9:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.