Dear collegues,
I recently was assigned the task to solve a bug. When I tried to reproduce the bug on my local development environment, I couldn't (10 records were returned, as expected). When I asked the customer to send the database backup, I still couldn't reproduce the bug (10 records were returned). When I took over their system, I could reproduce the bug on their system (11 records were returned). I loaded the production environment on their system in their test environment. The bug was reproducable (11 records were returned). To make sure, I loaded the same backup on my system. The bug was not reproducable (10 records were returned). With SQL Profiler I tried to catch the call to the database. Regardless of which server or which client I used, the call was
EXEC IP_sel_EngBOMStructureRS @EngItemRevId = 68 , @ProdHeaderDossierCode = 'PD-00-3360'; GOWhen I executed this code in Management Studio on either the server of the customer or on my server, the bug was not reproducable (10 records were returned). When I used the client on the customer's system and connected to my system, the bug was not reproducable (10 records were returned). This means that the problem has something to do with the server. Since there is a difference in behaviour between Management Studio and connecting with the client application, my guess is that it has something to do with connection settings (ANSI_NULLS ON vs. ANSI_NULLS_OFF might cause the difference in behaviour, for instance). As far as I can see, there is no difference between the connection settings, but maybe I am looking in the wrong place. Anybody any idea?