How to Install and Configure Microsoft SQL Server 2012 On Windows 2012 R2

How to Install and configure Microsoft SQL Server 2012 on Windows 2012 R2


In this lab I will show you how to install and configure SQL Server 2012 on Windows Server 2012 R2.

Software Requirement

SQL Server 2012 runs on:

  • Vista SP2
  • Windows 7 / Windows 7 SP1 / Windows 8 / Server 2008 R2 / Server 2012 / Server 2012 R2

Other Requirements

  • .Net Frameworks 3.5 / 4.0
  • Internet connection for updates
  • CPU > 1.4 GHz / 2.0GHz recommended
  • RAM > 512MB / 2GB recommended.

1/ Topology Setup

This lab will use two machines:

Detailed Implementation Steps:

1/ Setup TCP/IP address for the SQL01 Server

The TCP/IP settings should be as follows.

Hostname information is shown as follows:

Also, make sure that the TCP/IP settings for SQL01 is correct.

2/ Join the SQL01 server to the DALARIS.LOCAL domain.

Right-click the Start menu, choose System. Under the computer name, domain, and workgroup settings, click Change Settings. Set the Domain as follows:

Since the SQL01 server has the correct DNS settings, it will find the Domain Controller on the network. Now, enter the domain administrator to authorize the domain join.

Login as the domain Administrator.

3/ Ensure .NET Framework is installed

Use the following PowerShell command to check.

Get-WindowsFeature | Where-Object {$_.Name –Like ‘*NET*’}

As we can see that the .NET Framework 4.5 is installed. Now, let’s insert the SQL Server 2012 DVD into the DVD drive or mount the ISO file.

Run the Setup by double-clicking on the DVD.

Click Installation then click New SQL Server stand-alone installation or add features to an existing installation.

Wait for validation check. Once done, make sure there are 8 passes. Click OK.

Enter the product key and click Next.

Accept the License terms and click Next.

Allow to include updates and click Next.

When you get a warning about Windows Firewall, just leave it alone.

We will deal with that later. Click Next.

Click SQL Server Feature Installation. Click Next.

Check all under instance features.

Shared Features: Data quality client, SQL Server Data Tools, Client Tools Connectivity, Integration Services, and all the Management Tools such as SSMS.

Click Next.

Click Next.

Use Default Instance with Instance ID: MSSQLSERVER. Click Next.

Click Next.

Configure the Service Accounts as follows:

Note that the account sqlsvc is an Active Directory user in the Dalaris.local domain. Enter the password for it, then click Next.


Choose Mixed Mode. Enter a password for the sa account. Click Add Current User to add the Administrator as a SQL Server admin. Click Next.

Click Next.

Make sure there are 4 passes and click Next.

Click Install.

When the installation completes, click Close.

4/ SQL Server Configurations

Open SQL Server Configuration Manager and start the SQL Server Agent.

Ensure the SQL Server Agent is Running.

Enable all protocols

After that restart SQL Server

Now you can login to the SQL Server as Dalaris\Administrator. Open the SQL Management Studio.

Click Connect to connect to the Database Server.

5/ Create a new Database

Right-click on Databases and choose New Database…

Name the database DALARISDB and click OK.

The newly created database now appears under the Databases folder.

6/ Create a new Table

Expand the DALARISDB and right-click on Tables. Choose New Table…

Enter columns as follows:

Save the table structure.

You will be asked to name the table. Name it Employee and click OK.

7/ Insert Values into the Employee Table

Click New Query to create a new query.

Type the following query

values (1000,
‘Chuong’, ‘Nguyen’, 30)


To execute this query, make sure that the current selected database is DALARISDB. Press F5 on the keyboard or click the Execute button.

As soon as you execute the command, you will see that (1 row(s) affected) message appears.

Insert two more queries:

insert into Employee values (2000‘Nancy’, ‘Thu’, 30)

insert into Employee values (3000‘Frank’, ‘Nguyen’, 30)

Now highlight the two new queries and press F5 or to click the Execute button to execute them. If you do not select the two lines and just press F5 alone, all three queries will be executed casing duplicate issues for the first Employee.

8/ Query against the table

Select all employees and display them on the screen.


select from Employee

After clicking on Execute, the result will be shown.

Here is another query:

Update the age for Nancy to be 20 instead of 30.


Set Age = 20 

WHERE FirstName ‘Nancy’;

Select the query, press F5 to execute it.

Let’s see all employees again. Highlight the select statement earlier to execute it. The output will show Nancy’s age is 20.

Lastly, let’s list all employees whose age are above 20.

select from Employee

WHERE Age > 20

Now close the query editor, you can save the queries for later use if you’d like.

Congratulations, you have successfully installed SQL Server 2012 on Windows 2012 R2 Server.