You are currently browsing the Log et al – Peter Curd blog archives for April, 2010.



Unable to add certain Active Directory users as Windows Logons to SQL Server 2008 on Windows Server 2008 R2

By pcurd

Last week I faced an issue where I was unable to create Windows Logons for SQL Server 2008 from Active Directory users on a Windows Server 2008 R2 server when a Windows Server 2008 server was able to.

The error was a 15401 error which are quite common and usually mean your Server Principal names are wrong, however I had checked this and knew it was not an authentication issue. See my post on Server Principal Names for more details on this. Plus I was able to add other users. The error was “Error 15401 – Windows NT user or group ‘domain\username’ not found”.

There is a Knowledge Base article which describes the problem (with a hotfix) but the symptoms are not the same as the knowledge base so I hope this makes it easier to find. The knowledge base article is KB976494 (Error 1789 when you use the LookupAccountName function on a computer that is running Windows 7 or Windows Server 2008 R2)

Reblog this post [with Zemanta]



Access 97: The database engine can’t find Error

By pcurd

When linking to a SQL Server table in Access 97 today I came across this weird error:
“The database engine can’t find TableName. Make sure it is a valid parameter or alias name, that it doesn’t include invalid characters or punctuation, and that the name isn’t too long.”

As the table name was reasonably small, and I had longer table names already linked, I became suspicious.

The problem was indexes, if the total length of the table name plus the length of the name of the longest index is longer than 64 characters, you get that error. Making the index name smaller solved the problem.



DRM and me – The problem with The Settlers 7

By pcurd

This morning I happened to notice on Steam that there is an update for the Settlers 7 out and I thought to myself, wow did I miss the release?

I’m a big fan of the Settlers series and I own all of them from Settlers 1 (which I have on floppy disk somewhere) through to Rise of an Empire, the sixth game in the series, which I own on Steam.

Although there have been shakey moments in the francise, the fifth game The Settlers: Heritage of Kings tried to be too much like Spellforce without capturing the essence of RTSRPG for example, Settlers games have always been fun to play.

So with much excitement I did a quick search.. nope, Settlers 7 (Paths to a Kingdom) is not available on Steam.. must be one of those regional locks which annoys me, considering The Settlers is made by Blue Byte Software, a German developer. Why does the US get it first? It’s published by Ubisoft – a French publisher!

So I decide to check out Ubisoft’s download page to see what the price is and there I find it. Well, I find the US page anyway. After some more searching I find the UK page – except it’s from GamesPlanet. But whatever, it’s got a Ubisoft logo on it.

£34.99 is a reasonable price for a new game, don’t even get me started on the “electronic copies should be cheaper” debate, so I start to check out what’s in this edition, after all the US copy is the Gold Edition and only £5 more. The feature difference isn’t important but I do notice one thing I’ve been secretly dreading all this time. Ubisoft’s DRM package (Digital Rights Management).

Read more »



Find Query Plans on Microsoft SQL Server

By pcurd

Today I was asked by Luke Smith a question about Query Plans in Microsoft SQL Server and how to return the Cached Query Plans to check they are decent.

I began to think about the DMV (Dynamic Management View) sys.dm_exec_cached_plans and whilst that includes some important information, it doesn’t include the plan itself.  So then I turned to another DMV, sys.dm_exec_query_plan passing it the plan_handle from the first DMV.

Finally, to be useful as a diagnostic tool I wanted the query text so I added in a third DMV sys.dm_exec_sql_text again passing the plan_handle. I then sorted by usecounts which does what it says on the tin and limited to those that are not system procedures, are actually plans, as opposed to records from parse trees or extended stored procedures, and have been used more than 10 times.  This returned a lot of data for me so I limited to the top 100, but this could obviously be tuned to a different environment.

Running this in SQL Server Management Studio has the bonus of being able to click on the XML in the query_plan and view the plan graphically which is definitely better than the XML!
Read more »