Dailycode.info

Short solution for short problems

Installing WSS 3.0

Today I started with the installation of WSS 3.0 on a windows 2003 server using MS SQL 2000. Normally this proces takes up a few hours max.

The only difference is that this time I'm installing it in a company that has very strict regulations. It is not possible to reboot a server without permission, etc. I started with lots of courage because I never had big problems in the past. The only problem I ever had with installing WSS would come to haunt me again!

First I had to install IIS, framework 2.0 and 3.0. Still no problem here. I dindn't had to reboot the server! Then I started the installation of WSS.

GRRRaaaghhh, there it was. The collission of the database was not correct! So I created a database, with the correct collision (Latin1_General_CI_AS_KS_WS). But still it will not install. The default collission of the server needs to be changed because the install proces wants to create a database and therefore it needs the default collission. The last time a had this problemn, I could reinstall the server with the correct collission and all problems were solved. But in this case it is not an option.

So I started looking for other options. There is a tool called rebuildm.exe that rebuilds the master database to the new collision, resetting the default collission of the server. But this tool wasn't present. Because in the installation of the server, this tool was not included. Now I have to wait for the administrator to approve the change, which I'm guessing he won't allow. I'll have to prove that rebuilding the master DB does not affect the collission and data of the user databases. This is the challenge I'm up to now. I will write the solution in this post later.

If people have a better solution then rebuilding the master DB or reinstalling the SQL server, please inform us! 

 


MOSS 2007 list performance drop

Observation : MOSS 2007 list performance drop

Recently, we discovered that the performance of the MOSS 2007 implemenation of our client dropped significantly for a specific list. The list contains some 1200 records. Most of them contain attachments. The loadtime for the default view would extend to over 20 seconds. Switching views made things even worse!

Analysis

First, the server performance was consulted while loading the list. No special or irregular behaviour of the processor or memory. Services were checked to find out if a service like for example the search was performing a heavy index. No special observations. Then we placed indexes on the key columns. This made no visible difference in performance.

How is it possible that only that list is slow in loading, while other list and doclibs in that same site have a normal loadtime? It had to be something list-specific. And what is specific to a list?  It's views...

Interpretation : Optimizing the GROUP BY

After scrutinizing the views of that list, we discovered that the there were massive groups in certain views. The "group by" statement resulted in records being categorized in over 100 groups. Setting a limit to the number of groups improved performance drastically!
When showing 100 groups on a page, the loadtime took 15-20 or even more seconds. When tuning down the number of groups to 50, the page loaded under 10 seconds.

We tested further and discovered that the number of items under a group hardly alter the page loading time when the groups are collapsed on start. A page with 1 group and 500 items under it will load many times faster than a page with 500 groups and just 1 item under each of those groups.
The key is be wise with GROUP BY statements.

Conclusion : Relation between GROUP BY statement and load time

  1. Group your items in less then 50 categories for optimal performance
  2. Show as few groups as possible on a page (max 50 groups/page)
  3. Place column indexes on the columns you group by 

Applying these principles solved our issue on the spot...

We hope this information will help you further optimizing your WSS/MOSS 2007 environment.


BartPE

In my company, when a computer crashes and need to be restored from a backup, BartPE is the number 1 tool to do it. You can create a bootable CD or even a USB stick that can be used to boot. With PEBuilder you can easely create these bootable items. You will need your windows CD because it creates a window runtime environment.

In my case I created a bootable USB stick because all PC's here have the possibility to boot from USB. BartPE is loaded and I can use the programs and command promt. By default there is a plugin for drivesnapshot, a backup tool that enables you to restore a snapshot of a drive. This is also the backup tool we use here, so very easy. You can restore missing files or the complete harddrive. Because you're not working on the drive, you can format the drive and copy the old files to the drive without using the dos prompt. BartPE also supports networking, so you can get the files via the network from the backup server.

Interested, read more and download it here: http://www.nu2.nu/pebuilder/


Get assembly info

I wanted to show the assembly version number in the title of the screen, this is the best solution I found to do it:

Add the System.Reflection namespace to your using section like this:

using System.Reflection;
 

And put this code in the page_load

Assembly asm = Assembly.GetExecutingAssembly();
this.Text = this.Text + asm.GetName().Version;