SQL TipsnHints - Maintenance - Restore Server Database Samples
SQL TipsnHints - Maintenance - Restore Server Database Samples
You will need to download and restore the SQL Server Samples Databases used in the Demos, Labs
and ICA solutions.
All SQL Server Database Samples are available from Blackboard: Week 0: SQL Server Databases for
Labs & Home
Step 1: Make a Directory [SSMS] and download the SQL Server .bak files from Blackboard - Week 0:
SQL Server Databases for Labs & Home
Make a folder on your User Drive are either U: or F: drive and copy over the .Zip files from
Blackboard session.
Oct 2022 Samples SQL Server Samples which need Restoring on TU Labs and Home PCs.
TSQL.bak
MusicMansh.bak
FleetFactors.bak
NHS.bak (SQL Server 2019)
Library.bak
Step 2: Run SQL Server or follow the instructions below if in the TU Labs.
Step 3: To Restore the .bak files right click the Database for the Restore Database menu option as
seen below:
Step 5: Click Add and browse to where you have downloaded the .bak files to.
However, the .bak files can be loaded from the hardrives folder you have downloaded to and do
note SQL Server will not restore from USB or external drives.
Notice in the example below from TU Labs the .baks where downloaded to [F: \TSQL-Mod00 – SQL
Server DB]
For the Demo I have selected tuTSQL (it may also be referred to as TSQL in all the Demo and Lab
sessions).
Step 5: Click on OK and SSMS will have restored the TSQL Database used throughout most of the
Demos.
Step 6: Make sure the .bak is correctly load and the SQL Server Database is shown correctly in the
Object Explorer as shown below:
However sometimes you will receive the following error as may not be authorised or have
permissions to access the Database.
You will need to assign authorisation for your SQL Server account to access the Database(s)
as follows:
Simply modify the below author authorisation by changing TSQL to the restored database
name.
Note in TU Labs you will have to open .sql files in Notepad and copy over the TSQL Code.