Shrink a SQL Database using SQL Management Studio

Here is a quick “how to” on shrinking a SQL Database using SQL Management Studio.

1. Launch SQL Management Studio and login with your desired credentials.

2. Connect to the SQL Database engine instance and expand it by double clicking on it.
3. Expand your “Databases” node and right-click the specific database you would like to shrink.
4. Go to “Tasks” -> “Shrink” and then click “Database”

5. There are some optional settings at this point. Read more about the process here if you would like to learn more. Otherwise continue with the defaults by clicking “OK”.

Here are the results on a DB I shrunk today (before & after):

An update on what I have been busy with lately…

Thought I would do a quick blog post on what I have been busy with lately.

1. My first iPhone / iPod Touch game (released on Cydia for Jailbroken devices)

So this is something I have been busy with over the last few months – coding bits and pieces here and there whenever I get a bit of spare time on my hands. Its nothing special – just a simple Maze game. You use your device’s accelerometer to navigate your character through 5 maze levels. If you touch the walls you lose health. The longer you take to complete the maze, the more score you lose too. So the point is to get through in the quickest possible time without touching walls. I learnt the basics of how to work with the accelerometer, game loops, twitter integration, a little bit of PHP and mySQL for the Highscore system and a fair amount of general objectiveC code. There are a couple of bugs in the game at the moment (like the way you get a little stuck on walls – issue with my game loop) that I don’t really have time to sort out at the moment. But hopefully I’ll get more time in the near future to figure out my mistakes and fix these. You can check the game out in more detail here or you can download it for Jailbroken Apple devices on Cydia. Search for “Speed Maze”.

2. Moving

Well we’re moving house in the next month or so. We have found a place a little closer in to London that is going to offer far more room, an awesome garden, park across the road, and to top it all off, its in a nice quiet cal-de-sac. As such, I have been taking the opportunity to eBay some surpluss hardware and gadgets I have had lying around for a while. This includes various PCs and bits of hardware I have had lying around, plus around 20U worth of Dell PowerEdge servers! (See image above).

3. Other

My home VMware lab – I have also been building various ESX and vCenter labs here at home to play with in a non-production environment. This is great as it allows me to test all kinds of crazy things I really don’t want to try out at work! I have chopped and changed the hardware, but finally have two different labs going. One is a nested set up of virtualized ESX 4.0 hosts, running under a main ESX 4.0 host if you see what I mean.  The other is running on a PowerEdge 6850 server at the moment – 4 x Xeon 3.16GHz CPUs and 4GB RAM. The issue I have here is that there is no Intel VT (hardware virtualization) support on these processors. So although ESX 4.0 runs OK, I can only run 32-bit VMs for now. Exchange 2010 and other 64-bit VMs will have to stay on my main gaming PC for now then. I also found this great WordPress plugin by lynxbat on Twitter. Once set up, it displays statistics from your VMware ESX host or vCenter Server. You can take a look at my current lab stats on the right in the sidebar. Get the plugin over here: WP-vSphereStats. Apart from that, we have also been planning one or two soon to be taken, well deserved holidays. We’ll be off to France soon, after which we’ll be taking a nice long holiday in South Africa. Excited to see friends and family again soon!

Allow ICMP / ping response on a Windows Server 2008 or 2008 R2 machine

A very quick blog post today, seeing as though I have run this command on about 4 or 5 new servers I have deployed today. To allow a server to respond to incoming ICMP traffic (ping) you can issue the following command in the command prompt. Do this as an administrator of course!
netsh firewall set icmpsetting 8

Your machine should now respond to pings. You can also do this via the Windows firewall GUI but I find the command to be the quickest and easiest way of achieving this.

How to pin an application on a network / mapped drive to your Windows 7 or 2008 R2 taskbar

So here is something that has been annoying me lately. On my work machine I use a couple of applications that are stored on mapped network drives. When you try and right-click the .exe to select “Pin to taskbar” there is no option to do this. Here is a work around that will allow you to get these network stored applications / exe files pinned to your taskbar in Windows 7 or Server 2008 R2.

1. Copy the .exe file of your application on the network drive to a temporary location on your local machine or server’s drive.

2. Make a shortcut to this .exe on your desktop.

3. Right-click on this shortcut and then select the “Pin to taskbar” option which will now be available.

4. Right-click the pinned icon on the taskbar and then right-click the shortcut in the list of options that appears – select Properties.

5. Edit the “Start in” and “Target” fields to point to the actual location of the original application on the network location.

6. You can now remove the temporary shortcut and .exe that you copied as these are not needed anymore.

You’ll now have your network location application pinned to your Windows 7 or 2008 R2 taskbar.

Accessing network equipment via console cable from your ESX / linux server

Ever wondered how you can access your Cisco router, switch, or other network device over console cable from your ESX host / other linux machine? Obviously you’ll need a COM port on the physical hardware to start… Here’s a guide I wrote for SysAdmin-Talk. Have a read if you are interested in finding out how to achieve this. They have some other great articles and how-to’s posted up there. I have already found some extremely useful Exchange how-tos and guides and am looking forward to writing more for SysAdmin Talk!

SysAdmin Talk – Don’t Tear your Hair Out over Access to Cisco Devices