I am running SQL Server in Windows 10. I have gotten one of the following two errors in all recent queries:
The transaction log for database 'MyDB' is full due to 'ACTIVE_TRANSACTION'.
An error occurred while executing batch. Error message is: There is not enough space on the disk.
I have tried DBCC SQLPERF('logspace')
to analyze disk space. The database has very little log space after attempting to perform a query as suggested here. I do not anticipate being able to resolve the issue by shrinking the log file. I tried CREATE DATABASE
, then
SELECT *
INTO new_db.table
FROM old_db.table
The following error occurs:
Msg 1101, Level 17, State 12, Line 2
Could not allocate a new page for database 'new_db' 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.
I have deleted log files from C:\Users\username\AppData\Local\Temp
, but the same exceptions occur. I have also cleaned files from my hard drive and recycle bin, as well as defragmenting my hard drive. I have tried adjusting the path for query results to a different directory (Tools>Options>Query Results). I have also dropped a number of tables from the database, exited SQL Server and reconnected, as well as shutting down my computer and restarting it.