All my demos will use the StackOverflow database. You can download the StackOverflow database (I use the Small version) on Brent Ozar’s blog here. Once downloaded, follow the steps below:
- Unzip the files using 7Zip.
- Open SQL Server Management Studio, connect to the desired instance, right click on Databases, and click Attach

- Click Add

- Copy the path and open the folder in File Explorer

- Copy the files StackOverflow2010.mdf and StackOverflow2010_log.ldf and paste them into the folder in the above screenshot

- Go back into SQL Server Management Studio, and close the window Locate Database Files. Click Add on the Attach Databases window, select StackOverflow2010.mdf, and click OK.

- Click OK.

- Go to Object Explorer and notice the database StackOverflow2010 is now added.

You’re done!