HOW TO BACKUP DATABASE IN SQL?

302 viewsSQLSQL
0

HOW TO BACKUP DATABASE IN SQL?

Saraswat World Changed status to publish June 8, 2023
0
BACKUP DATABASE in SQL
BACKUP DATABASE in SQL

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.

Saraswat World Changed status to publish June 8, 2023
Write your answer.

Posted

in

Tags:

Comments

Leave a Reply

A Tribute to Dilip Kumar