Use QPAccountsDB
NAME,size From sys.database_files
ALTER DATABASE QPAccountsDB SET RECOVERY SIMPLE WITH NO_WAIT ALTER DATABASE QPAccountsDB SET RECOVERY SIMPLE USE QPAccountsDB
DBCC SHRINKFILE(N'QPAccountsDB_log',0,ONLY)
ALTER DATABASE QPAccountsDB SET RECOVERY FULL WITH NO_WAIT ALTER DATABASE QPAccountsDB SET RECOVERY FULL
GO
Use QPTreasureDB
NAME,size From sys.database_files
ALTER DATABASE QPTreasureDB SET RECOVERY SIMPLE WITH NO_WAIT ALTER DATABASE QPTreasureDB SET RECOVERY SIMPLE USE QPTreasureDB
DBCC SHRINKFILE(N'QPTreasureDB_log',0,ONLY)
ALTER DATABASE QPTreasureDB SET RECOVERY FULL WITH NO_WAIT ALTER DATABASE QPTreasureDB SET RECOVERY FULL

未经允许不得转载! 作者:棋牌源码网,转载或复制请以超链接形式并注明出处棋牌源码网

原文地址:《数据库日志过大,执行简单几句语句即可缩小数据库日志》发布于:2021-08-06