/* Daily Full backup of i8* databases
20140403 JJM (c) i8 solutions
*/
DECLARE @eSQL NVARCHAR(MAX)
DECLARE C cursor for
select 'BACKUP DATABASE ['+name+'] TO DISK = N''D:\i8\BU\'+ name +'.bak'' WITH NOFORMAT,
INIT,
NAME = N'''+ name + '-Full Database Backup'',
SKIP,
NOREWIND,
NOUNLOAD,
STATS = 10' from master.sys.databases
where name like 'i8%'
OPEN C
FETCH NEXT FROM C INTO @eSQL
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC (@eSQL);
FETCH NEXT FROM C INTO @eSQL
END
CLOSE C
DEALLOCATE C
Till Next Time
multiple first day of week
-
Nice trick:
http://richardlees.blogspot.nl/2015/08/supporting-multiple-first-day-of-week.html
No comments:
Post a Comment