/* Katherine Villyard, posted 8/31/12
http://www.katherinevillyard.com/2012/08/31/windows-internal-database-maintenance/
*/

Declare @today nvarchar(50), 
     @SQL nvarchar(4000) 
 

set @today = convert(nvarchar,GETDATE(),12)      
 
     set @SQL='BACKUP DATABASE [SUSDB] TO  DISK = N''F:\SQL\SUSDB-'+ @today +'.bak'' WITH FORMAT, INIT,  NAME = N''SUSDB-Full Database Backup'', SKIP, NOREWIND, NOUNLOAD,  STATS = 10' 
     EXEC SP_EXECUTESQL @SQL 
