SQL Server database prompts "tempdb" log is full solution, sqlservertempdb
Execute SQL statements. Temporary tables are not used in the middle.
Prompt server: Message 9002, Level 17, status 2, Row 1 Database 'tempdb' logs are full. Back up the transaction logs of the database to release some log space.
I found a solution on the Internet, which roughly solved the problem by expanding the log file size of the temporary database.
Solution Process:
The following figure shows the database attributes, which are automatically increasing without specifying the maximum file size.
Google has been on the Internet for a long time, and I have tried some methods. The disk where the database is located has a lot of available space, and I tried to take some heavy medicine.
Change the size of the tempdb data file and log file to 3000 MB,
Solve the problem.
Record the command for clearing logs:
DUMP TRANSACTION dbname WITH NO_LOG
Transaction Log truncation command:
BACKUP LOG dbname WITH NO_LOG
Log shrinking:
Right-click Database-properties-all tasks-shrink database-file-Select File-OK.
Although the log clearing command is used to clear the logs of tempdb, the problem cannot be solved. Therefore, the size of data files and log files in tempdb is expanded,
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 DATABASE [tempdb] MODIFY FILE (NAME = N'tempdev ', SIZE = 1000)
The log of the database 'tempdb' is full. Back up the transaction log of the database to release some transaction space.
Select the database tempdb directly, and then select the database to shrink or use the Truncated Log.
The log of the database 'tempdb' is full. ing
Query Analyzer
Use tempdb
Select * from tempdb. dbo. sysfiles
Dump transaction tempdb with no_log
Dbcc shrinkfile ('templog', 1)
Select * from tempdb. dbo. sysfiles