SQL Server 2017 Restore

Hi,

In this article, I will explain the Restore in SQL Server 2017.

 

You can read SQL Server 2017 Backup Tutorials before this article.

SQL Server 2017 Backup -3

 

 

Firstly go to Database tab and right click then click Restore database.

After that Choose Source as Device, then Select backup devices like following.

 

blank

 

 

You can change Filename when restore database files like following.

blank

 

You can choose Restore options in the following screen.

I will restore transaction logs additional after full database restore. So I have chosen Restore with norecovery. Additional transaction logs can be restored.

blank

 

 

You can restore database with following T-SQL Code.

USE [master]
RESTORE DATABASE [TEST] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\TEST.bak' WITH FILE = 2, NORECOVERY, NOUNLOAD, STATS = 5

GO

 

After Restore database is completed with norecovery mode, we can restore transaction logs to recover database up to date.

You can right click related database and choose Restore–>Transaction log like following.

blank

 

 

Choose Restore source from Device as latest Transaction logs like following.

 

blank

 

 

You can choose Recovery state as Recovery in this step like following. If you have more transaction logs to restore, then you should choose with norecovery mode in this step.

blank

 

You can restore transaction logs with following T-SQL Code.

RESTORE LOG [TEST2] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\TransactionlogBackup.trn' WITH FILE = 2, NOUNLOAD, STATS = 10
GO

 

 

After restore database is completed, we have restored TEST database as TEST2 like following.

blank

 

 

 

Do you want to learn Microsoft SQL Server DBA Tutorials for Beginners, then read the following articles.

https://ittutorial.org/sql-server-tutorials-microsoft-database-for-beginners/

 708 views last month,  3 views today

About Mehmet Salih Deveci

blank
I am Founder of SysDBASoft IT and 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.

2 comments

  1. blank
    Y.RAMBABU REDDY

    Hi sir,i need to learn more about sql dba ,so send me more related concepts to my email.
    thankyou.

Leave a Reply