标签:style blog color ar div art sp log on
declare @dbname varchar(255) declare @back_path varchar(255) set @dbname=‘emcp‘ set @back_path= ‘e:\‘+@dbname+‘\‘+@dbname +convert(varchar(9),getdate(),112) +CAST(datepart(hour,getdate()) as char(2)) +CAST(datepart(minute,getdate()) as char(2)) +CAST(datepart(second,getdate()) as CHAR(2)) +‘.bak‘ exec(‘use [‘+@dbname+‘]‘) exec(‘backup database [‘+@dbname+‘] to disk=‘‘‘+@back_path+‘‘‘‘)
标签:style blog color ar div art sp log on
原文地址:http://www.cnblogs.com/wubin264/p/3973251.html