GETTING STARTED WITH SQL SERVER Download, Install, and Explore SQL Server Express WWW.ESSENTIALSQL.COM
Introduction It can be quite confusing trying to get all the pieces in place to start using SQL. If you are just starting out or have tried and gotten frustrated in the past, then this guide is for you. Just follow these steps. We ll make it easy for you get started quickly learning SQL. Once you have completed this guide, you will have: 1. Installed Microsoft SQL Server 2014 Express Edition, (Good news! This is free.) 2. Downloaded and loaded the Adventure Works Database. 3. Used SQL Server 2014 Management Studio to Attach the Adventure Works Database to the server. Before We Begin Before we get started be sure your computer is ready. All of the following should be checked before we start: Confirm you are running Windows 7 or greater. Determine whether you are running 32 bit or 64 bit windows. If you don t know, you can go to http://windows.microsoft.com/en-us/windows/whichoperating-system to get help. Make sure you have administrative privilege on your account. Install the latest security updates and patches. These typically occur automatically. If you have pending updates, install them now.
Download SQL Server 2014 Express Edition In this section we ll download SQL Server 2014 Express Edition. The download is about 1.1 GB, so it can take some time. Let s get started. Open your browser and navigate to http://www.microsoft.com/enus/download/details.aspx?id=42299 Once there, you ll see the following screen. Select the language you wish and the click Download. If you re running a 32 bit version of windows, then check the package below that is circled in green; otherwise, select the 64 bit version, which is circled in blue. Then click Next to start the download. Wait for the download to complete.
Install SQL Server 2014 Express Edition Navigate to your browser s download folder, then double click on the download to start the setup. Once the setup starts, accept the User Account Control dialogue, or provide system administrator credentials when prompted. Follow the prompts to extract the download. After a few moments the SQL Server Installation Center dialogue appears.
Click on the link New SQL Server stand-alone or add feature to an existing installation. Once the SQL Server 2014 Setup program launches, click I accept the license terms and click Next>.
After several checks the feature selection is shown, Click Next> to continue. Click Next> once the Feature Rules check is completed.
Click the Named instance option on the Instance Configuration tab and name the instance SQLEXPRESS2014. Note: If you have other instances installed, as I do, you ll see them in the grid at the bottom of the screen. Click Next> to proceed We ll use default setting for the Server, Database Engine, and Reporting Services. Click Next> three times.
The installation progresses and then finishes. Once Complete Click Close.
Download Adventure Works The adventure works database is a sample database created by Microsoft that is used for many examples referenced in their literature and on the web. In this section we are going to download the adventure works database and copy it to a location on your computer so we can use it with SQL Server. Click here to navigate to Adventure Works download page. Locate the AdventureWorks2012_Download file and click to download. Decide where you wish to keep your databases. To keep it simple on my laptop, I store them in a folder named C:\SQLData. Use file explorer to create this folder and then click on it. Right click on the Folder and select Properties In the SQLDATA Properties Dialogue ensure Authenticated Users have Full Control of the folder. Click on Edit
Select Authenticated Users, then click Full Control, finally OK save and close. Navigate to your browser s download folder, then double click on the download to open the zip file. Copy both the AdventureWorks2012_Data.mdf and AdventureWorks2012_log.ldf files to the C:\SQLData folder we just created.
Attach Adventure Works to SQL Server SQL Server 2014 Management Studio, or Management Studio for short, is your gateway to SQL Server. It is a very versatile tool. You can use it to administer databases, design database tables, create and run queries, and much more. In this section we ll open the sample database. There are two things that must be done before we can use the sample database. First we must connect Management Studio to the SQL Server Instance. Then, once we are connected and talking to the DBMS, we need to attach the sample database to the server instance. Starting Management Studio and Connect to the Database Type SQL Server 2014 in the search window. On windows 7, this is at the bottom of the start menu, on windows 8, just start typing on the Start Screen. Click on the SQL Server 2014 Management Studio icon. Locate the server name drop down and click on <Browse for more >
In the Browse for Servers dialog, locate and select SQLEXPRESS2014, then click OK Click Connect. You should see a display similar to the following. Attaching the Adventure Works Database Now that we re connected to the database, we can attach the Adventure Works database. Attaching the database is SQL Server s way of opening and using the database.
Right Click on the Databases folders and select Attach Click the Add button in the Attach Databases dialogue.
In the Locate Database Files dialogue, click on the SQLDATA folder we previously created, select the AdventureWorks2012_Data.mdf file we previously copied, and click OK when done. Click OK on the Attach Databases screen to complete the action. If the database successfully attaches, you ll see AdventureWorks2012 listed as one of the databases.
Click on AdventureWorks2012 and then the Tables folder. You should see a listing of tables as below We re all Done! You are now ready to use SQL Server 2104 Express edition and the Management Studio to explore and learn SQL. I m pretty excited to have you as one of my readers. I really want to help you learn. Please let me know what are some of the things about SQL that are confusing you, so I can help. Just tweet me @sqlkris or you can email me at kris@essentailsql.com.