condensing file group to one

  • I have a question that I hope that I can find help with here.

    Before I started here, the database was defined in several database files (the data files tab in the database properties). 

    I have been tasked with condensing this all done to one database file.

    Does any one know how?

    Thanks in advance.

    F

  • Run dbcc shrinkfile (yourdatabaselogfilename, emptyfile) and alter database to drop the empty file and remove the file group.

    See BOL for details.

  • Thanks for the suggestion, however the database itself is spread accross the dasebase files.

  • Sorry for wrong typing, should be  dbcc shrinkfile (yourdatabaselogicalfilename, emptyfile), you can get logicalfilename from sp_helpfile on your database.

  • Thank you.  I get it. 

     

    Best,

    F

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

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