Execute SQL statement with no temporary table in the middle
Prompt server: Message 9002, Level 17, State 2, row 1
database ' tempdb ' logs are full. Please back up the transaction log of the database to free up some log space.
On the Internet to find a solution, is to expand the temporary library of the size of the log file to solve
Resolution process:
View the properties of the following database, which is automatically growing without specifying a maximum file size.
Google on the internet for a long time, tried some methods are not; The database contains a lot of free space on the disk and try to get the heavy medicine down.
Change the size of tempdb's data file and log file directly to 3000M,
Solve the problem.
Record the command to empty the log:
DUMP TRANSACTION dbname with no_log
Truncate the transaction log command:
BACKUP LOG dbname with no_log
Shrink Log Action:
Right-click Database-Properties-All Tasks-Shrink database-file-select File-ok.
Although the log for tempdb was emptied with the empty log command, the problem was not resolved. This expands the size of the data files and log files in tempdb,
ALTER DATABASE [tempdb] MODIFY file (name = N ' Templog ', MAXSIZE = unlimited)
ALTER DATABASE [tempdb] MODIFY file (name = N ' templog ', filegrowth = 10%)
alter DATABASE [tempdb] MODIFY FILE (NAME = n ' templog ', SIZE = 1000)
alter Datab ASE [tempdb] MODIFY FILE (NAME = N ' tempdev ', SIZE = 1000)