Summary: in this tutorial, you will learn how to create a new database in SQL Server and execute the script to load the sample database.
First, you need to download the following zip file if you have not done so:
Download SQL Server Sample Database
Second, uncompress the zip file, you will see three SQL script files:
-
BikeStores Sample Database - create objects.sql– this file is for creating database objects including schemas and tables. -
BikeStores Sample Database - load data.sql– this file is for inserting data into the tables -
BikeStores Sample Database - drop all objects.sql– this file is for removing the tables and their schemas from the sample database. It is useful when you want to refresh the sample database.
Third, let’s create a database, create the schemas and tables, and load the sample data.
Step 1 #
Connect to the SQL Server by (1) choosing the server name, (2) enter the user and (3) password and (4) click the Connect button.