Can you confirm your approach?
1. Alfresco 4.0d on a windows server
2. Installed Alfresco 4.2e on new server
3. You copied the alf_data from the 4.0d server to the 4.2e server
4. You pointed Alfresco 4.2e to the 4.0d database instance
If this is correct you are essentially attempting to share the database between 2 different versions of Alfresco which is not going to be a good thing.
Unless you plan to cluster the 2 servers (and upgrade the version on the windows server) you would need to create a new database for the new Alfresco 4.2e instance, copy the old alfresco database into the new one, then upgrade this instance. It sounds like the problem you are facing is Alfresco 4.0d on Windows is not trying to communicate with a 4.2e version of the database.
Regards,
Colin.