Since the process of configuring Microsoft SQL Server is easy, but not exactly obvious, I’ve laid out step-by-step instructions on how to do this. Did I mention it is free? Well, 750 hours a month for free (I’ll wait while you do the math).
- Sign into Amazon Web Services console. If this is the first time working with AWS, credit card authorization ($1.00) and a phone call verification will be performed. From scratch, this process takes about 10 minutes to complete.
- Once the console is loaded , click “Launch Instance”.
- Select Windows 2008 x64 with SQL Express and IIS and click “Select”.
- On the following screen, make sure “micro” is selected and click “Continue”.
- On the Advance Instance Detail page, make sure shutdown behavior is “stop”, click “Continue”.
- A name can be entered on the Keys page to distinguish it from other servers, then click “Continue”.
- Creating a key pair will allow Remote Desktop Access to the EC2 instance. This is needed. Name the key, then click “Create and download”. Download the .pem file to a place where it will not be lost. You are using Dropbox, right? Click “Continue”.
- The Security Group page configures which ports will allow incoming traffic. It is like the external firewall. By default ports 80 (IIS), 3389 (RDP) and 1433 (SQL) are allowed. Create a new security group with these default settings and click “Continue”.
- Verify all the settings are correct on the last page. Pay specific attention to Instance Type (should be micro) Shutdown behavior (should be stop) and key pair name (should match what was created in step 7). Click “Launch”.
- The server will be created and configured, then it will spin up and be ready for use. This process usually takes about 10 – 15 minutes.
- Once the server is ready, check the box next to the new server name, then click “Instance Management”, when the context menu opens, click “Get Windows Password”.
- On the screen that opens up, click “Choose File” and browse to where the .pem file was saved from step 7. This will decrypt the administrator password. Copy and paste this password in a new note. You are using Evernote, right?
- Find the Public DNS Address in the instance details pane. Copy and paste this address into your Evernote note.
- Open a Remote Desktop Client – I’m partial to CoRD.
- Create a new RDP connection. The server name will be the address from step 13. The username will be administrator and the password will be from step 12. Go ahead and forward disks as well.
- Once an RDP connection is established with the new server (pretty cool right? Remember this is free!), go ahead and change the administrative password to something easier to remember. Click the Start menu, select Control Panel, click User Accounts and step through the wizard to change the password – make note of the updated password.
- Log off the server and reconnect using the new password.
- Internet Explorer is a nightmare on a server OS. I keep a standalone installer of Google Chrome in my Dropbox. This is why we forwarded the disks in step 15. Open up My Computer and browse to the installer file using the \\tsclient drives. This step is not relevant to this exercise, but it is just good practice.
- We are now ready to configure SQL Server. Click the start menu and browse to SQL Server Management Studio.
- Once it loads (it will take a little bit the first time), logon using the credentials that are pre-populated.
- Right click on the server name (at the top of the tree view) and select “Properties”. A dialog box will open up.
- Click the security tab and change the Server authentication to be “SQL Server and Windows Authentication mode”. This is also know as mixed mode. Click “OK” to close the dialog and press “OK” to the next dialog telling you to restart the server (it doesn’t mean the entire server, just the service running SQL Server – not exactly intuitive naming in my opinion).
- Right click on the server name and select “Restart”, click “Yes” to the “are you sure” prompt.
- Once the SQL Server is restarted, expand the “Security” node, then expand the “Logins” node. Right click “sa” and select properties.
- Create and confirm a new password. Then click into the “Status” pane and change it to “Enabled” under “Login”. Click “OK”.
- At this point, Management Studio should be closed and reopened using the new credentials for testing. Change the Authentication mode to “SQL Server” and enter “sa” for the user and the password created it step 25.
We are finished! Management Studio can be opened up from a different computer, enter the address from step 13 and control the SQL Server instance remotely.
A couple things to remember.
- There is only about 9 or 10 GB free after everything is installed and configured. This should not be used for Wikipedia clones.
- There is only 613 MB of RAM. Make sure to log off Windows after finishing RDP sessions to conserve resources.
- The Public DNS Address will change if the server is restarted from Windows or stopped and restarted from the AWS console. If this server is going to be used for anything other than testing, an elastic IP should be configured.