USE [master] GO ALTER DATABASE MDM_OperationBase SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE MDM_OperationBase SET RECOVERY SIMPLE --簡單模式 GO USE MDM_OperationBase GO --收縮日誌文件爲2G = 2000M DBCC SHRINKFILE (N'MDM_OperationBase_Log' , 2000, TRUNCATEONLY) GO USE [master] GO ALTER DATABASE MDM_OperationBase SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE MDM_OperationBase SET RECOVERY FULL --還原爲徹底模式 GO
轉自:https://blog.csdn.net/chadcao/article/details/80029639sql