Recently experienced a server SQL server The database server-side transaction log is full, which causes the server database to write no data. After the occurrence of this event, I would like to advise all colleagues that if there is no absolute sufficient storage space, the database transaction log file must not take a complete backup. The amount of backup data is beyond your endurance. A simple backup is OK. The following is a contraction Database transaction log operation, I hope to help you!
The database transaction log is contracted through the graphical interface as follows:
Step 1: right click database properties
Step 2: change the database recovery mode from “complete” to “simple”
Step 3: right click the database and click tasks > shrink > file
Step 4: shrink the database log, select the file type log, and shrink the file to the minimum size in the shrink operation
Note: if the disk space is full and the database transaction log file cannot be shrunk, you can first isolate some unused databases, and then copy the MDF and LDF files to other free disks to free disk space. After the log shrinks, attach the separated database files again.
To separate the database, right-click and select task > detach, as shown in the following figure:
The above is the whole content of this article, I hope the content of this article has a certain reference learning value for your study or work, thank you for your support to developeppaer.