• Using hand crafted scripts is all well and good, however you should enclose the database name in [ ] to avoid databases containing a space in their names; otherwise your script will crash. I have learnt this by experience.

    Keep up the scripting though ...