SQL Server Full Backups

Overview

The most common types of SQL Server backups are complete or full backups, also known as database backups.  These backups create a complete backup of your database as well as part of the transaction log, so the database can be recovered. This allows for the simplest form of database restoration, since all of the contents are contained in one backup.

Explanation

A full backup can be completed either using T-SQL or by using SSMS.  The following examples show you how to create a full backup.

Create full SQL Server database backup to one disk file

T-SQL

This will create a full backup of the AdventureWorks database and write the backup contents to file “C:\AdventureWorks.BAK”.  The .BAK extension is commonly used for identifying that the backup is a full database backup.

BACKUP DATABASE AdventureWorks TO DISK = 'C:\AdventureWorks.BAK'
GO

SQL Server Management Studio

  • Right click on the database name
  • Select Tasks > Backup
  • Select “Full” as the backup type
  • Select “Disk” as the destination
  • Click on “Add…” to add a backup file and type “C:\AdventureWorks.BAK” and click “OK”
  • Click “OK” again to create the backup
backup database with ssms

Here is what this looks like in a different version of SSMS.

backup database with ssms

2 Comments

  1. ===================================

    Backup failed for Server ‘5.189.147.163\MSSQLSERVER2017’. (Microsoft.SqlServer.SmoExtended)

    ——————————
    For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=16.100.46367.54+(SMO-master-A)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Backup+Server&LinkId=20476

    ——————————
    Program Location:

    at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)
    at Microsoft.SqlServer.Management.SqlManagerUI.BackupPropBackupOptions.OnRunNow(Object sender)

    ===================================

    System.Data.SqlClient.SqlError: Cannot open backup device ‘C:\AC_BACKUP\test.BAK’. Operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Smo)

    ——————————
    For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=16.100.46367.54+(SMO-master-A)&LinkId=20476

    ——————————
    Program Location:

    at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages, Boolean retry)
    at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
    at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)

Leave a Reply

Your email address will not be published. Required fields are marked *