BACKUP DATABASE is used to create full backup of an existing SQL SERVER database.
Syntax of BACKUP DATABASE in SQL โ
BACKUP DATABASE <database_name>
TO DISK = โfilepathโ;
Example of BACKUP DATABASE in SQL-
BACKUP DATABASE Northwind
TO DISK = โC:\backups\Northwind.bakโ;
โThis SQL statement will create a full back up of the existng database โNorthwindโ to C: drive.
BACKUP DATABASE โฆ.WITH DIFFERENTIAL SQLstatement is used to create backup of the parts of the database that have changed since the last full backup of an existing SQL SERVER database.
Syntax of BACKUP DATABASE ..WITH DIFFERENTIAL in SQL โ
BACKUP DATABASE <database_name>
TO DISK = โfilepathโ
WITH DIFFERENTIAL;
Example of BACKUP DATABASE ..WITH DIFFERENTIAL in SQLโ
BACKUP DATABASE Northwind
TO DISK = โC:\backups\Northwind.bakโ
WITH DIFFERENTIAL;
โThis SQL statement will create a DIFFERENTIAL back up of the existng database โNorthwindโ to C: drive.
Note-
Northwind sample database is used for example.
Leave a Reply