Building Your SharePoint 2013 development machine on Windows Server 2012 – Part 5 – Configuring SQL 2012 Ready for SharePoint 2013

UPDATE: SharePoint 2016 development machine

I am doing a collection of blog posts, you can access the other parts of this post below.

When I started planning the 10 parts of the blog, the one bit I forgot about was Kerberos. So I have squeezed part of it in here. As I am a developer and not really an IT-Pro I had to look up information on the web to help me write this bit on Kerberos and speak to the IT Pro at my work. My references are blksthl blog and my work colleague Adam McEwen, who blogs you can access via these links.

Creating the Accounts required.

First we need to create 4 different accounts.

SP_Farm – SharePoint Farm Account

SP_Content – SharePoint Content account for the Content Databases.

SP_Services – SharePoint account for the Shared Services within SharePoint.

SP_SQL – The account to run SQL with.

  1. In the Start Menu, type Active Directory Users and Computers. Select the application.
  2. Expand the tree in the left hand pane to see the Users OU. Select the Users OU.
  3. Right Click on User and select New > User. Create a new user called SP_Farm. Set the Full Name and Log on name to SP_Farm. Click Next.
  4. In the password dialog screen, enter the following and click Next.
    1. Password and Confirm Password as: Pa55w0rd
    2. Untick User must change password at next logon.
    3. Leave User cannot change password as unticked.
    4. Tick Password never expires
    5. Leave Account is disabled as unticked.
    6. Click Next. Then click Finish.
  5. Repeat the steps 1-4 for the remaining accounts (SP_Content, SP_Services and SP_SQL).

Setting up Kerberos for SP_SQL account.

We will need to set up Kerberos for the other accounts, but this section of blog is getting your SQL ready for SharePoint 2013. Therefore at this point we will just set SQL up for Kerberos.

Name Resolution.

  1. In the Start Menu, type DNS. Open the application to the DNS Manager.
  2. Expand the forward lookup zones container in the left panel.

  3. Right click on the zone cannonfodder.local and click on a New Host (A or AAAA).

  4. Type in the name of the record. In this case we are going to name our SQL Server SQL2012. Set the IP address at the IP of the machine. We set this to a static IP in the last blog. (If you have forgotten you can find out by bringing up a command prompt and type ipconfig /all and look at the IP4 IP address.) Click on Add Host.

  5. Click on Done. You will then get a verification dialog, and after click OK to that, you will see the record has been created in the right pane of the DNS manager.
  6. To check that this is all working, open a command prompt, and type
    ipconfig –flusdns

    Then type

    Ping SQL2012

Service Principle Name

  1. Open a command prompt from the Start Menu by typing in cmd. Right click Command Prompt and along the bottom of the screen will be an option to Run as Administrator.
  2. Type the following in the command window. This will create the SPN for the service account paired with the host name.
    setspn –S MSSQLSvc/SQL2012:1433 CANNONFODDER\SP_SQL
  3. Type the following in the command window. This will create the SPN for the service account paired with the FQDN.
    setspn –S MSSQLSvc/SQL2012.cannonfodder.local:1433 CANNONFODDER\SP_SQL
  4. Now by typing in setspn –L CANNONFODDER\SP_SQL it will list all the SPN for that account.

Trust for delegation

As our server is a domain controller we do not need to set it up so that it is Trusted for Delegation. We can prove this by doing the following.

  1. From the Start Menu type Active Directory Users and Computers. Open the application.
  2. In the left hand panel, expand cannonfodder.local and select Domain Controllers.
  3. In the right hand panel you will see the computer CANNONFODDERSER.
  4. Right click this computer and select Properties. From the properties window, select the Delegation tab. As you can see this computer is already set to Trust this computer for delegation to any service (Kerberos only).

Configuring SQL Server 2012

As SQL was installed using a built in account, and also installed on the machine before it was sysprepped, SQL now needs to be configured to work properly on this server in preparation for SharePoint.

  1. From the start screen type SQL Server Configuration Manager and select the application.
  2. Click to expand SQL Server Network Configuration (not the 32 bit), and choose Protocols for MSSSQLServer, and ensure TCP/IP and Named Pipes are enabled. To enable them right click them and select Enable. Click OK at the warning.
  3. Now in the left hand pane, click SQL Server Services.
  4. For SQL Server (MSSQLSERVER) right click the service name and choose Properties.
  5. Select the Log On tab.
  6. Select this account: radio button and enter cannonfodder\SP_SQL and enter the password as Pa55w0rd. Click Apply, and Yes to restart the service, or Start the service if not already.
  7. Click OK and close SQL Server Configuration Manager.

Now we need to give cannonfodder\administrator access and update SQL Server 2012 local instance after the machine name has been changed.

  1. From the start screen type SQL Server Management Studio and select the application.
  2. Change the server name to SQL2012 and logon using SQL Authentication with the sa account using the password Pa55w0rd. If you try to log in at the moment as cannonfodder\administrator using windows authentication, you will fail to access SQL.
  3. Now give cannonfodder\administrator the correct security access.
    1. Expand Security and right click Logins to select New Login…
    2. Next to the Login Name click Search
    3. Type cannonfodder\administrator, and then click check names. Select the user administrator, not the group.
    4. On the left hand panel, select the Server Roles page, and tick sysadmin. Click OK
    5. Right click the database connection in Object Explorer and choose disconnect.
    6. Click Connect in the Object Explorer, choose database engine, and connect to SQL2012 using Windows Authentication, then confirm you can browse objects in the database server.
  4. Now we need to update the server name. If you Click New Query and type
    Select @@SERVERNAME

    You will notice that the server name is incorrect.

    Click New Query and copy the script

    sp_dropserver @@SERVERNAME
    sp_addserver 'CANNONFODDERSERVER', local

    run the query.

  5. Restart the SQL server service, right click the SQL Server service, right click the database connection in Object Explorer, and choose Restart. You will then get a prompt asking if you want to restart the MSSQLSERVER service. Say Yes.

  6. Right click the database connection again, and choose disconnect.
  7. Click Connect to SQL2012 using Windows Authentication.
  8. Click New Query, and run the following script to confirm the instance name has been changed to reflect your chosen machine name:
    Select @@SERVERNAME

  9. You can now close SQL Server Management Studio. No need to save the queries.

Now we are past the half way point, and we can now finally start installing SharePoint 2013!


Building Your SharePoint 2013 development machine on Windows Server 2012 – Part 3 – Building a base disk to use for differencing disks.

UPDATE: SharePoint 2016 development machine

I am doing a collection of blog posts, you can access the other parts of this post below.

Building a base disk to use for differencing disks.

Now as this is a single build machine, you might wonder why bother building a base disk for differencing? The reason is simply that it will save you time in the future, if you wish to expand your farm, or create another server at a later date. By doing this, you will find that all the default programs and updates are already on the machine.

What needs to go on here?

I would put on the base build everything that you probably will need on all your virtual machines. So I will be adding;

  • Windows Server 2012 Standard Edition 64 bit.
  • SQL 2012 Standard Edition 64 bit with SP1 – Basic set up with database and management studio
  • Office 2013 – Access, Excel, InfoPath, Lync, OneNote, Outlook, PowerPoint, Publisher, Visio and Word
  • PowerShell Plus from Idera
  • FireFox
  • Chrome
  • Visual Studio 2012 Ultimate
  • Fiddler

Creating your Virtual Machine.

  1. Open up Hyper-V Manager.
  2. Under Actions, click on New and select Virtual Machine. Click Next.
  3. Name your Virtual Machine, and your choice if you wish to store the virtual machine in a different location.

  4. Assign it some memory. At this Stage just 6GB will be enough for installing everything. Click Next.

  5. Configure the Network to point to the Internal LAN connection that we made in the previous blog.

  6. Name your Virtual Hard disk. Change the location if you wish, and I’d recommend creating a 400GB hard disk. (If you have room). We will split the disk inside the virtual machine into 100GB and 300GB for C and D drive. Click Next.

  7. Installation Options, you can select Install an Operating system from a Boot CD/DVD-ROM and in my case I have selected the Windows Server 2012 Image file.

Install Windows 2012 Server Standard Edition.

Inside your Hyper V manager you should now see your Virtual machine. In my case it is called Cann0nF0dderBase. By right clicking on the machine you can connect to it. A window will open. You can then click the Start Button.
As your virtual machine starts up it will load the Windows 2012 files.

  1. Configure the language. Click Next.
  2. Then Click Install Now.
  3. Insert your product key. Click Next.
  4. Select Windows Server 2012 Standard (Server with a GUI) and then click Next.
  5. Tick I accept the license terms. And then click Next.
  6. Select the Custom: Install Windows only (advanced) option.
  7. In the Where do you want to install Windows. Select Drive options (advanced) and create a new space of 102400MB. This will create a 100GB space. Accept the message that says Windows might create additional partitions for system files. You should now see Drive 0 Partition 1: System Reserved, Drive 0 Partition 2 and Drive 0 Unallocated Space. Select the last one and click New, then Apply. This will set up your drive space. Click Next, and Windows 2012 will start installing.
  8. Once it has finished installing itself, it will ask you for a password for the Administrator. I use Pa55w0rd. Click Finish.
  9. Now you can log in. To perform Ctrl + Alt + Del in a Hyper V Machine. Press Ctrl + Alt + End.
  10. Before you continue any further, install Hyper V Client tools. At the menu on the Virtual Machine Connection, click Action > Insert Integration Services Setup Disk. Then run the setup disk. You will find the disk has been attached as drive E within your virtual Machine. It will warn you about upgrading to the latest version. Accept this, and restart the VM when requested.

Configuring Windows 2012

  1. Once you have logged back in again the Server Manager appears. On the left hand menu, click on Local Server. This will bring up all the properties for this machine.
  2. Disable the Windows Firewall, by clicking on the Windows Firewall Public: On link and then selecting Turn Windows Firewall on or off. And then turn the firewall off.

  3. Back on the properties screen click the On link for IE Enhanced Security Configuration. Then turn this off for Administrators and Users. Click OK.
  4. Go back to the Start menu by moving your mouse to the bottom left of the screen, or by pressing the windows key. Type UAC, and select settings from the right hand side. Click on Change User Account Control Settings.
  5. On the User Account Control Settings, move the slider down to the bottom. This will prevent the screen keep prompting you when an administrative task needs to be made. Click OK. A administrative prompt will appear, but this will be your last one.
  6. Back in the Server Manager properties window for the server. Enable Remote Desktop. Click the Disabled link. Then select Allow remote connections to this computer. Click OK.
  7. Back in the Server Manager properties window for the server, Click on Windows Update Not Configured link. This will open up the Windows Update dialog.
  8. Click Let me choose my settings. Then on Choose your Windows Update settings, I always have Download updates but let me choose whether to install them. And then I tick Recommended updates. Click OK.
  9. Your server will now check for updates. Install anything that is outstanding.

Apply the DisableLoopbackCheck Registry Fix.

  1. Click the Windows PowerShell icon in the Taskbar.
  2. Run the following PowerShell commands, pressing [Enter] after each one:
    $regKeyPath = "HKLM:\System\CurrentControlSet\Control\Lsa"
    $key = "DisableLoopbackCheck"
    New-ItemProperty –Path $regKeyPath –Name $key –Value "1" –PropertyType dword

Disable the Shutdown Event tracker.

  1. Open the start menu and type gpedit.msc. Click on the program to open it.
  2. In Group Policy Editor, navigate to Computer Configuration\Administrative Templates\System, open the Display Shutdown Event Tracker policy, and set it to Disabled.

    Now when you shut down you shouldn’t see the Shutdown tracker appear.

Enabling the Desktop Experience.

  1. Open up the Server Manager.
  2. On the right of the screen click Mange > Add Roles and Features
  3. Click Next.
  4. Ensure Role-based or Feature-based installation is selected. Click Next.
  5. On Select destination server click Next.
  6. On Select server roles click Next.
  7. On Select features. Expand User Interfaces and infrastructure (Installed) and tick Desktop Experience. Add the addition features that it requires. Click Next.
  8. Click Install.

Getting the Sound to work within your Virtual Machine.

Now you might have noticed there is no sound coming from your virtual machine. It might not bother you. It appears that you cannot get sound going through a Hyper V client window. However if you remote desktop onto the machine you can then get sound from your virtual machine, if you follow my previous blog on Getting sound to work within your Windows Server Hyper V Client.

Set up directories for SQL.

  1. Bring up Explorer by click on Windows Key + E.
  2. Double click on D drive. It will ask if you wish to format it. Say yes and format the disk.
  3. Create the following Directories on D.
    1. d:\SQL\Data
    2. d:\SQL\Logs
    3. d:\SQL\Temp\Data
    4. d:\SQL\Temp\Logs
    5. d:\SQL\BackUp

SQL 2012 Standard Edition 64 bit with SP1

Now we can Install SQL Server 2012 Standard Edition with SP1. Select the ISO in Virtual Machine Settings.

  1. Run Setup.exe
  2. The SQL Server Installation Center will open up. On the left hand side, click Installation.
  3. Click on New SQL Server stand-alone installation or add features to an existing installation
  4. After click next Setup support rules will identify any problems that might occur when installing SQL Server Setup support files. There should be all passes. Click OK.
  5. Choose Enter the product Key the product key should already be entered. Click Next.
  6. Accept the license terms. Click Next.
  7. The setup files will now install.
  8. Click Next
  9. On the Setup Role Page. Select SQL Server Feature Installation and click Next.
  10. On the Feature Selection Page. Select Database Engine Services, Full-Text and Semantic Extractions for Search. Then under Shared Features select Management Tools – Basic and Management Tools Complete. Click Next.
  11. On the Installation Rules page click Next.
  12. On the Instance Configuration page click Next.
  13. On the Disk Space Requirements page click Next.
  14. On the Server Configuration page, change the SQL Server Agent Start Up Type to Automatic. Click Next.
  15. On the Database Engine Configuration page. Select Mixed Mode and enter the password as Pa55word. And Click Add Current User.
  16. On the Data Directories tab, change the data to the following.
    1. User Database Directory – d:\SQL\Data
    2. User Database Log Directory – d:\SQL\Logs
    3. Temp DB directory – d:\SQL\Temp\Data
    4. Temp DB Log Directory – d:\SQL\Temp\Logs
    5. Backup Directory – d:\SQL\BackUp
  17. On the FILESTREAM tab tick Enable FileStream for Transact-SQL access and Enable FILESTREAM for file I/O access. Click Next.
  18. On the Error Reporting page, click Next.
  19. On the Installation Configuration Rules page, click Next
  20. On the Ready to Install page, click Install.
  21. After installation your SQL Server 2012 is installed. You may be asked to reboot.

Installing Office 2013

Now we can Install Office 2013. Select the ISO in Virtual Machine Settings.

  1. Run Setup.exe
  2. Accept the license terms. Click Continue.
  3. I just except the defaults, and click Install Now.
  4. Office 2013 is now installed. You will be requested for the key code when you open up an office product.

Don’t forget that Visio is a separate installation. (I’m not going to teach you how to do Next Next on that as well. I think you can work it out yourself.

Installing Visual Studio.

Now we can Install Visual Studio 2012 Ultimate. Select the ISO in the Virtual Machine Settings. (Again I probably don’t need to walk you through this bit).

  1. Run VS_ultimate.exe
  2. Agree to the License terms and Conditions. Click Next
  3. Decide what you want to install, you will need Microsoft Office Developer Tools, Microsoft SharePoint Developer Tools, Silverlight Development Kits, and Microsoft Web Developer Tools. Blend for Visual Studio might be useful for SharePoint. Click Install.

Extra Stuff to install.

Setting up the Menu.

If you currently look at your menu you will notice that everything is everywhere. You can click and drag tiles and position them in more logical sections. By moving them between other sections you can create new sections.

By clicking on the bottom right of the menu screen there is a minus icon. By clicking this, you will zoom out. Then by right clicking a section you can then name it.

I organised my menu to look like below screen shot.

Sysprep the machine.

As I have already written a blog on Sysprepping a machine while keeping the Menu the same after sysprep follow the following blog. Windows 8 and Windows Server 2012 Start Screen is Reset when Sysprep

Once you have completed the above post of Sysprep while keeping the Start menu. Do not turn on your Virtual Machine again. If you do it will start the Sysprep process. At this point, go to where the base hard drive is for the Virtual Machine, and set it to Read Only.

Create your SharePoint machine from your Base disk.

  1. First remove the Virtual Machine from the Hyper V manager. Select the base virtual machine and on the right hand side, under the machine name, click Delete. This just deletes the machine, but keeps the virtual machine disk. By deleting this from Hyper V there is no chance of accidently starting it.
  2. Next follow my previous blog on Creating your hyper V windows Server 2012 machine from a differencing disk.
  3. When you start up your new Virtual Machine based on the base disk, you will be required to enter a valid Key Code for Windows Server 2012 Standard Edition. Let the sysprep process complete, answer any installation questions required and then log in.
  4. You now have a Windows Server 2012 with Office, SQL, Visual Studio ready for SharePoint 2013, or whatever else you might want to install on it instead.