USE [master]
GOALTER DATABASE FH2_SJH SET RECOVERY SIMPLE WITH NO_WAITGOALTER DATABASE FH2_SJH SET RECOVERY SIMPLE --简单模式GOUSE FH2_SJHGODBCC SHRINKFILE (N'FH2_log' , 11, TRUNCATEONLY)GO --这里的DNName_Log 如果不知道在sys.database_files里是什么名字的话,可以用以下注释的语句进行查询USE FH2_SJHGOSELECT file_id, name FROM sys.database_files;GOUSE [master]GOALTER DATABASE FH2_SJH SET RECOVERY FULL WITH NO_WAITGOALTER DATABASE FH2_SJH SET RECOVERY FULL --还原为完全模式GO
然后紧缩数据库,在任务选项里。