Nullsession.com

Sometimes IT works

SQL Server 2008 on Server Core 2008 R2

In this article and video I’ll show you how to install SQL Server 2008 on Server Core 2008 R2.

Watch the video here: http://www.nullsession.com/tv/

Please note that this is UNSUPPORTED as far as I know!
Update: http://msdn.microsoft.com/en-us/library/ms143506.aspx#EEx64 states that it’s not supported and I’ve got this confirmed via email. Your on your own if you put it in production!

Starting off with a domain joined Windows Server 2008 R2 Core we first need to enable the features we need as prerequisites for SQL Server. These are .Net Framework and Powershell. Note that the WOW-components are enabled also. This makes it possible to run 32-bit software on an x64 platform.

The tool we’re using is the “new” image management tool “dism.exe”.

Dism /online /enable-feature /featurename: NetFx2-ServerCore /featurename: ServerCore-WOW64 /featurename:NetFx3-ServerCore-WOW64 /featurename:NetFx2-ServerCore-WOW64 /featurename: NetFx3-ServerCore /featurename:MicrosoftWindowsPowerShell

Once we’ve added the needed features we’re ready to kick off the SQL Server installation. This is done unattended and you don’t have to extract it first, you can like I do in the video run the installation directly from your downloaded package. It’ll self-extract and run correctly anyway. (At least SQL Server 2008 Express Edition did I’ll say.)

(All on one line, paragraphed for clarity) (UPDATED: TCPENABLED=1 ADDED, ACCEPT SQL LICENSE ADDED. THANKS FOR THE COMMENTS!)

Setup.exe /qs /ACTION=Install /FEATURES=SQL /INSTANCENAME=MSSQLSERVER
/SQLSVCACCOUNT="yourdomainsqlserviceaccount"
/SQLSVCPASSWORD="sqlserviceaccountpassword"
/SQLSYSADMINACCOUNTS="yourdomainsqladminusername"
/AGTSVCACCOUNT="NT AUTHORITYNetwork Service" TCPENABLED=1 /IAcceptSQLServerLicenseTerms

Once it’s done, which takes 5-15 minutes (your mileage may vary!) we’ll need to:

Stop the service: net stop mssqlserver

Fire up the good ‘ol regedit.exe (NOT NEEDED IF YOU USE THE CODE ABOVE SINCE TCPENABLED=1 IS ADDED NOW)

Navigate to: HKLMSoftwareMicrosoftMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLServerSuperSocketNetLibTCP

Set Enabled to 1 and exit regedit.exe

Start the service: net start mssqlserver

Once started we have to enable the correct ports in the firewall for remote management to work:

netsh advfirewall firewall [enter]
set rule group=”remote administration” new enable=yes [enter]
add rule name=”Open Port 1433” dir=in action=allow protocol=TCP localport=1433 [enter]

Now we can switch to our graphical box. On this one you’ll have to run the setup and only select the management tools (there’s no how-to on this one since it’s point and click…).

Fire it up and enter the name of your Core-box now running SQL Server!

11 Responses to SQL Server 2008 on Server Core 2008 R2

  1. Pingback: SQL Server 2008 on Server Core 2008 R2 | Windows (7) Affinity

  2. Pingback: In Defragmentation... SQL Server DBA

  3. ROss Mistry, SQL MVP says:

    Great post, did MS mention that they would support it when W2K8 R2 officially is released?

  4. Joachim Nässlander says:

    Thanks Ross! No, I haven’t heard anything official but I’d assume that we might see support in the next SP or the next release of SQL Server. I can see the support issues when it comes to Core, so I think they’ll have to test it quite well before supporting it.

  5. Pingback: Server Core can’t have SQL Server Installed? « Rants of a .Net Dev

  6. Pingback: SP2010 Beta: Installation « RaSor’s Blog

  7. Pingback: Stripped to the bare core « Gavin Payne

  8. Great post!!! I did exactly as you described except with SQL 2008 R2 and only had to add the “/IAcceptSQLServerLicenseTerms” switch to the installation command. Thanks for blazing the trail!!

  9. Pingback: Server Core and SQL Server | Hyper-V according to me

  10. Thanks for nice post!
    If you use parameter “TCPENABLED=1″ you do not have to modify registry.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>