Sql Backup Database

Backup Database:- The BACKUP DATABASE statement is used to create a full backup of an existing SQL Database.

SYNTAX:-

BACKUP DATABASE databasename
TO DISK = 'filepath';

The SQL BACKUP WITH DIFFERENTIAL STATEMENT:-

A differential back up only backs up the part of the database that have changed since the last full database backup.

SYNTAX:-

BACKUP DATABASE databasename
TO DISK ='filepath'
WITH DIFFERENTIAL;

EXAMPLE:-

The following SQL statement creates a full back up of the existing database "test" to the D disk:-

BACKUP DATABASE test
TO DISK = 'D:\backups\test.bak';

Backup With Differential Example:-

BACKUP DATABASE test
TO DISK 'D:\backups\test.bak';
WITH DIFFERETIAL;

A differential backup reduces the backup time (since only the changes are backed up).

Comments

Popular posts from this blog

ASP.NET Overview

SQL AND ,OR, NOT Operators

SQL Joins