Archive

Posts Tagged ‘BACKUP DATABASE’

Database backup to Azure blob storage with SQL Server 2016+

February 9, 2021 Leave a comment

 
Backup to Azure was made available with SQL Server 2012 SP1 CU2. It provided significant cost savings versus on-premises costs of onsite/offsite storage, and device maintenance and better scalability than logical drives connected to Azure machines.

But backup to Azure was comparatively slow, and the maximum backup size was 1 TB, till SQL Server 2014.

 
Now with SQL Server 2016+ backup to block blobs offers more cost-effective storage, performance increases with backup striping and a faster restore process, support for larger backups, up to 12 TB, as well as granular access and a unified credential story.

Backup to block blobs also supports all of the existing backup and restore features, with the exception that appends are not supported.
 


 

For detailed information please check the Quickstart guide to SQL backup and restore to Azure Blob storage service


SQL Basics – Backup and Restore Database in SQL Server

June 5, 2010 1 comment

–> SQL Script to take Backup of a database:

USE [master]
GO

BACKUP DATABASE [AdventureWorks2014]
	TO  DISK = N'D:\SQL\AdventureWorks2014.bak' WITH NOFORMAT, 
	NOINIT,  
	NAME = N'AdventureWorks2014-Full Database Backup', 
	SKIP, 
	NOREWIND, 
	NOUNLOAD,  
	STATS = 10
GO

 

–> SQL Script to Restore a Backup file:

USE [master]
GO

RESTORE DATABASE [TestManDB2] FROM  DISK = N'D:\SQL\TestManDB.bak' WITH FILE = 1,  
	MOVE N'TestManDB' TO N'D:\MSSQL\DATA\TestManDB2.mdf',  
	MOVE N'TestManDB_log' TO N'D:\MSSQL\DATA\TestManDB2_log.ldf',  
	NOUNLOAD,  
	STATS = 5
GO

 

–> Video on how to backup and restore a database: