A very useful script to generate a backup file in SQL server by day of week and not have to create a maintenance plan.

declare @a as nvarchar(200)
set @a=N'\\backupserver\backups\ddbb' + DATENAME(WEEKDAY, GETDATE()) + '.tbk'
BACKUP DATABASE [bbdd] TO  DISK =@a WITH NOFORMAT, INIT,  NAME ='copia', SKIP, NOREWIND, NOUNLOAD, COMPRESSION,  STATS = 10
GO
Facebooktwitterredditpinterestlinkedinmail