Welcome!
Before diving into the hands-on labs, ensure you have the necessary software and databases installed. Follow these steps to set up your environment:
- SQL Server 2022: A local instance of SQL Server 2022 is required for the labs. The Developer Edition of SQL Server 2022 is free for development and testing, not for production, and includes all the features of SQL Server 2022. Download and install it from Microsoft’s SQL Server Downloads page. When the installer starts, choose the Basic installation option.
- SQL Server Management Studio (SSMS): To interact with SQL Server, including running queries and managing databases, install the latest version of SSMS. This ensures compatibility with SQL Server 2022 and supports features like Always Encrypted that may not be supported in older SSMS versions. Download SSMS from here.
- Visual Studio 2022 (any edition) with .NET desktop development workload: Some demos, especially those involving Row-Level Security and Always Encrypted, require Visual Studio 2022. The Community Edition is free for students, open-source contributors, and individuals. Download it from Visual Studio’s Community Edition page. During installation, choose the “.NET desktop development workload.”
- AdventureWorks2019 Database: Many demos utilize the AdventureWorks2019 sample database. Download the
AdventureWorks2019.bakbackup file available here. Then restore the backup file as follows:- Create a temporary folder First, create a temporary folder on your C drive to store the
.bakfile during the restoration process. In File Explorer, navigate to the C drive (C:). Then right-click in an empty space, select New > Folder, and name the new folderHolDB.
- Copy the backup file Navigate to your Downloads folder. Right-click on the
AdventureWorks2019.bakfile and select Copy. Then go back to theC:\HolDBfolder, right-click in an empty space, and select Paste.
- Restore the Database using SSMS Now that the backup file is in an accessible location, you can proceed with restoring it to your SQL Server instance.
- Open SQL Server Management Studio (SSMS) and connect to your local SQL Server instance.
- In the Object Explorer on the left, expand and then right-click on the Databases folder and select Restore Database…
- In the Restore Database Dialog, select the Device radio button under the Source section.
- Click the
...button on the right to open the Select Backup Devices dialog.
- Click the
- Click on the Add button to open the Locate Backup File dialog.
- Navigate to the
C:\HolDBfolder and select theAdventureWorks2019.bakfile, then click OK.
- Navigate to the
- The backup file should now appear in the Select Backup Devices dialog. Click OK to return to the Restore Database dialog.
- Now click OK to start the restore process.
- Create a temporary folder First, create a temporary folder on your C drive to store the
- Wide World Importers Database: One lab uses the Wide World Importers sample database. Download the
WideWorldImporters.bakbackup file file available here. Then restore the database using similar steps you just followed for AdventureWorks2019:- Copy the Backup File Copy the
WideWorldImports.bakfile from your Downloads folder to theC:\HolDBfolder.
- Restore the Database using SSMS
- In the SSMS Object Explorer, right-click on the Databases folder and select Restore Database…
- In the Restore Database Dialog, select the Device radio button under the Source section.
- Click the
...button on the right to open the Select Backup Devices dialog.
- Click the
- Click on the Add button to open the Locate Backup File dialog.
- Navigate to the
C:\HolDBfolder and select theWideWorldImports.bakfile, then click OK to return to the Select Backup Devices dialog.
- Navigate to the
- Click OK to return to the Restore Database dialog.Click OK to start the restore process.
C:\HolDBfolder, as well as the two database backup files in your Downloads folder. - Copy the Backup File Copy the
