Implement a SQL Server Database on an Azure VM
Once logged into the Azure portal, click Create resources.
Type sql server 2019 on Windows Server 2019 and select this resource.
For Select a plan choose Free SQL Server License SQL 2019 Developer... and click Create.
On the Create a virtual machine page:
Resource Group: Click the dropdown to select existing resource group
Virtual machine name: SQL-ACWEB-7777
Size: Select See all sizes and B2s, click Select
Username: delmar
Password and Confirm password: Insert your password.
Click Review & create and select Create.
Note: This will take some time to provision. Time to make some tea!
Select Go to resource and copy the Public IP address.
Select Connect and click Download RDP File.
If you have a Windows laptop, this should already have a pre-installed RDP client.
Open the RDP file using your native RDP client.
When prompted, use the credentials located in our hands-on lab, and click Continue on the pop-up window. Next, you'll be using RDP to log into the VM.
If you have a Mac laptop, follow these steps to RDP into the Windows VM:
To connect to a Windows VM from a Mac, you will need to install an RDP client such as Microsoft Remote Desktop.
Once downloaded open the application.
In the Mircosoft Remote Desktop, click on the gear and choose the Import from RDP file and select the RDP file that was downloaded earlier.
When prompted, use the credentials located in our hands-on lab, and click Continue on the pop-up window.
Restore a SQL Server Database from a Prior Backup
Once you are in the VM, close out the Server Manager.
Open Internet Explorer, click through the many prompts choosing the defaults, and paste in the following link:
https://github.com/linuxacademy/content-azure-database-administrator-associate/blob/master/Hands-on%20Labs/Implement%20an%20SQL%20Server%20database%20on%20an%20Azure%20VM/acweb.bakOn the Internet Explorer pop-up, select Add throughout each prompt, and finally press close.
In GitHub on the content-azure-database-administrator-associate page, click download.
Once again, on the Internet Explore pop-up, select Add throughout each prompt, and finally press close.
Again, click download in GitHub, and click Save, and Open folder.
In the File Explorer, right-click the acweb.bak file and select Copy.
Click on This PC and navigate Windows (C:).
Click thru: Program Files >> Microsoft SQL Server >> MSSQL15MSSQLSERVER >> MSSQL >> Backup and right-click to paste the acweb.bak in this path.
Go to the Windows start icon (bottom-left), and choose Microsoft SQL Server Tools 18 >> Microsoft SQL Server Management.
Note: This will take some time to open. Don't forget to water any plants you have!
Click Connect.
Right-click on Databases >> Restore Database. On the Restore Database page:
Select Device as the source.
Choose the three-dot menu in the Device field.
Select Add and the acweb.bak file, click OK.
On Select backup devices and click OK.
On the Restore Database page, click OK.
Once restored, select OK.
In the Microsoft SQL Server Management Studio page, expand Databases >> acweb >> Tables.
In this tables view, you'll see these restored tables as sales.xxx. Right-click and choose Select Top 1000 Rows to see the contents of the table.
No comments:
Post a Comment