I'm running a query that inserts about 500,000 rows into a table. The query fails with this error:
Msg 9002, Level 17, State 4, Line 1
The transaction log for database 'database' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
This happens even if I run dbcc shrinkfile right before I run this query. I've tried this in both Simple recovery mode and Full recovery mode, with the same result.
From what I can tell, the transaction log isn't truncating because it is filling up in the middle of one active transaction. What do I do in this instance?