One of the first tasks having installed a SQL server is to setup a backup process, coming at it from a Linux centric world this is rather different and actually poorly documented on the Microsoft knowledgebase so here’s how to do it.
4. Give your ‘plan’ a descriptive name – something you will recognise when you come back to it months or years later, if you only want to perform a backup you can select the schedule (i.e. when to run it) here although I do that later on.
5. You can simply backup the database but if it’s going to be busy, especially with a lot of delete/update queries I’d recommend also having it shrink on a schedule to avoid it growing out of proportion by ticking both boxes. Skip to step 9 if you’re not interested in the shrink process.
6. I prefer to reduce the database size before the backup to keep the backup small although if you don’t trust your hardware you may prefer to have a good backup before you run the shrink in case it hits anything unexpected (although it’s pretty good to be honest).
8. This is the most scary looking screen of the process but is quite logical and allows you to set in quite granular means if you desire how and when the shrink should run, once a week is sufficient for my needs.
9. Now we’re onto the meat of the matter, backing up SQL databases. I chose a full backup but you may prefer a ‘simple’ backup. For details on the various types see Microsoft’s MSDN article.
I have created a folder, c:\backup to store my backups into, the location is down to personal preference but I don’t like storing data within program files as it is too easy to forget to backup the backups off-site as program files are not normally high importance on a backup strategy.
10. Similar to step 8 this allows you to set the schedule for when you want your backup to run, I chose nightly at 00:30 to make sure it was complete before the separate offsite-backup process ran but your needs may vary.
13. Confirmation that the jobs have been created – do review this to make sure that you didn’t miss anything (e.g. it’s easy to overlook the all-important scheduling).
14. You thought you were all done didn’t you… if this is a fresh install then you will most likely find that the SQL Server Agent is disabled by default meaning your maintenance plans won’t run. Personally I think the ‘Maintenance Plan Wizard’ should enable this but it didn’t seem to for me, it is however a simple matter of right-clicking to enable it.
If you’ve followed those steps then you now have SQL Server setup to create a .bak file every night and a shrink maintenance job run ever week.
Don’t forget to include this file in your offsite backups… you do have offsite backups don’t you?
Having recently been involved in building an e-commerce website aimed at a mobile audience I thought it would be worthwhile posting a couple of lessons learned from the result.
1.Smaller is better
2. Don’t get Cached out
When we first launched we experienced a weird phenomenon with images looking distorted on some phones but not others, after much research we discovered that this was not down to the phones but instead the mobile networks and not something we had spotted when testing primarily on Wi-Fi enabled phones. Many of the UK mobile networks perform on-the-fly compression of all images which can result in some nasty compression artefacts. Adding
Header set Cache-Control "no-transform"
to the apache .htaccess (or virtualhost) disables this network compression – you do need to ensure that you are compressing the images as much as possible first – remember, smaller is better.
3. Touch, don’t hover
This is probably an obvious one in hindsight – touch devices make navigation systems with a hover state (or drop-down menu’s) very awkward for the user as many phones don’t offer a hover state. Does make it more challenging when trying to use the best of responsive design principles to enable a site for mobile and desktop viewers however.
4. Pan & Zoom
5. Getting to Scripts with your tech
There are a number of mobile frameworks such as Sencha Touch or jQuery Mobile, each of these has positive and negative sides and I’m not going to try and compare them here but do some research before you start, they are all rapidly updating and have very structured ways to work which can bite the unwary in unexpected ways – try adding Google Analytics to a jQuery Mobile site by simply pasting the code into the header of your HTML for example can result in very odd behavior due to the way in which the page is built using AJAX.
6. Want some ‘m’ with that?
7. Where am I?
With the advent of mobile geo-IP technology it is quite easy to be drawn into telling users exactly where they are and for some audiences this is highly valuable (e.g. if you’re in a store locator) but many visitors are looking at your site with far more interest in what you can offer online than having any desire to come into your physical shop – respect this and don’t try to force them into giving away their location and/or tell them where they are, it can be really offputting and actually lose you business.
Building an e-commerce site for a mobile audience has been an interesting and fulfilling experience which I intend to work on further, I hope if you’re reading this you will enjoy it also and perhaps learn from some of my mistakes rather than finding them out yourself. If you think there is anything important which I’ve omitted please feel free to add a comment below.
analog is a great way to find hard facts from web server log files – no guessing at what is going on just hard facts.
Sadly Stephen Turner, the original author is no longer maintaining this program meaning that it has not detected new versions of operating systems since the release of 6.0 in 2005.
The community and I worked to add detection for Windows Vista after it’s launch and have now added detection for the forthcoming Windows 7 as well as Apple Macintosh OS X.
To make use of this you would need to recompile Analog (detailed instuctions can be found on the analog.cx site, for most Linux installs this is simply a matter of ‘make’ but Windows is a little more involved).
Update 20 Jul 09, now includes detection for Google Chrome browser also.
The updated file you would need to replace is tree.c, this can be found here.