During development, database operations were performed frequently. Although there was a small amount of data in the database, the log files were extremely large and inconvenient for database migration, in this case, data shrinkage is used to reduce
The size of the log file.
The specific method is as follows:
1. Set database mode to simple mode: Open the SQL Enterprise Manager, in the root directory of the console, open Microsoft SQL Server --> SQL Server group --> double-click your Server --> double-click to open the database directory --> select your database name (such as the Forum database) forum) --> then right-click and select Properties --> Select Options --> select "simple" in the fault recovery mode, and click OK to save
2. Right-click the current database to view the shrinking database in all tasks. Generally, the default settings in the database do not need to be adjusted. Click OK directly.
3. After the database is shrunk, we recommend that you set your database attributes to the standard mode. The operation is the same as the first one, because logs are often an important basis for database recovery in case of exceptions.