Windows Server 2008 R2, SQL Server Express 2008 R2, and LINQPad

This weekend I finally installed SQL Server 2008 R2 to my Windows Server 2008 R2 machine. After a bit of back-and-forth about which version to install (since my MSDN subscription allows me to install seemingly every version), I opted to just install SQL Server Express 2008 R2. Being part of the Web Platform Installer, the entire process was extremely easy.

Step 1: Start Web Platform Installer.

Step 2: Select SQL Server Express 2008 R2 and SQL Server 2008 R2 Management Studio Express from under Database.

Step 3: Press Install.

Step 4: Enter a password for the sa account (since Mixed Mode is what we want for development purposes).

Step 5: Open Windows Firewall and allow C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Binn\sqlservr.exe .

Step 6: Open SQL Server Configuration Manager and turn on the TCP/IP protocol, under Protocols from SQLEXPRESS.

Step 7: Open the TCP/IP protocol and verify that under IPAll TCP Dynamic Ports is set to something over 0. Make note of the port (in my case it was 49306).

Step 8: Still in Configuration Manager, click on SQL Server Services and restart the SQL Server process (the only one that's running).

Step 9: Connect to the instance via Microsoft SQL Server Management Studio, from the server (server name is .\sqlexpress).

Step 10: Open LINQPad (4.0 in my case).

Step 11: On the left-hand side select 'Add connection.'

Step 12: LINQ to SQL should already be selected, so press Next.

Step 13: Set the server to the IP of your server \SQLEXPRESS,port. For example: 192.168.1.104\SQLEXPRESS,49306

Step 14: Select SQL Authentication from Log on details, and enter your credentials. Press OK when finished.

And with that, you're set.