Monthly Archive for June, 2010

SQL Server 2005: Missing Login Names After Restore

As mentioned in earlier posts, as time permits I’m migrating an old SQL Server 7 installation over to a new SQL Server 2005 installation.  One of the things I came across was that even though I had Users, Roles and Permissions set up an looking OK, I was unable to run even a simple SELECT query against the database without an error stating that the user didn’t have permission.  After checking all of the users/roles/permissions for the database and its tables and finding nothing wrong, I noticed that the properties for the user did not show a login name and any attempt to change the properties would demand a valid login name even though the field was greyed out and not editable!

The problem appears to be that when restoring an older database into SQL Server 2005, the login name can be assigned a blank entry.  The easy fix if your user names map to logins of the same name, i.e. login user1 maps to user user1, is to run the following query for each database user:

USE [database_name];
GO
EXEC sp_change_users_login ‘Auto_Fix’, ‘Username’;
GO

You should get the following response:

The row for user ‘Username’ will be fixed by updating its login link to a login already in existence.
The number of orphaned users fixed by updating users was 1.
The number of orphaned users fixed by adding new logins and then updating users was 0.

More info can be found here.

Olympics: Only VISA Accepted!

According to this article today,  if you want to pay by card for London Olympic tickets and merchandise or withdraw cash from machines at Olympic venues, you will only be able to do so with a VISA branded credit/debit card! This is part of the sponsorship agreement between the London 2012 and VISA whereby VISA paying a load of their money stomps all over the concepts of legal tender for the public!  It’s shocking to what extent the Olympics has completely abandoned all principles in recent years in order to sell their soul to large corporations.

I particularly like this statement: “Visa points out that non-Visa card holders can buy a pre-pay card for the duration of the Games”. Why the hell should we?!

The Office of Fair Trading is looking into the agreement which in my opinion should be branded illegal.

VirtualBox – Guest Additions

I wanted to take a quick look at Ubuntu 10.04 so I downloaded the latest VirtualBox VM software and grabbed the Ubuntu ISO so that I could just run a test on my local PC inside a virtual machine so I could play with it while doing other things.  I haven’t used VirtualBox for a while and while the guest OS install went fine, I couldn’t get the screen resolution to increase so my Ubuntu desktop was fixed at 640 x 480, even in full screen mode.  It turns out the additional functionality is available through installing Guest Additions.  I’m not going to go into the details of how to do it because there’s several straight-forward How-To’s on the web, for example here.

Typical American Response

I see we are in typical American indignation mode at the moment.  How dare BP cause this environmental disaster on our doorstep. Lets call their CEO in and give him a dressing down.  Like any disaster, a long period of investigation is required.  It was BP’s operation but the rig was managed by Transocean, which is an American company which moved it’s HQ to Switzerland to avoid paying tax and there is also some involvement in the mix of Halliburton, another large American company no stranger to controversy around the world.

American politicians always act like this when something they’ve been doing for years finally bites them in ass on their home turf.  Environmentally, they are the largest polluter in the world and constantly refuse to sign up to any international environmental agreements.  American companies have been at the centre of disasters for decades.  How about Exxon Valdez (Exxon Shipping Company) or Bhopal (Union Carbide) just for starters?  Now it’s off their own coast and drilling for oil they themselves hunger for, it’s somehow much worse than anything that’s gone before.  No-one is arguing that this is a huge environmental incident which will live on for years and that BP and its partners, including the American authorities who license the operation and take tax revenue from it will have to answer questions and do what is necessary to correct the results of their actions.  It is the grand-standing my senators and Obama which is irritating me.

It was the same with 9/11.  For years Irish Americans willingly and knowingly funded IRA terrorism on British and Irish soil.  Only when terrorism knocked hard on their door did it matter.  According to them no-one had experienced terrorism until Americans had.  Their response was to go stomping round the world starting wars with everyone that didn’t ‘get’ the American way of life dragging Britain along to sacrifice its soldiers in the name of a ‘war on terror’.

America – the most self-important, arrogant nation on earth.

Google Maps Inaccuracy

I produced a basic website for a group company and included a Google Map on the contact page.  It was reported to me this morning that the map points to the wrong area.  I obviously thought I’d made a mistake so went to correct it.  However, the fault seems to lie with Google Maps embedding of it’s own maps.  In this case I wanted a map for post code OL10 4HP in Lancashire and on Google Maps website it gives me the correct location.  However if I then click ‘Link’ then ‘Customize and preview embedded map’ it changes it’s location to over a mile away.  Now I’m sure it’s possible to somehow manually edit the embedded code to give me the original and correct map, but it’s a strange error on Google’s part.

Anyone else had this problem?

SQL Server 2005 Remote Connections

Yes, I know I’m way behind the curve here but I don’t normally used SQL Server as wherever possible I use MySQL instead.  However, we have one application which uses an old SQL Server 7.0 installation which is installed on a slowly failing server.  Since this application has become low traffic, I’m being tight and setting up a new server on a basic HP ML115 with SQL Server 2005 Express as it suits these specific demands easily and cheaply.

Anyway, I was having trouble connecting to the SQL Server 2005 service from a client machine and couldn’t see a reason.  No log files were being created on the server so I did a bit of research.  I came across Rick Strahl’s blog entry from 2006 (I did say I was working well behind the curve!) which explains that by default, SQL Server 2005 does not allow remote connections, which is fine if the setting is easy to find.  Unfortunately it’s in a completely different application called the SQL Server Surface Area Configuration Tool (what a great name, very intuitive). Activate remote connections and away you go.

In my case, no actually.  I still couldn’t connect remotely and, as it turned out, I couldn’t connect through ODBC on the server either.  Finally, I discovered the solution which was to set the connection to server_name\sql_instance_name not just the server_name.  For example, whereas on SQL Server 7 you can just connect to SERVER1, using SQL Server 2005 Express you need to connect to SERVER1\SQLEXPRESS because SQLEXPRESS is the default instance created during installation.  A simple difference but confusing at first!

Bloody Sunday. Bloody Hell!

The enquiry into Bloody Sunday has cost the UK taxpayer £195m over 12 years. Half of this has gone directly into lawyers pockets. What an utter waste of money for an enquiry which will be worthless.  Everyone will have lied and covered-up to make their version of events the way they want it to be seen and the truth will be buried under layer upon layer of half-truths, opinion and hearsay.  They spent £34m on IT when even at the peak of the enquiry there were only 38 staff.  Just to put that into perspective, it’s enough to buy each of those staff 75 new £1000 laptops EVERY YEAR!  What kind of IT infrastructure did they blow all that money on?

People moan about the wealth of bankers but these public enquiries and quangos are squandering huge amounts of public money without any real controls being placed on them.  This should be the last of them, a lesson learned once and for all.

IT is dead.

OK, that’s an OTT headline and it comes a day after me spending a stupid amount of time getting a friends iPod Touch to accept some video files which it wouldn’t because the piece of crap can only play a miniscule amount of file formats which most computers take in their stride, and not helped by iTunes trashing my secondary Atom-based PC in the living room which happily manages to do everything else I need but now, thanks to iTunes won’t even open Windows Explorer to browse files!

However, on top of my growing feeling that nothing really works the way it’s supposed to, from Phones to iPods to software to Sky+, the latest edition of PC Pro landed on my desk this morning, which I’ve subscribed to for years and for the first time I skimmed through it in two minutes and it went in the bin.  There’s just nothing really new any more, new laptops and desktops and monitors and digital cameras are ten a penny and Office 2010 looks again like Office 2007 with a couple of bells and whistles bolted on.  I’m supposed to get excited about this stuff?

It seems these days that the media only get excited about new Apple products which are produced for and bought by those for who eye candy is the most important thing.  These people would rather have a 5 carat cubic Zirconia than a 1/2 carat diamond.  Just give me stuff that works please and works the way I want it to instead of making me a slave to the manufacturer, and don’t tell me you’ll fix it in in the next model because you told me that three models ago and it still doesn’t work!

That’s my Monday morning moan finished with, better get some work done I suppose!