Information of MS SQL Backup

MSSQL-Feature-Image
We need to backup the following type of data in MS SQL:
  1. Backup database
  2. Backup transaction log
MS SQL can backup by the following type:
  1. Full backup the entire contents of the database and changes made to the database during the backup operation.
  2. Differential backup the differences between the last full database backup and the differential backup operation was executed.
  3. Log backup contains all of the log records since the last log backup.
  4. File backup contains either a file or filegroup.
  5. Partial backup similar to a full backup but excludes all read-only file groups. Read-only database contains the only the primary filegroup.
  6. Tail-Log backup contain all log since the last log backup. It is used in a disaster recovery process.
MS SQL’s log has 3 models:
  1. Full model record every operation for recoverability purposes. It is used in production environment.
  2. Bulk-Logged model only record what were modified. It is used in non-production environment.
  3. Simple model is unable to process log backup. It is used in non-production environment.
How to change log models in GUI:
  1. Open “SMSS” > expand “Databases” > right-click database > select “Properties”
  2. Select “Options” > select the value of “Recovery model:”
How to change log models in T-SQL:
How to backup network shared folder:
  1. It must be using UNC path.
  2. We can add MS SQL Server account to shared folder with full control permission.
Why need to backup to multi-file:
  1. It can make the backup process more faster.
  2. Since the each backup file is smaller, it is easier for movement.
How to backup to multi-file in GUI:
  1. Open “SMSS” > expand “Databases” > right-click database > select “Tasks” > select “Back Up…”
  2. Select “General” > At “Destination” click “Add…” to add multi backup file.
How to backup to multi-file in T-SQL:

Author: Joe Chan