Recently, a website is made. After uploading online, traffic is still relatively large, and the resulting database is rapidly increased, and there is also a database log for synchronization.
The database log is a transaction for each operation of the database, and the role is to restore when the database data is corrupted. (Equivalent to the unfinished rollback of the transaction recorded, the completed order is executed).
However, if the website's database backup is more frequent, and the data does not need to be very accurate, then the log file may be inconvenient to bring you this time. After the database update is more, the log file volume will change Very large, even more than the database file, this kind, the space is a lot of waste, if the size is limited, it will become more than the specified volume, the user access page is prompting the log file is full.
At this time, we can use the compression log, the specific method is used
Dump Transaction "Skyfire" with no_log
DBCC ShrinkFile ('Skyfire_log', 100)
This can compress the database log to the specified value, but it seems that there is no fundamental problem, and better solutions have to be considered ...