I have been tasked with migrating file data from one SQL server DB to another. There is currently a SQL server 2005 DB that is stored file in an image type field. There is a migration happening that is moving these files to a SQL 2008 Filestream setup, which works great. The files are being migrated in batches, but I have run into a problem as the file size of the DB is not decreasing. The migration script moves the batch then deletes the batch. The records are no longer available by query in the old database and they have moved successfully, but like I said the file size does not budge.
I need the size to decrease to allow for the next batch as the initial DB is nearly 1TB, there is just not enough room to have two copies.
I have tried SHRINKFILE, but that is not working. Any help is appreciated.