

You should see the following result indicated that the query executed successfully. Select the BikeStores Sample Database – create objects.sql file and click the Open button Step 7Ĭlick the Execute button to execute the SQL script. If everything is fine, you will see the database BikeStores appears under Databases node as shown in the screenshot below: Step 5įrom the File menu, choose Open > File… menu item to open a script file. (1) Enter the Database name as BikeStores and (2) click the OK button to create the new database. Right-click the Databases node in the Object Explorer and select the New Database… menu item Step 3 Step 1Ĭonnect to the SQL Server by (1) choosing the server name, (2) enter the user and (3) password and (4) click the Connect button. Third, let’s create a database, create the schemas and tables, and load the sample data. It is useful when you want to refresh the sample database.

BikeStores Sample Database - drop all objects.sql – this file is for removing the tables and their schemas from the sample database.

BikeStores Sample Database - load data.sql – this file is for inserting data into the tables.BikeStores Sample Database - create objects.sql – this file is for creating database objects including schemas and tables.Second, uncompress the zip file, you will see three SQL script files:
#Sample data generator sql server 2012 how to#
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.įirst, you need to download the following zip file if you have not done so:
