• More exactly, you first need to empty the file with the command spaghettidba gave you, and then you will be able to remove this file with the following instruction :

    ALTER DATABASE myDB

    REMOVE FILE logicalFileName

    A non-empty file cannot be removed. You can check the amount of space occupied in the file using the FILEPROPERTYEX function and its SpaceUsed parameter, passing the name column of the sys.database_files as the first parameter.

    @++ 😉