Quantcast
Channel: Cloud Training Program
Viewing all articles
Browse latest Browse all 1902

Restore A Backup Using SQL Server

$
0
0

In this blog, we are going to cover Restore a backup using SQL Server. Restoring is the process of copying data from a backup and applying logged transactions to the data. Restore is what you do with backups. Take the backup file and turn it back into a database.

Topics we’ll cover in this blog:

What is Azure Backup

Azure Backup is a service offered within the platform that allows you to backup and restore your IaaS data both from within Azure and on-premises. The integration out-of-the-box within Azure and the attractive cost point make it a great option for many deployments.

Another advantage is the speed and productivity with which you can test and affirm your required restore processes. This has been as of late enhanced again by the introduction of Instant Restore. This introduces the ability to snapshots taken feature of a backup job, which are then accessible for recuperation without sitting tight for any data move to the vault. This reduces the wait time to trigger a restore.

Data restore is the process of copying backup data from secondary storage and restoring it to its original location or a new location. A restore is performed to return data that has been lost, stolen, or damaged to its original condition or to move data to a new location.

Connect To The VM And Download The Backup File

1.) On the Overview page for the virtual machine, select the Connect button and choose RDP.RDP

2.) On the RDP tab, select the Download RDP File button.download

3.) Open the RDP file that was just downloaded. When a dialog appears asking if you want to connect, select the Connect button.Picture 23

4.) Enter the username and password selected during the virtual machine provisioning process. Then select the OK button.

5.) When the Remote Desktop Connection dialog appears asking if you want to connect, select the Yes button.Picture 26

6.) A Remote Desktop window will open. On the right, select the No button to indicate you do not want the computer to be discoverable by other devices on the network. Close the small Server Manager popup dialog by clicking the X in the top right of the box. Keep the big Server Manager Window open.

7.) In the Server Manager window, select the local server on the left and then select On next to IE Enhanced Security Configuration.

8.) When the Internet Explorer Enhanced Security Configuration dialog appears, set administrators to Off. Then select the OK button.Picture 29

9.) Open Internet Explorer by selecting the icon from the taskbar.Picture 30

10.) In Internet Explorer, navigate to the following URL:
https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorksDW2017.bak
A dialog will appear asking if you would like to run or save the file.

11.) In the dialog, select the dropdown next to Save and choose Save As.

12.) In the Save As dialog, navigate to the following folder location:
‎C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup.
‎ Leave the file name as AdventureWorksDW2017 and the type as BAK file. Select the Save button.

Restore The Database And Verify Its Availability

1.) Select the windows start button and type SSMS. Select Microsoft SQL Server Management Studio 18 from the list.Picture 34

2.) When Management Studio opens, the Connect to Server dialog will be pre-populated to the local machine. Select the Connect button.Picture 35

3.) In the Object Explorer, right-click on the Databases node and choose Restore Database.Picture 36

4.) In the Restore Database dialog, select Device under Source, and select the button to the right of the device labeled with an ellipsis.Picture 37

5.) In the Select backup devices dialog, select Add.Picture 38

6.) In the Local Backup File dialog, select AdventureWorksDW2017.bak and select the OK button.Picture 39

7.) Verify that there is now one item listed under backup media in the Select backup devices dialog. Then select the OK button.Picture 40

8.) Verify that there is one item listed under backup sets to restore in the Restore Database dialog. Then select the OK button.Picture 41

9.) Once the database restore completes, a dialog box will appear with the message “Database ‘AdventureWorksDW2017’ restored successfully”. Select the OK button.Picture 42

10.) In the Object Explorer, expand the Databases node, then expand the AdventureWorksDW2017 node, then expand the Tables node. Verify that the database contains several tables including dbo.DimAccount.Picture 43

11.) In Management Studio, select the AdventureWorksDW2017 node in the Object Explorer. Then select the New Query button.Picture 44

12.) Copy and paste the following statement into the new query window.

SELECT CalendarYear, Sum(SalesAmount) SalesAmount
FROM dbo.FactInternetSales FS
INNER JOIN dbo.DimDate DD ON FS.OrderDateKey = DD.DateKey
GROUP BY CalendarYear

Picture 45

13.) Select the Execute button that executes the query. Verify that the sales amount for 2010 is 43421.0364.

Related/References

Next Task For You

We will cover all the exam objectives related to how to perform migrations, Hands-On Labs, and practice tests in our Azure Database Administrator training program. If you want to begin your journey towards becoming a Microsoft Certified: Azure Database Administrator Associate by checking our FREE CLASS.DBAdmin_CU

The post Restore A Backup Using SQL Server appeared first on Cloud Training Program.


Viewing all articles
Browse latest Browse all 1902

Trending Articles