Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with SqlServer database prompt "tempdb" log is full

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the "SqlServer database hint" tempdb "log is full of processing methods", in the daily operation, I believe that many people in the SqlServer database prompt "tempdb" log is full of doubts, Xiaobian consulted all kinds of information, sorted out a simple and easy-to-use method of operation, hope to answer the "SqlServer database hint" tempdb "log is full of processing methods" doubt helpful! Next, please follow the editor to study!

Execute the sql statement without using a temporary table

Prompt server: message 9002, level 17, status 2, line 1, the log of the database 'tempdb' is full. Please back up the transaction log of the database to free up some log space.

The next solution has been found on the Internet, which is generally solved by expanding the size of the log files in the temporary library.

Solution process: check the properties of the database, it is automatic growth, do not specify the upper limit of file size. I have been Google on the Internet for a long time, but I have tried some methods. There is still a lot of free space on the disk where the database is located, so I have tried to take heavy medicine. Directly change the size of the data file and log file of tempdb to 3000m, the problem is solved.

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 operation: right-click database-properties-all tasks-shrink database-file-select file-OK.

Although the tempdb log was emptied with the clear log command, it did not solve the problem. So expand the size of tempdb's data files and log files.

ALTER DATABASE [tempdb] MODIFY FILE (NAME = negative templogations, MAXSIZE = UNLIMITED) ALTER DATABASE [tempdb] MODIFY FILE (NAME = nasty templogations, FILEGROWTH = 10%) ALTER DATABASE [tempdb] MODIFY FILE (NAME = nasty templogations, SIZE = 1000) ALTER DATABASE [tempdb] MODIFY FILE (NAME = N'tempdev', SIZE = 1000). This ends the study of "SqlServer database prompts" tempdb "log is full" and hopes to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report