Friday, March 30, 2007

Memory Managment in SQL Server

For quite a while, we have had a problem with our main instance of SQL server not using all the memory available to it on the server. We have finally found out what the problem was thanks to this article -

The scenario is we have a clustered instance of SQL, that can run on one of 3 identically spec'd server running Windows2003 Enterprise, SQL 2000 Enterprise and with 16gig of ram.

The sqlsvr process had only been running at about 3gig of memory, and was causing us some performance issues on busy days. We had found some articles about changing boot.ini that told windows to use the extra memory, but it didn't seam to help. Here are the steps:

  1. Open up boot.ini (its normally hidden but lives in the root of c:\)
  2. At the end of the line for the OS you boot to, add /3GB /PAE. This basicly tells Windows 2003 that it and SQL server have access to more than 4gig of Ram, and they can use it
  3. Next you have to set the 'awe enable' option of SQL server to 1. This enables the API in SQL server and give it access to the extra memory
  4. Open up SQL query analyser, and type:
    sp_configure 'awe enabled', 1
    Reconfigure with overide
  5. When you have done this, restart the server. When you bring it back up, SQL server should have access to all the memory available in the system. You can now tell SQL server how much memory to use in the servers properties, but you now have to specify a a specific amount and not a range.
Also something else I found while doing this, the port that a clustered instance of SQL runs on is 1267, the port it runs on when not clustered is 1433.

Wednesday, March 21, 2007

Exchange and Patches equals much confusion

We had installed some patches last month on our Exchange 2003 server that had some undesired effects, and also mislead me when trying to fix another problem.

The issue with the patches was all to do with shared mailbox access. We have a number of sales teams that all share one email account. The idea being that if a couple of members are on holiday on a call etc, then rest of the team can still pick up the emails.

The new patches (i'm not sure exactly witch one) tightened up some of the security settings, and meant that any users who used the shared mailbox and did not have there own individual mail account were unable to send mail. They kept getting errors like 'Resource not found', and 'You don't have permission to send on behalf of this user'

The way round it was to create mailbox's for these people, but hide them in the global address list so they see no difference. Looks like Microsoft implemented this to crack down on people using Exchange without a valid CAL.(note to self, setup a mirror of all our system in order to test all patches!!)

At the same time this happened, we also started to get errors from a couple of our users when sending email out using SMTP in an application we wrote. There didn't seam to be any pattern as to what was happening as some people saw no problems. The error was:
'550 5.7.1 Cannot Relay for

After much head scratching I finally realized that we had moved a couple of our terminal servers to our new subnet, and a quick check in Exchange system manager revealed that those subnets indeed weren't allowed to relay through the mail server. How easily we think something is a bigger problem than it actually is!

On another note I have had a play around with Flickr, the photo sharing site. I have to say i'm very impressed with what it can do. You can check out my one and only photo (so far) here The most impressive aspect of it is the Geotagging, that lets you give a co-ordinate to where the pics were taken, then view them in Google earth or other mapping systems.

All I need now is a digital camera with a GPS device and i'm set!

Sunday, March 18, 2007

Adding Column headers to Reporting Services Matrix

Found out a very useful tip (thanks to Bob at Microsoft - that allows you to add a heading to a column in a SQL reporting services Matrix.

You simply need to add a new column group to the top of your Matrix, and set its expression to be something like 'DummyExpression', and make sure you omit the normal leading '=', like below:

Now, you can move the group to be the top one in the properties of the Matrix, and type in the text box what ever header you need.

Simple but effective, I didn't even realise you could put dummy data into an expression, I thought the IDE would kick it back

On an entirely different note, I was very excited(being the big geek I am) to discover today that Buffy the Vampire slayer season 8 is coming back in comic book form, and is written by no less than Joss Whedon himself!
Check it out at Dark Horse comics here
I cant wait till my next visit to the comic shop!

Listening to: Saves the Day, Stay what you are.

Tuesday, March 13, 2007

Code Project and VMware

Just a quick post to let you all know I have uploaded my first ever article to the code project website! You can find it at

There must be loads of people using that site, i've had over 60 views of it so far and its only been up there half an hour or so.

Been playing about with VMWare virtual server. I think we are going to move away from clustering technology's and start using this instead. The only problem I can see so far is you need quite a lot of disk space on the server to run all the virtual machines, but that is offset by its advantages.

You can get some software for it that will allow you to move the server from one physical device to another, with users on the server and they wont notice anything. Now thats the future!

Also looking more into sharepoint, I think i'm going to try and add the reports services modules into it and create a portal using it for our sales people to use. When I get it setup ill post my findings on here.

Tuesday, March 06, 2007

Invalid Charater Error in Web.config file

Had a bit of a problem that was quite easily solved today. I was trying to substitute a curency pound symbol for a euro symbol in a web application, so I decided to make it configurable in the web.config file.
When I added it in however, I kept getting an error saying:

There is an invalid character in the given encoding

If I took out the line, or replaced it with another string, it worked fine. Turned out it was the encoding set in the top of the web config file. I changed to to read:

xml version ="1.0" encoding="windows-1252"

And it started to work fine. Not sure what that encoding refers to, but ill find out. I know I should really get the currency symbol from the local of the machine, but I don't know how!

Monday, March 05, 2007

Windows Fax Server 32079 error

I've been setting up a Windows 2003 fax server client over the weekend, and kept getting a very strange error reported when I sent a fax using an application I had written.

If a sent a fax using the Windows fax console it would go through fine, but whenever I used my application the job would drop into the outbox, but straight away got deleted. I got an error 32079 in the Application log of the server, that told me

An error occurred while preparing to send the fax. The service will not attempt to resend the fax. Please close other applications before resending.

I hunted the net and couldn't find anything useful on this error, apart from make sure you have setup your dialing rules (witch I had). I then noticed that the jobs I had submitted had there phone number in a different format than the ones sent via the Fax Console.

It turned out that it was because I was appending the country code to the start of the job, that is why it was kicking it out. As soon as I removed this from the config file and it no longer started the fax number with the country code, it worked fine.

I am very confused by this, as the last one I setup seamed to need the country code (+44 for England) otherwise it refused to work. So, i'm still not to sure what the problem actually is but at least its working. The only difference between the servers is one's in England, and the new one is in the Republic of Ireland. Not sure what difference that would make.