Friday, June 17, 2011

Install SQL 2008 R2 on Windows Server 2008 R2 Core

Is it possible? Yes. Is it supported? No.

The Hardware and Software Requirements for Installing SQL Server 2008 R2 from Microsoft clearly state that, "SQL Server 2008 R2 is not supported on Windows Server 2008 SP2 Server Core or Windows Server 2008 R2 Server Core installations."

To be clear, this post just covers the installation of the Database Engine Services. Perhaps if I get bored in the future, I'll try Analysis Services or Reporting Services. Reporting Services I'm pretty sure will be more complicated as it requires IIS.

So let's get started. To begin with you need to ensure the list of roles below are installed. If you're using Core Configurator (and I think you should be), some of these roles will already be installed. From the Core Configurator menu, select "Computer settings…" and then "Add or Remove Roles…"
  • MicrosoftWindowsPowershell [is installed by Configurator]
  • NetFx2-ServerCore [is installed by Configurator]
  • NetFx2-ServerCore-WOW64
  • NetFx3-ServerCore
  • NetFx3-ServerCore-WOW64
  • ServerCore-WOW64 [should be installed by default]
Prior to the running the installer, you need to determine how many service accounts you need, and create them if necessary. Recommended practice is to use a separate service account for each service, but you can certainly get away with running all the services under the same account. I'm going use separate accounts for each service, which means I need two accounts. One for the SQL engine, and one for the SQL agent. Create the accounts you need in Active Directory.


With all the prerequisites out of the way, the SQL install is pretty straight forward. You can actually run the setup program from the CD – no need to do a command line install. There is one issue to be aware of - all of the dialog boxes where you would normally browse to select a folder... they don't work. Instead you'll have to just manually type the path you want to use.


After the installation is finished, the last step is to add a new rule to the firewall to allow communication to the SQL engine.  Easiest way to do this, and validate that it was done correctly, is to use Server Manager or MMC with the Windows Firewall snap-in from another machine.
  • Connect to your SQL server
  • Expand Windows Firewall with Advanced Security (under Configuration in Server Manager)
  • Select Inbound Rules
  • Click New Rule...
  • Select Port, Next
  • Enter Specific local ports: 1433, Next
  • Next
  • Uncheck Private and Public (but really it's up to you), Next
  • Enter Name: SQL Server Engine, Finish
With that finished, you can now use Microsoft SQL Server Management Studio from another computer to connect to your SQL server running on Server Core!


Additional port information can be found in this Technet article. I'm not going to run through and test all the different installation options on Server Core, but should you deviate from defaults, that article should help you identify what other ports need to be opened.

Tuesday, June 7, 2011

DC with Copied VM in Hyper-V, Fail

I previously built a domain controller using a copy of a Windows Server 2008 R2 Core template that I had already setup. Everything worked fine until I built another server using the same template and joined it to the domain. Then I ran into this:

Event 5516 The computer or domain [machine] trusts domain [domain]. (This may be an indirect trust.) However, [machine] and [domain] have the same machine security identifier (SID). NT should be re-installed on either [machine] or [domain].

Bottom line here is that you do not ever want to copy/clone/duplicate a server to build a new domain. Your domain controller for your new domain needs to be a unique build, so that it has a unique machine SID. Based on this article, you can feel free to copy/clone/duplicate servers for all other scenarios. It is my understanding that you can even do this when adding a new domain controller to an existing domain - because the new DC will inherit the SID from the domain. This issue only occurs with duplicating a server to build a DC for a new domain.

Now I have to go fix a couple VMs...