Can’t log into SQL Server 2012 with domain admin account

I recently migrated a database from SQL Server 2008 to a new server running SQL Server 2012. Everything worked fine, but it was annoying me that I couldn’t log into the database (using SQL Server Management Studio) as a domain administrator – specifically DOMAIN\administrator. Logging in as the SQL user “sa” worked fine, but using Windows Authentication I got the error:

Error Number: 18456
 Severity: 14
 State: 1
 Line Number: 65536

Now, I’ve had similar to this before, and the usual cause is because “Server Authentication” isn’t set to “SQL Server and Windows Authentication Mode” – but normally it’s the “sa” account that can’t log in, and the domain admin can.

Logging in as “sa”, I checked this section of the server properties:

sqlserversecurity

Which shows what I’d expect. It seems that the user just wasn’t a valid user in the SQL server security table. To fix that, you need to run:

create login [DOMAIN\administrator] from windows;

and to make them an SQL admin, run this:

exec sp_addsrvrolemember 'DOMAIN\administrator', 'sysadmin';

Finally, restart the SQL server service (actually, I’m not sure if this was necessary, but I did it anyway) and you can log in as the user you just added. Hopefully!

Photos that Google thinks are cars

Google Photos is a relatively new product from Google, at least in it’s no-longer-Google+ shackled form. It’s pretty good, in terms of some of the syncing and organising it does, and I’m a fan of how it makes animations from photos it thinks are quite similar – in particular, “burst mode” photos.

One of it’s “magic” features is how, when you search your photos, it automatically detects things in them and adds them to albums based on that content. Some are obvious, like locations, and some are a bit more clever, like Flowers or Playgrounds. There’s also one for “Legos” which, although it manages to correctly detect Lego models, uses the incorrect label “Legos”, which doesn’t exist as a word. The plural of Lego is Lego, of course.

However, the “Cars” grouping in my set of photos is… somewhat wrong. Sure, there are a handful of cars (and a few buses, tractors, a JCB and some toy cars – including Lego ones – all of which I’ll give a pass as they’re similar at least), but these? These are not even nearly cars.

Upgrading your 3DS SD card, your 3DS, or both

Once more the time has come to update my seemingly rather popular guide to upgrading your Nintendo 3DS SD card (previously here). This time, I’m going to cover several scenarios – upgrading your SD (or SDHC) card to another SD (or SDHC) card, upgrading your SD/SDHC card to a 64GB or larger SDXC card, and upgrading your 3DS to a New 3DS, transferring everything to a MicroSD/SDXC. EDITED 11/02/15 to clarify some points in Section 3

Firstly, some information:

Nintendo’s published method for transferring data from SD card to SD card mostly works, but some stuff sometimes doesn’t make the transfer, or does but is inaccessible. For example, sometimes photos are missing, or you lose your play coins or streetpasses. My method (Section 1, below) transfers and retains access to the lot.

Also, Nintendo only officially support SDHC cards of up to 32GB in capacity, but in fact SDXC cards work too. The main incompatibility is not with the cards themselves, but with the partition format SDXC cards use – by default, exFAT, or sometimes NTFS. Neither of these can be read by a 3DS.

Thankfully, 64GB and 128GB SDXC cards can still be formatted to 3DS-usable FAT32 format. Unfortunately, Windows 7 (and 8) has made this difficult to do by not including the option on the standard disk formatting utility.

So, if you want to use a larger than 32GB card, then follow the steps below (in Section 2) carefully before transferring your 3DS data.

In addition, Nintendo also have a guide for migrating all your games, saves, data, software licences and NNID from one 3DS to another. This works fine, but there’s a faster way if you have a lot of data and have a New 3DS which only takes a Micro SD (or Micro SDHC, or Micro SDXC) card rather than a full size one. That’s Section 3, below.

Continue reading »

How to set up a Linux lab with no Linux machines

So when you’re told that you might have 30-odd students that need access to Linux for some course they’re doing, and you don’t have any spare machines and don’t want to dual boot with Windows on a computer suite and you don’t have time to do that anyway, what do you do?

Well, one solution is what we’ve done: A Linux virtual machine running on a Hyper-V server, with “child” virtual machines, each accessible from a Windows machine.

Specific for this purpose, Linux will not need a GUI. Everything the students need to use is via the command line, and they also don’t need networking or internet access. I also wanted everything to be as secure as possible, both on the Windows client and Hyper-V server, without giving students unnecessary elevated privileges. Continue reading »

I made a game (with no zombies in it)

SnapShot_140619_145437It’s not a very good game. In fact, the only “game” element is trying to collect all the items more quickly than before. It’s also a mutation of the example Phaser HTML5 game, although much is rewritten or modified.

It’s also not very good. I think I said that.

But! It shows how easy it is to make a HTML5 game with Phaser. Making a good game though? Bit trickier, and not really something Phaser can help with.

Anyway, you can play it here. The controls are the arrow keys, OR! If you have a Wii U, you can play it on the web browser there using the dpad! Amazing (but not very good).

I’m especially proud of the wrong way I’ve done a timer, which means that depending on your computer or browser, it runs at a different speed, making comparing times with others completely impossible. Just as well, since there’s no leaderboard either.