I cant remove a file in a filegroup

  • I have 2 files in primary filegroup,

    1 file have 52 GB and I need remove this, but I cant because the one is not empty

    I have shrink this with emptyfile option, but the one have a 0,94 mb occupied and it cannot release it,

    I already probe to do Shrinfile in order to reduce its size, but it does not respond to anything

    the size of the file continuous being 56 GB

    I already put the DB in single user mode, but not work either

    I have SQL 2000 SP3

  • File that was created when you created a database (Primary File) won't be dropped. You should see a message saying something like' Primary file can't be dropped.'

    Only file you can drop after emptying is the one you added to the database later on or at the time of creating the database (secondary File.)

     

  • I don't need remove "Primary Filegroup", I need remove 1 FILE (not filegroup ... 1 file in a Filegroup) In Primary Filegroup i have 2 FILE and i need remove only one.

    in addition on this file I cannot either do shrinkfile, because dont work
  • If you create a database with 2 data files- Both in PRIMARY file Group and if you drop the 1 that's listed first( IN EM- that's primary File- not FG)  it won't work, that's what I meant!

  • You can only remove the second file not the first one.

    To remove the second file.  Backup the database, in Enterprise Manager right click the database, select all tasks, shrink database, then files and choose the second file in the drop down and select Empty the file (Data will migrate to other files in the file group) option and click OK.

    When this has finished, using Enterprise Manager right click the database, select properties and look at the data files.  Select the second file you just emptied and choose Delete.

    You can also do this via Query Analyser but I thought it would be easier to explain it this way instead.

    Please post back if you are still having problems.

    Cheers,

    Angela

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply