I'm trying to delete 30 percent of rows from a table. Database is at maximum. This table is using 5GB of my data and i want to delete half of it at least. I tried running with 1 percent, same result.
I run the following
DELETE TOP (30) PERCENT
FROM [database1].[dbo].[tablenamegoeshere]
DELETETOP(30)PERCENTFROM[database1].[dbo].[tablenamegoeshere]
I get the following error
Msg 1105, Level 17, State 2, Line 1
Could not allocate space for object 'dbo.tablenamegoeshere.'tablenamegoeshere_randomnr_DF98CDFD5E3FF0B0' in database 'database1' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
Any workaround ?
If i truncate the whole table then my program doesn't work....