The transaction log records the operations on the relevant database and also stores information related to database recovery. There are many reasons to shrink the log, some due to insufficient space, and some due to application limitations. The following describes the shrinking operation in simple mode. 1. Command line USE MASTER GO ALTER DATABASE {DBName} SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE {DBName} SET RECOVERY SIMPLE --Simple mode GO USE {DBName} GO DBCC SHRINKFILE (N'{DBName}_Log', 8, TRUNCATEONLY) GO USE MASTER GO ALTER DATABASE {DBName} SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE {DBName} SET RECOVERY FULL --Restore to full mode 2. Step-by-step operation through the graphical interface 1. Open the database properties window 2. Change the database recovery mode from "full" to "simple" 3. Shrink the database log, "Task" -> "Shrink" 4. After shrinking, change the recovery mode of the database to "full" The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Element dynamic routing breadcrumbs implementation example
1. Preparation Middleware: Tomcat, Redis, Nginx J...
Table of contents Problems encountered during dev...
Data migration needs to be imported from MySQL to...
The following is the configuration method under c...
Use javascript to implement a fixed sidebar, for ...
Preface Node will be used as the middle layer in ...
I encountered a problem when I turned on my lapto...
Regarding the nginx panic problem, we first need ...
Preface This article mainly summarizes some of th...
The META tag, commonly referred to as the tag, is...
question By clicking a control, a floating layer ...
This article shares the specific code of JavaScri...
Docker Toolbox is a solution for installing Docke...
question Recently, when I was completing a practi...
For some systems with large amounts of data, the ...