PostgreSql v8 versus v9 bytea default handling

11 02 2013

There is an annyoning thing when moving databases between PostgreSql v8 to v9, and this is the default handling of the bytea field type (the blob equivalent of pgsql).

While on v8 the default bytea encoding is ‘escape’, and on v9 it seems to be something else (‘hex’ ?) and it should be reverted to an ‘escape’ value to have your software running again. There are 2 options to do that:

– At the server level :

Great if you do not have other databases so that you won’t have to change it again. According to this post ( , the problem is fixed by adding


in postgresql.conf and issue a pg_ctl reload.

– At the database level :

In the case you do have other stuff on your v9 server… To achieve this, run the following statement against your database:

ALTER DATABASE mydb SET bytea_output = ‘escape‘.



PostgreSQL installation in a domain attached computer…

28 01 2013

When you install a PostgreSQL server v8 or 9 (maybe with older but untested) you may encouter some loosy error messages such as : « Problem running post install step…the Database Cluster Initialisation failed. »

There are a lot of articles on the web on security related problems, but nothing on this. To troubleshoot this bug – ’cause for me it’s a bug – just log out from the domain and log in with a local account… Install postgreSQL as usual and Voila ! It works like a charm.

Exchange 2007/2010 : Enable Circular Logging on a database

1 02 2012

Just after my migration (read previous post), I got an alarm telling that my server was low on space. It did not come from the replica itself, but from the database logging system. As we do backups every night, we should tell the databases to be in circular logging mode, so that you only have 50Mb logs (instead of 25Gb in my case.)

Just enter the following command in Exchange Powershell:

Set-StorageGroup -Identity « SERVER1\Second Storage Group » -CircularLoggingEnabled $true

Then restart your storage group and voila ! The 25 Gb+ of logging files are disappearing.

Exchange 2007/2010 : Migrating / Modifying multiple public folders in one line.

1 02 2012

I found something really cool with Powershell in managing the public folders, which by design just copy settings (such as replication) from parent when they are created instead of inheriting them. When you want to migrate an Exchange 2003 public folder database to an Exchange 2010, this is one of the way to achieve it (I think this is the best because everything stay online).

To do this, there’s a simple PowerShell command line :

C:\>Get-PublicFolder -recurse | Set-PublicFolder -UseDatabaseReplicationSchedule $true -Replicas « SERVER1\Public Folders (SERVER1) », »SERVER2\Public Database »

This line does the following:

1. It gets the list of public folders in a recursive way (this was impossible with Exchange 2003 without playing with CDO)

2. It gives this list to the second command (just after the |) and this command iterates on each list elements.

Once everything is finished, just wait for the next replication (I used the Database settings but you can specify whatever you want: and change in your Exchange 2007/10 the default holder for public folders.

I did not create or invent anything but I just would like to share this because I did not found it easily on the web 🙂

Web.config Transforms – the best way to manage multiple environments.

6 12 2011

I found an excellent video demonstrating the use of web.config transforms. It allows you to modify the inheritance of web.config function of the compilation configurations. It’s from far the best way to do this if you have multiples environments (local, pre-production, staging, production…).

You can watch it in action on MSDN:

SQL Server Reporting Services (SSRS): How to create style templates

21 02 2011

This is not something really difficult, but it’s really useful and hard to find. Here is a good how to (credits: Romelard Fabrice) :

It’s in french but it’s quite easy to understand.

You’ll have to go to
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\Business Intelligence Wizards\Reports\Styles\<your language>\

(folder depending on your SSRS version) and edit StyleTemplates.xml. Not very hard. Just copy the closest style you want and modify it. The XML schema is easy to understand.


How to Apply discount on the least expensive product ?

6 09 2010
Thanks to the Commerce Server Guru site, I found how to apply a discount on the least expensive product in a basket. 
It’s as easy as to change a value in a combo on the basket Pipeline… 
All is well explained here :

Some News

8 07 2010

From now, I decided to translate my blog in english, so taht it can help more people… I’ll try to post messages more often.

Migrating Microsoft Commerce Server from Standard To Entreprise

11 05 2010
Migrating Commerce Server 2007 (or 2009) from Standard Edition to enterprise is not hard that much, you only have 2 things to know :
– You must entirely remove CS 2009, and then CS 2007 standard from your Web Front. You have then to reinstall the Enterprise edition. Not complicated.
– The thing to know is here; You have to modify the profiles hashing algorithms, because these are differents between the standard and enterprise editions.
These parameters are in the Registry, in HKLM\Software\Microsoft\Commerce Server 2007\Profiles. Defaults parameters are :
  • Standard :

–  HashingAlgorithm: 00008004

– HashVerificationAlgorithmList : SHA1,MD5
  • Entreprise :
– HashingAlgorithm: 0000800c
– HashVerificationAlgorithmList : SHA256,MD5
If you forget to change these values, users won’t be longer able to log in, and new created ones will have a different encryption, therefore rebuilding your database will be very difficult…

WPF… pretty good !

27 11 2009

Les applications WPF (framework apparu avec Vista) ne sont pas très courantes. C’est plutot dommage, car les capacités de ca framework sont assez impressionnantes… Voyez par vous même:

WPF Applications are not very popular… Wich is a crime, because this is a very impressive framework. See yourself:

– WPF interface + Touch input

– WPF App for Facebook: