SELECT NAME, recovery_model_desc FROM sys.databases --查看数据库的模式 ALTER DATABASE TOMS SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE TOMS SET RECOVERY SIMPLE --简单模式 GO USE TOMS GO DBCC SHRINKFILE (‘TOMS_log‘ , 1, TRUNCATEONLY) GO USE [master] GO ALTER DATABASE TOMS SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE TOMS SET RECOVERY FULL --还原为完全模式 GO
时间: 2024-10-19 08:52:37