use [DB Name] Select NAME,size From sys.database_files GO ALTER DATABASE [DB Name] SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE [DB Name] SET RECOVERY SIMPLE GO DBCC SHRINKFILE(N'[DB Name]_log',0,TRUNCATEONLY) GO ALTER DATABASE [DB Name] SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE [DB Name] SET RECOVERY FULL
清日志失败,错误大概是逻辑日志正在使用blabla,在配置工具里面把tcp/ip访问全部禁掉,无效,翻阅了n多stackoverflow,终于找到个对题的,因为sqlserver复制的原因造成的,使用sp_removedbreplication后,再次执行上面的sql语句,ok。