declare @filename nvarchar(100) set @filename='E:/数据库/ERPDATA'+convert(char(10),getdate(),112) +'全备份' BACKUP DATABASE [ERPDATA] TO DISK = @filename WITH NOINIT , NOUNLOAD , NAME = N'addin 备份', NOSKIP , STATS = 10, NOFORMAT --二、清空日志 dump transaction ERPDATA with no_log --三、截断事物日志 backup log ERPDATA with no_log --四、收缩数据库 dbcc shrinkdatabase (ERPDATA)