title: Dump database with date added in filename
body: <p>Hi i have created this to try to dump a database with date added to the filename. But it fails apparently i cannot execute the @dumptorun correctly.</p>
  
  <pre><code> declare @pvm varchar(30), @dumptorun varchar(300), @dbname varchar(70)
   select @pvm=(CONVERT(varchar(30), GETDATE(), 112))
   select @dbname='master'
   select @dumptorun = 'dump database '+@dbname+' to d:\temp\'+@dbname+'_'+@pvm+'.dmp go'
   select @dumptorun
  EXEC ( @dumptorun )
  </code></pre>