I've written previously about installing Microsoft SQL Server 2008 Express to support
ClearCanvas Server. Once I got it running, I moved on to the server itself. I'm making things a little hard for myself by running Vista, with IIS 7 and SQL Server 2008, instead of the example configuration of XP with IIS 6 and SQL Server 2005.
The first hurdle was getting SQL Server authentication, which is a step in the ClearCanvas Server installation program. There are a few permutations of username and database server formats that I experimented with until I got a connection to succeed. The CC installer just gave a 'pass/fail' message, but I checked in the SQL server log for a descriptive messages. My problem was that I'd been using an SQL login that I'd created, rather than the 'SA' login that the CC Server installation process had created. Note that you do have to go in and activate the SA account, it's disabled by default. The installation process does not halt if a successful connection is established, but to the wrong account. So I got pretty good at uninstalling and reinstalling, going by either the install log file or the lack of a database named 'ImageServer' in SQL Server.
Most of my other knowledge was gained by not reading the manual, and trying to install the packages myself. So the best advice I can give is, follow the instructions closely, particularly the section about SQL Server Express.
The first thing I did wrong was to have SQL Server set up to use Windows authentication only. The CC Server install guide clearly states I have to have SQL Server authentication mode enabled, whereas I, not having RTM, had the default which was to have Windows authentication mode only. This is a setup option in SQL Server but thankfully can also be changed in the SQL Server Management Studio under 'Security' in the server properties. This is something else I learned from belatedly reading the CC install manual.
Some more of learning from my mistakes. I initially tried a Username of the form 'andypc2\ahc' which is the domain-style name format (I'm running Vista, which uses Windows Server-style accounts). I created this account in SQL Server Management Console and the domain (machine name) is prefixed upon clicking 'Check Names'. Perhaps this is from the habit of using Windows domain-style logins. It caused a problem here though, for one thing the backslash was being escaped Unix-style and I was getting SQL error messages about an account 'andypc2ahc' not being found. I tried the Unix solution of 'andypc2\\ahc' but didn't hold much hope of success, and I wasn't (or was) disappointed. Finally I created an account under SQL Server with just my login 'ahc' and no machine/domain name prefix. This is what led me to believe I had an SQL connection, but in fact it was to the wrong account (not SA).
Here's what the CC Server install log file showed when I was not using the SA account:
> CREATE DATABASE [ImageServer] ON PRIMARY
> ... etc etc
> GO
Error executing commands:
CREATE DATABASE permission denied in database 'master'.
[SqlException Number 262, Class 14, State 1, Line 2]
The other sticking point (also my mistake) was the 'DB Server' field. The SQL Server Management Console refers to the server entity as 'andypc2\SQLEXPRESS' and this was ultimately worked. Entering either 'SQLEXPRESS' or '127.0.0.1\SQLEXPRESS' lead to no messages in the error log, meaning that the database was not found at all. This was because I'd failed to follow instructions and allow TCP connections to SQL Server Express...
Once I had that sorted, things were easier. I accepted the default settings for the database name ('ImageServer') and the CC Server Filesystem. This defaulted to C:\FS, and I don't like to fill up my C: drive top level with directories, but during the first install of programs I tend to accept the defaults until I understand the program. For the same reason, I accepted SQL Server installing its database files under 'C:\Program Files\Microsoft SQL Server' whereas I'd prefer these potentially very large directories to be somewhere other than my C drive and certainly not mixed in with my program files. In my next install, I'll move both these directories off to another drive and in a directory I know to contain only data.
Next, I changed the Partition AE Title to 'CCSERVER', and the port number from the default of 104 to an arbitrary port of 11100. I test and run multiple PACS servers, and I can't have them fighting over port 104 (currently I have K-PACS using that port). On this machine I'm also running the DCM4CHEE PACS server which defaults to port 11112 (the 'second-choice' PACS port after 104), so I chose something close to it. This keeps them grouped in the list of exempted ports in Windows Firewall.
Clicking 'Next' and off we go. These Microsoft installs are so complex that I just hope they work - there is no source-code hacking or library-linking here.
I did have to make one change, due to running IIS 7 (I have Vista SP1 installed). The installation stopped with the error message "Error 424 trying to create IIS virtual directory". I eventually found from
this site that I had to enable "IIS 6 Management Compatibility" under "Windows Features" in the Programs and Features control panel. This message came right at the end so I had to uninstall CC Server, enable the IIS feature, and reinstall. This process doesn't take very long.