But it works on my PC!

The random thoughts of Richard Fennell on technology and software development

Microsoft SQL 2005 starts then stops with 3414 error

I recently had one of our Windows 2003 server lose it's disk mirrors and locked up. When it was restarted it has two (virtually idenitical) drives C: and E:. It booted off the primary mirror disk (C:) and all seemed OK except SQL.

I also tried booting off the secondary mirror (E:) but this would not boot (this drive it turns out had some bad blocks).

So I went back to the primary disk. The actual problems was SQL server started but then stopped after a few seconds, the Windows error log showed the unhelpful 3414 error. I google for this, but all that was mentioned was issues with DTC, but this did not relavent as we not use distributed transactions. There was nothing else on the web of note.

I had a look at the MSQL.1\logs directory and this showed problems loading the various databases. So it seems when the disk de-mirrored it was writing SQL transaction logs, and they ended up corrupted. So in my case a generic 3414 error in the error log meant corrupt transactions that could not be rolled forward or back.

More in hope than expectations I tried copying the SQL datafiles and logs back from the faulty secondary drive (E:) and tried to restart SQL and this worked - SQL started without a problem! I was lucky the bad blocks were not near the SQL files. This saved me from having to rebuild the server and restore backups, espcially as some the the DBs were SharePoint, and a SharePoint SQL restore is rarely fun!

When installing Cassini why do I always forget this?

If installing the Cassini Personal Server on a PC you will often get the "Cassini managed web server failed to start listening to port 80. Possible conflict with another web server on the same port." error.

You of course think this is a firewall, other web server or anti virus port blocker problems

IT IS NOT!

Ok it might be those problems as well but usually it is that you need to run

gacutil /i c:\cassini\cassini.dll

or just drag a copy of the cassini.dll into the GAC (C:\Windows\Assembly)

Shame the installer does not do this.

Moving Community Server

Today I moved this blog server from an old server to our nice shinny new ones. This meant splitting it so the DB to the dedicated SQL server and the front end to the new web server box. This cause a few problems.

The actual move was fine, just back and restore the DB and copy over the ASP.NET web contents. I then edited the web.config to point at the new server and had some problems, some expect some not.

  • First I altered the CustomErrors block to report full errors
  • In the SiteSqlServer setting I alter the server name to point to point at the new server, until this was done I got not unsurprisingly a server not found error.
  • Once the server was right I got a MyDomain\MyServerName$ could not connect, so I created this user giving the rights listed in the database readme file could in the scripts sub directory.
  • However this did not work, I then got a CS generated form titled Critical Error: Data Store Unavailable, that told me to edit the entries I had just edited!

After much digging about I found the answer in the CS forums, you have to also give the user the ASPNET_* rights for the CommunityServer database.

Hope this saves someone some time.