先改爲簡單模式,再清除日誌,再改回原來模式日誌
USE [oms20190322]
GO
ALTER DATABASE oms20190322 SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE oms20190322 SET RECOVERY SIMPLE
--簡單模式
GO
USE oms20190322
GO
DBCC SHRINKFILE (N'nh_oms_log' , 11, TRUNCATEONLY) --這裏的名稱須要到查詢(SELECT file_id, name FROM sys.database_files;)邏輯名稱
GOfile
USE oms20190322
GO
SELECT file_id, name FROM sys.database_files;
GO
USE [oms20190322]
GO
ALTER DATABASE oms20190322 SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE oms20190322 SET RECOVERY FULL
--還原爲徹底模式
GO查詢