SQL Server log clearance and prohibiting log files increase

xiaoxiao2021-03-06  79

1. Right-click the database northwind: Property in Enterprise Manager -> Select Options -> Select "Simple" in the fault reduction mode;

2. Right-click on the database northwind: All tasks, shrink the database.

3,

After the shrink database is completed, it is recommended to reset your database properties to standard mode, and the operation method is the first point, because the log is often the important basis for restoring the database in some abnormalities, setting the database's fault reduction model to "simple" It will cut off the log when checkpoint. Or inside Query Analyser or ISQL: exec sp_dboption 'northwind', 'trunc. Log on chkpt.', 'True' is OK. However, pay attention is that after doing this, although the log will not increase, it also means that once you have an error, you will not have an opportunity to use log recovery.

转载请注明原文地址:https://www.9cbs.com/read-108041.html

New Post(0)