Systems, consultation and development 

Facebook E-mail

Streaming drive images over the network

I’ve been doing a fair bit with the lovely Raspberry PI machines recently and if you didn’t know they run off small SD cards. Now once you’ve done all the tweaking to get the system to do what you want, if you’re like me and a little paranoid you might want to make sure you…

Raid 1 recovery

Recently I had to ‘opportunity’ to try and recover a broken set of raid disks from a consumer NAS device (in this case a BlackArmor 420), both disks failed around the same time.. Sad face..   Since the RAID type was 1 this was a mirror and each disk ‘should’ have contained the same information. …

Recover a ‘suspect’ database in MSSQL

Sometimes you don’t have access to a backup, things have gone a bit wrong and MSSQL starts namecalling. Suspect! it cries, and stops you going any further. This little snippet may assist. Bon chance!! ———— EXEC sp_resetstatus [DBNAME]; ALTER DATABASE [DBNAME] SET EMERGENCY DBCC checkdb([DBNAME]) ALTER DATABASE [DBNAME] SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CheckDB…

Mavericks broke my mail

Just a little one to keep me going for a while. Whilst upgrading a macbook to OSX Mavericks I noticed after restarting that the mail client was hanging, not crashing, but spinning at 100% cpu with the com.net.internetaccounts process. After a bit of research it all boiled down to an error in the migration utility.…

Team Foundation Build error when saving (FSharp)

You probably see past the obvious on this one if you get it.  When trying to save a build definition you may get an error complaining about the FSharp assembly is missing.  Don’t panic, you probably did what I did and uninstall F# thinking ‘I don’t need that!’  Well, it turns out you do Here’s…

Cumulative totals with CTE

Following on from this post, here is an alternative that uses a lot less grunt. (Using the same testtable) ;with cte (i,v,running_total) as { select i,v,v from testtable where i = 1 // initialise the first entry union all select x.i, x.v, cte.running_total + x.v from cte join testtable x on cte.i+1 = x.i }…

Basic cumulative totals etc with T-SQL

Very often when writing reports or dealing with time data you’ll come across the need to see what the total at that point was, not the grand total of all data, just total up to (and maybe including that point). Lets start with a basic set of data declare @testtable as table (i datetime,v int)…

VM (vSphere) CLI for powering VM’s

Start with ~ # vim-cmd vmsvc/getallvms use the ID returned for the VM in question to ~ # vim-cmd vmsvc/power.getstate <ID> then ~ # vim-cmd vmsvc/power.on <ID> And we’re done…   If you want to kill a machine remotely (lets say you want to shutdown your teenage daughters machine because it’s past her curfew) net…

Restart ESXi management service

Now and again ESXi (or ESX) may stop you connecting via the remote management interface. If you have ssh enabled (emergency back door) this should kickstart everything back into touch. — ./sbin/services.sh restart This does NOT restart any VM’s and so should be safe on a production server, middle of the day etc, etc. Easy…

Hidden files on OSX

Need to show hidden files (or hide them again) on OSX? Toggle this default defaults write com.apple.Finder AppleShowAllFiles TRUE / FALSE (remember to killall Finder to force its usage) Nice and easy.. Also, for specific folders, try adding a period to the name of a file or folder, instant hiding. Of course, I’m not sure…

Home Archive for category "Top Tech Tips"