This post is for those that are brand new to SQL Server. I will guide you through how to set up a test environment for your database learning. After completing this tutorials you will have a SQL Server 2012 instance on your computer along with a sample database.
Step 1: You can download a 180 day trial version of SQL Server 2012 here, or spent $40 to get the developer version with all the feature here.
Step 2: Follow this instruction from Andy Leonard to install a default SQL Server Instance on your computer. Note make sure you follow this instruction exactly or else instruction on step 5 won't work.
Step 3: Download a copy of the AdventureWorks database here. This database will be used for your learning.
Step 4: Read the instruction below to launch SQL Server Management Studio(SSMS):
Windows 7: go to Start menu > All Programs > Go to "Microsoft SQL Server 2102" folder > launch SQL Server Management Studio
Windows 8: on your keyboard press this combo keys: Windows Key (the button with windows logo on your keyboard) + S, on the search box type: SQL Server Management Studio then launch the application.
Step 5: Connect to your computer default SQL Server Instance with the info below.
Server Type: Database Engine
Server Name: just type in a single period or MSSQLSERVER
Authentication: Windows Authentication
Step 6: Watch this YouTube video from Katie for how to attach the AdventureWorkds database to your SQL Server Instance.
That's it. You now have a test environment for learning.
Now let's run a test query. The query below returns 100 people from the person table in the AdventureWorks2012 database. In your SQL Server Management Studio, open a new query window by pressing this combo keys: Ctrl + N
Type the query below and Press F5 to execute the query.
USE AdventureWorks2012; GO SELECT TOP(100) FirstName, LastName FROM PERSON.PERSON;
No comments:
Post a Comment