I have a rather heavy DELETE operation that tries to delete rows in a temp table which do not have a match in another database table.
DELETE FROM ##SendRecipients
WHERE Id NOT IN (SELECT RecipientId FROM MyDB.dbo.Results)
After about 10 minutes, I get the follwoing error message:
The transaction log for database 'tempdb' is full due to 'ACTIVE_TRANSACTION'.
My attempts at adding a new log file for tempdb was to no avail. And now the database files together with the .ldf files of the log (spread across three drives), have clogged the server space.
Is there a way to tell tempdb not to use a log, at least only for this operation? It seems like one cannot modify much in tempdb.
Does moving the temp tables inside the databases help as an alternative?
NOT EXISTSclause to theINSERTstatement?DBCC OPENTRAN- look for open transactions, maybe there are culprits, b) check if it's not a case, c) "moving the temp tables inside the databases" - certainly could solve the problem but another problems could arise