I have SQL Server Express 2019 on my local system on a large SSD with >50Gb free disk space.
I had a 14Gb database on production, which I copied, deleted a bunch of old data, and reduced the size below 10G, backed up and restored it on my local system. With some use, the local database then auto grew to 10G but still has a bunch of free space.
Now it has started giving me the insufficient disk space error when inserting a record in for some tables (not all which is so weird):
Could not allocate a new page for database 'MyDB' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
When I run the shrink database command, it just clears the log and does not release the free space in the data file. I have tried a variety of ways. It seems like the shrink database command itself needs some space and not getting it even thought the data file has a lot of space. Any ideas?