1. Crating Database backup using T-Sql

The following T-Sql Format could be use to create database backup.

BACKUP DATABASE database_name TO DISK= ‘Path’

Let we want to create backup of database Test in ‘D:\Backup’ path.

To do that you have to share the ‘D:\Backup’ Folder and provide full control permission to every one.

image

 

Now you can execute the T-Sql:

USE master;
ALTER DATABASE Test SET RECOVERY FULL;
— Back up the Test database to new media set (backup set 1).
BACKUP DATABASE Test
  TO DISK = ‘C:\Backup\Test.bak’ WITH FORMAT;

Also if you want to backup the log you can execute the following command:

GO
–Create a routine log backup (backup set 2).
BACKUP LOG Test TO DISK = ‘C:\Backup\TestLog.bak’;
GO

Advertisements