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.

One thought on “SQL Server 2017 Backup -3

  • June 24, 2019 at 1:11 pm
    Permalink

    Good describing document.
    And by using SPFS, it will soon be possible to backup the databases directly to the Spectrum Protect backup server, without Learning or using the TDP (Tivoli Data Protector) nowadays Spectrum Protect for Databases.
    Just mount the SPFS as N:\ , and use the same good descriptive details to protect the database with Spectrum Protect.

    SPFS – is a filesystem for Spectrum Protect
    SPFS makes it possible to mount the Spectrum Protect filespaces anywhere on your server, and use that mount-point to backup anything.
    All operations that goes via this mount-point, are translated directly into Spectrum Protect Client API calls, so no local cache or staging disk is needed.

    Is the data secure?
    Of-course it is, the SPFS is a WORM media (Write Once Read Many), similar to CD.
    You can save the data once, but can’t change it afterwards.
    If you save once again, than there are two versions of the file…

    Reply

Leave a Reply

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