All posts by onlyconnect

SQL Server 2008 delayed until third quarter 2008

Microsoft’s Francois Ajenstat says SQL Server 2008 will not be released until Q3 2008. He calls this “roadmap clarification”, Microsoft-speak for what most of us call a delay.

It’s embarrassing for the company, since SQL Server 2008 “launches” on 27th February, less than one month from today. What will actually launch is a feature-complete CTP (Community Tech Preview). Since Q3 can(and often does) mean September, there may be over six months between the launch and the release. It is an extraordinary stretch, especially since Visual Studio 2008, which has been available since late last year, “launches” on the same day.

Still, let’s look on the bright side. First, late releases are better than buggy releases; and the SQL Server team has a good record. Second, at least Microsoft has managed to control the dependencies so that it possible to stagger the releases without anything breaking (one presumes).

Polarisation

Slashdot takes the IBM line:

At this point nobody has the vaguest idea what OOXML will look like in February, or even whether it will be in any sort of stable condition by the end of March. ‘While we are talking about interoperability, who else do you think is going to provide long term complete support for this already-dead OOXML format that Microsoft Office 2007 uses today? Interoperability means that other applications can process the files fully and not just products from Microsoft. I would even go so far as to go back to those few OOXML files you have already created and create .doc, .ppt, and .xls versions of them for future use, if you want to make sure you can read them and you don’t want to commit yourself to Microsoft’s products for the rest of their lives

Alexander Falk, CEO of Altova, which makes a popular Windows XML editor:

I see the ISO vote as a non-event. In my opinion, the real-world adoption of OOXML is primarily driven by the ubiquity of Microsoft Office much more than any standards body…In terms of actual customer inquiries regarding need for ODF, we have not seen any interest from our customers…My advice to dev shops is to start working with OOXML as early as possible.

Technorati tags: , , , ,

Flex briefing in London tonight

Adobe’s Serge Jespers and James Ward are in London this evening (Thursday 24th Jan 2008) and will be speaking to the Flex User Group:

19:00 General intro (Serge Jespers)
19:15 Flex Builder 3 (Serge Jespers)
19:50 Open source (James Ward)
20:00 Data services (James Ward)
20:35 Q&A (and presentation from the community)
21:00 Drinks (free beer, thanks Adobe!)

It’s a free event and there’s room for more, so I thought I’d mention it here.

Here’s the signup page.

If you go along, I’d be interested to know how you find it and what you think of Flex and AIR. Comment here or email me – tim(at)itwriting.com.

Technorati tags: , , ,

Why Internet Explorer users get the worst of the Web

Microsoft’s Chris Wilson has a post on Compatibility and IE8 which introduces yet another compatibility switch. IE8 will apparently have three modes: Quirks, Standards, and Even More Standard.

Here’s the key paragraph:

… developers of many sites had worked around many of the shortcomings or outright errors in IE6, and now expected IE7 to work just like IE6. Web developers expected us, for example, to maintain our model for how content overflows its box, even in “standards mode,” even though it didn’t follow the specification – because they’d already made their content work with our model. In many cases, these sites would have worked better if they had served IE7 the same content and stylesheets they were serving when visited with a non-IE browser, but they had “fixed their content” for IE. Sites didn’t work, and users experienced problems.

In other words, so many web pages have “If IE, do this” coded into them, that pages actually break if IE behaves correctly. Alternative browsers will do a better job, even if IE is equally standards-compliant, because they do not suffer the effects of these workarounds.

Microsoft’s proposed solution is to make the supposed Standards mode a new quirks mode, this time frozen to IE7 compatibility, and to force developers to add a further meta tag to enable the better standards compliance of which IE8 is capable.

It actually goes beyond that. Aaron Gustafson explains the rationale for the new X-UA-Compatible meta tag which enables web developers to specify what browser versions their page supports. The idea seems to be that browsers parse this tag and behave accordingly.

This sounds uncomfortable to me. Versioning problems are inherently intransigent – DLL Hell, the Windows GetVersion mess – and this could get equally messy. It is also imposing a substantial burden on browser developers.

Has Microsoft made the right decision? Trouble is, there is no right decision, only a least-bad decision. Personally I think it is the wrong decision, if only because it perpetuates the problem. It would be better for IE to do the correct thing by default, and to support meta tags that turn on quirks modes of various kinds, or an option in browser preferences, rather than doing the incorrect thing by default.

Still, Wilson makes a case for the decision and has some supporters. Nevertheless, he is getting a rough ride, in part because the IE team has failed to engage with the community – note for example the long silences on the IE blog. Why is Wilson telling us now about this decision, as opposed to discussing the options more widely before it was set in stone, as I suspect it now is? Even within the Web Standards Project, some of whose members assisted Microsoft, there is tension because it it appears that other members were excluded from the discussion.

Another point which I’m sure won’t go unnoticed is that Wilson makes a good case for using alternative browsers. IE users get inferior markup.

Technorati tags: , , ,

Use HTML not Flash, Silverlight or XUL, says W3C working draft

The W3C has posted its working draft for HTML 5.0. Interesting statement here:

1.1.3. Relationship to XUL, Flash, Silverlight, and other proprietary UI languages

This section is non-normative.

This specification is independent of the various proprietary UI languages that various vendors provide. As an open, vender-neutral language, HTML provides for a solution to the same problems without the risk of vendor lock-in.

Food for thought as you embark on your Flash or Silverlight project. I would have thought XUL is less proprietary, but still.

The contentious part is this:

HTML provides for a solution to the same problems

I doubt that HTML 5.0 can quite match everything that you can do in Flash or Silverlight, depending of course what is meant by “a solution to the same problems”. The other issue is that Flash is here now, Silverlight is just about here now, and HTML 5.0 will be a while yet.

Technorati tags: , , , ,

Escaping the Adobe AIR sandbox

Adobe’s Mike Chambers has an article and sample code for calling native operating system APIs from AIR applications, which use the Flash runtime outside the browser.

I took a look at the native side of the code, which is written in C# and compiled smoothly in Visual Studio 2008. The concept is simple. Instead of launching an AIR application directly, you start the “Command Proxy” application. The Command Proxy launches the AIR application, passing a port number and optionally an authorization string. Next, the Command Proxy creates a TCP socket which listens on the specified port. The AIR application can then use its socket API to send commands to the Command Proxy, which is outside the AIR sandbox.

It’s a neat idea though Microsoft’s Scott Barnes gave the design a C- on security grounds. He clarified his point thus:

The communication channel between the command proxy and AIR application looks like a potential vulnerability. One of the things application developers should worry about with security is insecure cross-process communication mechanisms hanging around on someone’s machine. For example if a process listens on a named pipe, and that named pipe has no ACLs and no validation of inbound communication, the process is vulnerable to all kinds of attacks when garbage is sent down the pipe. In the example on using the command proxy how do you secure it so that it doesn’t turn into a general purpose process launcher?

Barnes has an obvious incentive to cast doubt on AIR solutions (he’s a Microsoft RIA Silverlight evangelist), but nevertheless this is a good debate to have. How difficult is it to do this in a secure manner? It is also interesting to note the opening remarks in Chambers’ post:

Two of the most requested features for Adobe AIR have been the ability to launch native executables from an AIR application, and the ability to integrate native libraries into an AIR application. Unfortunately, neither feature will be included in Adobe AIR 1.0.

This is really one feature: access to native code. I remain somewhat perplexed by AIR in this respect. Is the inability to call native code a security feature, or a way of promoting cross-platform purity, or simply a feature on the to-do list? I don’t think it is really a security feature, since AIR applications have the same access to the file system as the user. This means they can execute native code, just not immediately. For example, an AIR app could download an executable and pop it into the user’s startup folder on Windows. That being the case, why not follow Java’s lead and provide a clean mechanism for calling native code? Adobe could add the usual obligatory warnings about how this breaks cross-platform compatibility and so on.

Van Morrison fan site under attack by Web Sheriff

A popular Van Morrison fan site has received a letter demanding that the site be closed. Here’s an extract from a post by the site’s founder.

This site began as a personal hobby about 12 years ago, an expression of my own enthusiasm for Mr. Morrison’s music, which I hoped to share with other fans…The tone is respectful; there is no advertising on the site — never has been; there is no facilitation or encouragement of piracy; in fact the site has long contained a statement to the effect that bootlegging was “not condoned”. Any fair-minded visitor to the site is likely to have concluded that the site promoted, and helped fans to better understand, Mr. Morrison’s work.

Despite this history, despite all of these facts, on Monday, January 14 I received a message from someone working for an outfit named WebSheriff, who claimed to represent Van Morrison and Exile Productions. According to the message, this website stands accused of (and I quote): “numerous infringements of our said clients’ IP [ed: Intellectual Property] rights including, but not limited to, the infringement of copyrights, trademarks, goodwill, performers rights, moral rights, publicity rights, privacy rights and the wholesale facilitation of further, numerous infringements by third parties on a grand scale (such as providing access to bootleg / unauthorised / illegal recordings)” end quote. I’ll repeat for emphasis: “wholesale facilitation of”; “on a grand scale”.

It looks like this is the Web Sheriff in question:

It was through the acute need and demand for the protection of on-line rights against infringements and abuse, that Web Sheriff was set-up by its parent company, Entertainment Law Associates. Web Sheriff is one of the few specialist, companies that operate in the field of internet policing and has become a market-leader through offering truly across-the-board solutions, from on-line legal enforcement to high tech anti-piracy.

There is quite possibly some degree of copyright infringement on the site in question; but attacking your biggest fans, who are doing unpaid promotion, is silly. The site is well-regarded and was apparently featured in the BBC’s “Best of the Web” guide, among other recommendations.

The site owner received this unwelcome missive on January 14th. It was also sent to his employer, a university, presumably because the site was hosted on its servers. He took the site offline as “an expression of goodwill” and pending receipt of guidelines for making the site legal, which he was told to expect within 48 hours. They did not appear, and he decided to reopen the site, but at a new home, so as not to involve the university any further.

No doubt this controversy will get the Unofficial Van Morrison website many new visitors to enjoy these “grand scale” infringements.

Update: It looks as if the site is offline again.

Changing the motherboard or storage controller underneath Windows XP and Vista

Can you change your motherboard without reinstalling your operating system? Sometimes you can, sometimes you can’t. Last week I decided it was time to upgrade the desktop PC on which I do much of my work. The old motherboard was nearly three years old – an Intel 915PBL, which I purchased in order to run 64-bit Windows XP. At the time I was indignant because the BIOS swallowed a full 1GB of my RAM.

Technology has moved on, so I purchased an Intel DP35DP board (I still have a high regard for Intel’s manufacturing quality) and a core 2 quad Q6600 processor. I appreciate that this is now not quite leading edge, but it has been out long enough to be a reasonable price. So I backed up my files, performed the motherboard surgery, and switched on.

For sure I was not depending on being able to continue without reinstalling the operating system. This is not a supported procedure. On the other hand, I figured it would be interesting to try; and so it proved. After all, I’ve had enough trouble installing things like Visual Studio 6 and Adobe Creative Suite 3, not to want to repeat the experience.

My desktop PC is a little complex. There are three SATA drives and three Windows installations. One is Window XP x64 (the original installation); one is Windows XP Pro 32-bit; and one is Windows Vista Pro 32-bit. I work mostly in Vista. Initially, none of these worked with my new motherboard. Attempting to boot Vista caused an immediate restart, and both XP installations blue screened.

The key problem is the storage controller. Typically, you will get a STOP 0x0000007B if your new motherboard has a different storage controller than the old one. The above link is to a Microsoft knowledgebase article for Windows XP, and you will see that it suggests two solutions. One is to perform an in-place upgrade, also known as a repair install. This is where you reinstall Windows to the same location, and it sorts out the device drivers and other critical problems without blowing away your documents or applications. The other is to do a new clean install – not really a fix, more an admission of failure.

Vista no longer supports repair installs. More on this later.

Note that the main issue is getting Windows to boot. Once it does boot, you will likely get all sorts of device errors, but these can usually be fixed. Fixing stuff if you cannot boot at all is more challenging.

Health warning

Since you are still reading, I assume you are in one of two categories. Either you are inquisitive about the innards of Windows; or you have a problem because Windows will not boot. Here’s my disclaimer. The steps I describe below are not supported, guaranteed ways to rescue Windows; and if you experiment with a working Windows installation, you could break it. If you try any of them, it’s at your own risk.

The AHCI problem

Intel’s new boards usually have three settings for the SATA controller. One is IDE, which is best for legacy compatibility. One is AHCI (Advanced Host Controller Interface), which is best for features. The third is RAID, which combines AHCI and a sort of hardware RAID (sometimes known as fakeRAID because it isn’t really hardware RAID, but never mind). Intel boards used to default to IDE, but this one defaulted to RAID which is now Intel’s recommendation. Even if you only have one drive, you can easily set up RAID later if you start with that setting. If you plan to install Linux, you might be better off with plain AHCI.

Repair Install on XP x64

For my first experiment, I tried a repair install on XP x64. It did not go well. There was some minor awkwardness. Intel supplies the crucial RAID drivers on antiquated media called floppy disk. You need this during Windows setup (press F6). However, the motherboard has no Floppy Disk connector; you have to use USB. Luckily I have a USB external floppy which came with a laptop some years ago, so that bit worked. Unfortunately, the repair install seemed to hang on a screen which said “Installing Devices” and promised to complete in 35 minutes. I left it overnight and it said the same thing in the morning, though it had not technically crashed and who knows, perhaps it would have completed one day.

If you ever hit this issue, read this thread. What you have to do is to restart the machine and press F8 to get the advanced startup options. Timing this may be tricky, since setup configures itself for immediate startup. If you get really stuck, find some way to edit boot.ini to insert a delay. Once you have pressed F8, choose the Debugging mode. The repair install will now complete within a sane time. There’s another solution discussed in the thread I’ve referenced above, which involves identifying which device is causing the hang and then preventing setup from attempting to install it; but the Debugging option worked fine for me.

As it happens, I didn’t discover this fix until later. I got diverted by 32-bit XP.

Fixing 32-bit Windows

After getting stuck on XP x64, I took a look at 32-bit XP. The X64 repair install had mucked up the boot menu; but that’s easy to fix from a recovery console. Being a little discouraged, I decided to try the legacy IDE settings for the SATA controller. Good old XP Pro then started, no hassle, no need for a repair install. It detected various new devices, and I ran the Intel driver utility from the CD that came with the motherboard. I also had to reinstall the NVidia graphics driver. My first success.

First attempt with Vista

Vista on the other hand still would not work. It is less amenable than XP to controller changes; I gather this may be something to do with speeding up the boot process by disabling “unnecessary” drivers. Anyway, it blue-screened irrespective of the setting for the SATA controller. It was then I discovered that Vista has removed the option for a repair install. What you do instead is to boot from the setup CD or DVD and choose the option to “Repair your computer”. Then it runs a Startup Repair wizard which tries to fix your Vista. I tried this on all the SATA settings, and it failed. On the first try it thought it might have succeeded and invited me to restart Windows, but it still blue-screened. On subsequent attempts the wizard made some lengthy disk-checking efforts only to inform me that I had a corrupt volume and should give up.

I’m not impressed with Startup Repair. I think XP’s Repair Install is brilliant, and Vista’s Startup Repair is brain dead. I’ll explain shortly.

You can do a sort-of repair install with Vista by “upgrading” an existing install – but you can only start an upgrade from within the instance of Windows that you want to upgrade. In other words, if you can’t boot then this is not an option. Do NOT do an over-the-top clean install. You will lose all your settings.

At this point I nearly gave up and did a clean install of Vista. I still had the nagging thought that if only I could get Vista to load the right storage controller driver, it would probably start up. So I left it for the moment and went back to 32-bit XP, my success story. I wanted to discover if I could switch to the SATA RAID option without breaking it.

Switching an installed Windows OS to AHCI or RAID

This thought led me to an illuminating discussion. This explains that if you want to switch Windows to use a different storage controller, for which the driver is not installed, you do so by manually copying the driver to system32\drivers; and editing the registry so that Windows can use the new driver when booting. For this to work, you need to know the hardware ID of your controller. This is something like:

PCI\VEN_8086&DEV_2822&CC_0104

One way to find this ID is to clean install a second copy of Windows to a temporary location, and then look at the storage controller properties in device manager. Alternatively you can experiment with some likely values, or try several at once. The discussion I’ve linked provides some reg files which show the critical entries.

This looked interesting, so I followed the steps in the first post of the thread, shut down, then restarted with the BIOS setting changed to AHCI. Success – XP Pro started, and I was able to run Intel’s driver setup to clean up the installation.

Getting more confident now, I found the hardware ID for the RAID controller (the hardware ID changes when you change the BIOS setting) and added that to the registry. The actual driver is the same. Success again – XP now started using the Intel Matrix Storage RAID.

XP was done now, especially as I also discovered the fix for x64 described above. But Vista, the one that mattered to me most, was still broken. Nevertheless, I now had a much better idea of how to fix it.

Offline registry editing

Now is the moment to mention a little-known feature of the Windows registry editor. 99% of the time, you edit the Windows registry from within a running instance of Windows. However, the registry editor has an entry in the File menu called Load Hive. The way this works is not particularly intuitive. You select the root of HKEY_LOCAL_MACHINE, then choose Load Hive and navigate to a registry database file that is not part of the active registry. In my case, the hive I needed to load was SYSTEM, located in System32\Config. You may possibly know this if you have ever had to recover Windows when it will not boot because of registry corruption. When you click OK to load the hive, the registry editor prompts you for a key name. Enter something like “Vista Repair”. The loaded hive then appears as a sub-folder under HKEY_LOCAL_MACHINE.

There is no Save; simply make the edits you want, then select the top level of the loaded hive – eg. “Vista Repair” – and choose File – Unload Hive.

This had to be worth a try. I booted my poorly machine into Windows XP, then went to another machine on the network running Vista. I copied the SYSTEM hive from the broken Vista across the network, made a backup, then loaded it into registry editor. Finally, I manually made the changes pretty much as in the reg file used to migrate XP to a new storage controller, though what I actually did was to pattern the changes on an existing storage controller entry in the working Vista registry. Note that an offline registry has no “Current Control Set” hive. This is actually a runtime link to ControlSet01. So, for offline editing, you edit ControlSet01.

I also made the normal registry fix for enabling AHCI on Vista. Then I unloaded the hive and copied it back to my broken Vista. I also added the actual driver to system32\drivers, of course. In my case the driver is called iastor.sys, from Intel’s floppy disk.

Vista boots

The result was amazing. I restarted the PC with the new motherboard, and instead of a blue screen I got:

Press CTRL+ALT+DELETE to log on

Nothing much to add now. I logged  on, installed various drivers, and everything works. I have a quad core CPU:

and an Intel RAID storage controller:

Vista itself seems fine. It is solid and significantly faster than before, as you would expect.

Thoughts on Vista Startup Repair

Despite my success, I’m not impressed with the Vista Startup Repair. First, why couldn’t Microsoft’s wizard do what I did manually? Second, why has the excellent Repair Install option disappeared from Vista? Vista’s repair and restore options seem to presume that the hardware has not changed; yet I’d have thought a replaced motherboard would be one of the more common scenarios where you would want to repair a Vista installation.

The whole business of changed hardware is something of a dark secret in Windows backup and restore. In an enterprise environment it is not so bad, because you have redundancy, and a single failed machine (server or workstation) should not be a problem. Something like Small Business Server is different, because typically this is a single, business-critical machine. If your 2-year old Small Business Server box disappears in the night, and you purchase a new box and stuff in your backup tapes, it will not necessarily be easy to restore.

Still, I must also credit Windows with considerable resilience once it can find a working storage controller driver. It pretty much sorts itself out after that.

Coming next: a clean install of 64-bit Vista. It makes sense.

PostScript:

Anyone interested in this esoteric topic is also advised to read this article on ArsTechnica and this related thread. Note the advice on removing non-present devices from device manager. There’s also this Microsoft article (non-Vista) which is a variant on the Repair Install. Let me also note the main area of uncertainty regarding repair installs: it may not be safe with regard to recovering a fully patched system. In principle you can re-apply service packs or hotfixes, but what if Windows Update thinks a hotfix has already been applied when in fact it has been undone? It’s a good question and I’m not sure at the moment what the answer is.

The Microsoft article above also makes an interesting point about OEM licenses. If you replace the motherboard with something other than the same model, it is considered a new computer and OEM licenses cannot be transferred.

Sun gets a database manager, but Oracle owns its InnoDB engine

Sun now has a database manager. It’s been a long time coming. Oracle has … Oracle, IBM has DB2, Microsoft has SQL Server; it’s been obvious for years that Sun had a gap to fill. Now Sun has MySQL.

This is interesting to me as I was a relatively early user of the product. I didn’t much like it. It was missing important features like transactions, stored procedures and triggers. I still used it though because of a few appealing characteristics:

  • It was free
  • It was very fast
  • It was lightweight
  • It was the M in LAMP

I should expand slightly on the last of these. The great thing about MySQL was that you did not need to think about installation, PHP drivers, or anything like that. It all came pretty much by default. If you decided that you could not bear MySQL’s limitations, you could use Postgres instead, but it was more effort and less quick.

The ascent of MySQL is a sort of software development parable. Like PHP, MySQL came about from one person’s desire to fix a problem. That person was Michael “Monty” Widenius. He wanted something a little better than mSQL, a popular small database engine at the time:

We once started off with the intention to use mSQL to connect to our own fast low level (ISAM) tables. However, after some testing we came to the conclusion that mSQL was not fast or flexible enough for our needs. This resulted in a new SQL interface to our database but with almost the same API interface as mSQL. This API was chosen to ease porting of third-party code.

Why did MySQL take off when there were better database engines already out there? It was partly to do with the nature of many LAMP applications in the early days. They were often not mission-critical (mine certainly were not), and they were typically weighted towards reading rather than writing data. If you are building a web site, you want pages served as quickly as possible. MySQL did that, and without consuming too many resources. Many database engines were better, but not many were faster.

MySQL today has grown up in many ways, though transactions are still an issue. To use them you need to use an alternate back-end storage engine, either InnoDB or BDB. BDB is deprecated, and InnoDB is included by default in current releases of MySQL. InnoDB is owned by Oracle, which could prove interesting given how this deal changes the dynamics of Sun’s relationship with Oracle, though both MySQL and InnoDB are open source and published under the GPL. Will Sun try to find an alternative to InnoDB?

While I agree with most commentators that this is a good move for Sun, it’s worth noting that MySQL was not originally designed to meet Enterprise needs, which is where most of the money is.

Update: as Barry Carr comments below, there is a planned replacement for InnoDB called Falcon.