全备份:
declare @sql varchar(5000)
select @sql='backup database '+'test'+' to DISK='''+'e:\'+'test'+convert(varchar(20),getdate(),12)+'.bak'''
增量备份:
declare @sql varchar(5000)
select @sql='backup database '+'test'+' to DISK='''+'e:\'+'test'+convert(varchar(20),getdate(),12)+'.bak'''+' with differential'
execute sp_sqlexec @sql
阅读(1355) | 评论(0) | 转发(0) |