SQL Server database prompts "tempdb" log is full solution, sqlservertempdb

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.