Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对一个有很多记录的表进行了删除操作,所以我的日志文件从 15 GB 增长到了 58 GB。在某些时候,我取消了删除查询的执行,因为我的硬盘空间不足。我在这里看到了如何删除这么多数据。我的问题是如何将日志文件的大小减小到 15 GB?
如果您使用full恢复模型,那么您实际上是在日志中保留了数据库的所有历史记录。
full
您很可能希望切换到simple恢复模式,然后DBCC SHRINKFILE按照其他人的建议进行。
simple
DBCC SHRINKFILE
请参阅此处:https ://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server?view=sql-server-ver15