Friday, August 14, 2009

SQL says it doesn't like to be 'Squeezed'.

I just had my first experience installing SQL Server 2005 yesterday at my current "volunteer" job, and again at home. I had initially thought that after first installing Visual Studio 2008, that it would have already been fully installed along with it, but apparently VS 2008 can't see it's own locally run SQL Server, when I tried adding a database connection within the Server Explorer side tab.

After researching several help files and Microsoft MSDN pages, they all said I should download and install SQL Server 2005 (Express edition being the smallest and easiest). So I went and downloaded the "SQL Server 2005 Express Edition SP3" (the newest '05 express version I could find), and ran the easy to follow wizard.

However, on my home PC (both work and Home are XP 32-bit machines, just the work one is an old P4 w/ HT, and barely 512MB ram and 20GB HD. Home one is an Intel Quad-core Q6600, 4GB ram, over 1TB HD, with both XP pro 32 and 64-bit. ), I got an error when trying the installation wizard tried starting up the SQL Server service. The error message said check the Event Viewer's System log for details, but that was just a copy of the same message. Thankfully, the Application Error log gave me an answer saying that:
"The SQL Server service failed to start because the file: [~long SQL file name and address~] is compressed even though it is listed as uncompressed. This file must be deccompressed."
I compress my files often at home, so I guess the SQL files got flagged for compression by some errouneous scan in my daily disk cleanup, and squeezed down when they weren't supposed to be. It was easy to fix this, by just copy pasting the folder address (without the filename), highlight all the compressed files in the folder (in case they all needed to be decompressed), goto properties, click the "Advanced" button beside the "read-only" and "hidden" check boxes, and uncheck the "Compress files to save disk space" checkbox, and you're done.

To be thorough and safe, I also decompressed all the other files in the nearby SQL folders since there were only a handful of them, and the folders were flagged as un-compressed even though the files in them weren't, just as the error message had warned me they'd be.

After that, the SQL service was successfully started and the installation completed. I also didn't have to exit the install wizard while doing this either. There is a "re-run" button on the wizard page where I got stuck, so I wasn't required to start the installaion all over again.
Now going back into Visual Studio 2008, when clicking on the Server name tab while trying to add a database connection, my SQL Express server was finally listed (as "[computername]\[servername]"), and I was able to add the Server to my database connection list, even though I have yet to actually create any database files, diagrams, schemas, tables and whatever in the new database.

With that done now, I'll be off to design and create a database or two for this application that I'm working on, which I'll describe later. (A new project just for work, and the continuation of an old one at home.) Although now I'll probably have an awkward fear of compressing files on my PCs for quite some time....blahg... it's the birth of a new PC superstition. >_<

No comments: