USE[master] GO ALTER DATABASE mydbname SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE mydbname SET RECOVERY SIMPLE --簡單模式 GO USE mydbname GO DBCC SHRINKFILE (N'mydbname_Log' , 11, TRUNCATEONLY) GO USE[master] GO ALTER DATABASE mydbname SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE mydbname SET RECOVERY FULL --還原為完全模式 GO