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
/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!