Saturday, April 25, 2015

we can delete datafiles with the following commands. Current data will move to other available datafiles.

DBCC SHRINKFILE (datafile4, EMPTYFILE);
GO

-- Remove the data file from the database.

ALTER DATABASE AdventureWorks2008R2
REMOVE FILE datafile4;
GO