SQL_Backup Script dosya kodu(SQLYedekBat)
declare @name varchar(50) declare @path varchar(50) declare @filename varchar(50) declare @filedata varchar(50) set @path='D:\SQL_Yedek\' select @filedata = CONVERT(varchar(20),GETDATE(),112) declare db_cursor cursor for select name from master.sys.databases WHERE name NOT IN ('master','model','msdb','tempdb') OPEN db_cursor fetch next from db_cursor INTO @name WHILE @@FETCH_STATUS=0 BEGIN set @filename=@path+@name+'_'+@filedata +'.BAK' BACKUP DATABASE @name TO DISK =@filename WITH DIFFERENTIAL FETCH NEXT FROM db_cursor INTO @name end close db_cursor DEALLOCATE db_cursor <hr />