Amazon EC2 Windows SQL Server Express Login Error Number: 18456

Amazon EC2 Windows

Trying to set up an Umbraco installation, using a Windows Server 2008 + SQL Server Express AMI on Amazon EC2, I kept getting Error number 18456 when trying to log in as ‘sa’ with the SQL Server Management Studio. This is the log of the error:

===================================
Cannot connect to IP-0AD1A3A5\SQLEXPRESS.
===================================
Login failed for user 'sa'. (.Net SqlClient Data Provider)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
------------------------------
Server Name: IP-0AD1A3A5\SQLEXPRESS
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536

The stacktrace wasn’t helpful, since it basically showed exceptions being thrown when trying to login.

What made it bizarre was that I could look at the database if I logged into SQL Server Management Studio using Windows Authentication.

These are all the things I checked:

  • Server Manager -> Configuration -> Services -> SQL Server, SQL Server Browser, started
  • SQL Server Management Studio -> Security Login -> sa -> Properties -> Status -> Login, enabled
  • SQL Server Management Studio -> Security Login -> sa -> Properties -> General -> enter a new password
  • SQL Server Configuration Manager -> SQL Server Network Configuration -> Protocols for SQLEXXPRESS -> TCPIP, enabled
  • Windows Firewall -> Inbound Rules -> SQL Server Inbound, enabled

At this point, it might be obvious you what I did wrong: SQL Server Database Engine is set to Windows Authentication mode when it should be set to SQL Server and Windows Authentication mode. To fix this:

  • SQL Server Management Studio -> Properties -> Security -> select SQL Server and Windows Authentication mode
  • Restart database server

Then you can login as ‘sa’. Wohoo!

Web Dev Fools Episode #9

Web Dev Fools Episode 9

Web Dev Fools Episode #8

Web Dev Fools Episode 8

Web Dev Fools Episode #7

Yeah, so we have been bit a lax in getting out epsidoes of Web Dev Fools. Not like to don’t make them, we have just been lazy posting them.

Web Dev Fools Episode #7

Web Dev Fools Episode #6

Yeah, so we have been bit a lax in getting out epsidoes of Web Dev Fools. Not like to don’t make them, we have just been lazy posting them.

Web Dev Fools Episode #6

Nick Show Episode 6: July 4th 2010 Fireworks @ Lenox Square

We went to the July 4th fireworks at Lenox Square, here in Atlanta, Georgia. This is a slightly edited version from our view point. Watch the last couple of minutes, lots of fun.

Nick Show Episode 6 July 4th Fireworks at Lenox Square, Atlanta, GA

Web Dev Fools #5: 301 Redirects, VideoPress, Branding

In this episode of @webdevfools, we discuss 301 redirects, iOS 4, WordPress, VideoPress, and branding.

Web Dev Fools #5: 301 Redirects, VideoPress, Branding

Web Dev Fools #4

In this episode we discuss E3, iPhone vs Spring EVO, co-working, co-oping, ad blocks screwing websites, regular expression, whats the process of going from design to WordPress.

Web Dev Fools #4

Braves catcher Brian McCann supports the Georgia Lions Lighthouse

Update: Video changed.

Nick Cast Episode 5: How to Upgrade Your Blog to WordPress 3.0

In this episode, I demo how I upgrade this blog to WordPress 3.0. Like I say repeatedly in the video, make sure you backup your WordPress database and files before attempting the upgrade. Check out the WordPress Codex on how to do backups. In future episodes, I’ll cover backing up WordPress.