2

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?

migrated from stackoverflow.com 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
2

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

DBCC SHRINKFILE (xx, EMPTYFILE)
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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