Database download
https://docs.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-2017
Note
Make sure to grant proper permissions to SQL Server in order for it to locate the *.bak file. Run the first RESTORE operation to discover the actual names of the database files. Use those names to refer to them in the second RESTORE operation.
T-SQL Script
RESTORE FILELISTONLY FROM DISK=’C:\Windows\Temp\AdventureWorks2016.bak’
RESTORE DATABASE AdventureWorks FROM DISK=’C:\Windows\Temp\AdventureWorks2016.bak’
WITH
MOVE ‘AdventureWorks2016_Data’ TO ‘C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\AdventureWorks2016_Data.mdf’,
MOVE ‘AdventureWorks2016_Log’ TO ‘C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\AdventureWorks2016_Log.ldf’,
REPLACE