SQL Server Backup – How to Take Full and Differential Backups of All Databases

backupsql server

Can anyone help me with a script to take a full or complete backup of all databases once in a week and to take differential backups daily. ?

Best Answer

I believe @Les H has already answered and Yes, ola's script should do the work here without any issues.

However as per the MS Link you can also do something like:

  1. Use SQL Server Management Studio Express or Sqlcmd to create the following stored procedure in your master database named sp_BackupDatabases. The script to create the SP is available on the link.

  2. create a batch file that will execute the above SP, also specifying the location of backup and its mode, that is Full , differential or log.

  3. Schedule a job by using Windows Task Scheduler to execute the batch file that you created in step 2