Replicating from SQL Server 2005 to SQL Server 2008

Oopps! Upgrade your browser pretty please. Oopps! Upgrade your browser pretty please.

I ran into a problem today, while setting up SQL Server replication in a multi SQL Server version environment for one of our customers.

For some reason I could not, via Management Studio, set this up. The Publisher and distributor ran on the same server, wich was a SQL Server 2005 Standard edition. And the Subscriber (push subscription) was SQL Server 2008 Enterprise edition. SSMS just gave me an error saying that replicating to that server version was not supported. That is clearly false.  I traced what was going on on the subscriber when I was getting the error and found that  it ran the following: select serverproperty(n’engineedition’) This code returns 2 for standard edition and 3 for Enterprise. I seems there is a bug in SSMS 2005 that causes this. Eventually I solved it by adding the subscriber using sp_addsubscriber.