How to create a copy of data in MS SQL Server
This is the guide to create backup for database in MS SQL Server.
Backup is a data backup / database. Backing up databases in MS SQL Server is very important to protect data before losing databases. There are 3 main backup types in MS SQL Server: Full / Database, Differential / Incremental, Transactional Log / Log.
Here are 2 ways to create a backup of databases in MS SQL Server.
Method 1: Use T-SQL
Full / Database
Backup database to disk = ''
Differential / Incremental
Backup database to
disk = '' with differential
Transactional Log / Log
Backup log to disk = ''
For example: The following command is used to backup the entire database (Full / Database) named TestDB to the address D: with the name of the backup copy is TestDB_Full.bak
Backup database TestDB to disk = 'D:TestDB_Full.bak'
The following command is used to back up changes since the last backup on the database (Differential / Incremental) named TestDB to address D: with the name of the backup copy is TestDB_Full.bak
Backup database TestDB to disk = 'D:TestDB_diff.bak' with differential
The following command is used to back up the order of all transactions since the last transaction Log backup on the database (Transaction Log / Log) named TestDB to the address D: with the name of the backup copy is TestDB_Full.bak
Backup log TestDB to disk = 'D:TestDB_log.trn'
Method 2: Use SQL Server Management Studio (SSMS)
Step 1 : Connect to the database installation named TESTINSTANCE and open the database directory as shown below.
Open the database directory
Step 2: Right-click on the Testdb database and select Backup backup task , then the screen below will appear.
Information to select the backup form for the database
Step 3: Select the type of database backup and choose the correct path for the copy to be saved. Select Options in the upper left corner of the screen, then the following dialog box will appear.
Select to backup another database
Step 4: Select OK to create a backup for TestDB as shown in the image below.
Create a successful backup
Check in the selected directory path, you will see the backup file.
The backup file of the TestDB database has just been created
Previous article: How to delete the database in MS SQL Server
Next lesson: How to recover the database in MS SQL Server
You should read it
- Install Windows Server 2003 and create a backup server
- Delete log information in Windows Server Backup
- Install Windows Server Backup on Windows Server 2008 R2
- Create VPN Server on Windows 8
- What is VPS? VPS used to do? What is VPS different from Server?
- Instructions for setting up individual FTP Server with FileZilla
- Automatically backup web server data with WinSCP via FTP
- The difference between web server and app server
- Network basics: Part 3 - DNS Server
- SQL Server 2019 - Microsoft Relational Database Management System
- Learn about the architecture of MS SQL Server
- Data types in SQL Server
Maybe you are interested
5 quietest keyboards Invite to download the space theme wallpapers on the NASA XS inspired by NASA Fix applications in Microsoft Office 2007 8 makeup tips to make you look 'more attractive' If we bring a part of the Sun to Earth, what terrible thing will happen? History of Earth formation and 25 milestones (Part I)