SQL Server 2017 Backup -3

Hi,

In this article, I will continue to explain you backup types in the SQL Server 2017.

 

Read previous article before this.

 

You can Differential back up SQL Server database like following, using SQL Server Management Studio ( Right Click related database—> Tasks–> Back up )

 

Or you can Differential back up in SQL Server database using T-SQL Code like following.

BACKUP DATABASE [TEST] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\Differential.bak' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N'TEST-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO

 

 

 

In order to take Transaction Log backup in SQL Server, Recovery Model must be full. To do this, right-click on our database, click Properties and click on the Options tab in the menu that appears. As shown in the image below, change the Recovery Model from Simple mode to Full mode.

 

If database’s Recovery model is full, then You can back up of Transaction log SQL Server database like following, using SQL Server Management Studio ( Right Click related database—> Tasks–> Back up )

 

 

Or you can back up of Transaction log in SQL Server database using T-SQL Code like following.

BACKUP LOG [TEST] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\TransactionlogBackup.trn' WITH NOFORMAT, NOINIT, NAME = N'TEST-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO

 

Compression is very important for storage utilization, You can back up database compressed in the SQL Server like following.

 

 

 

 

Or you can  back up Full Compressed in SQL Server database using T-SQL Code like following.

BACKUP DATABASE [TEST] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\CompressedFullBackup.bak' WITH NOFORMAT, NOINIT, NAME = N'TEST-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10
GO

 

SQL Server Backup is completed, I will explain the Restore and Recover in the SQL Server in the next post.

Mehmet Salih Deveci

I am Founder of IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress mehmetsalih.deveci@outlook.com.-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  mehmetsalih.deveci@outlook.com a mail atabilirsiniz.

Leave a Reply

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