Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a really weird issue here. I have two server setups, one here and one at a customer. The two setups are pretty alike - same OS/SQL server version etc. On our end everything is working fine, but on the customer end they were getting really weird issues. After setting up a trace and looking through it I noticed that there was a stored procedure that wasn't getting called with all the parameters it needs, where on our end all parameters where there, except one of them was an empty string ('').

So my question is - is there a configuration setting in SQL server that has to do with how stored procedures handle empty/blank parameter values? It seems the parameter is dropped completely on the customer's server.

I know about setting default values on parameters, but since I'm passing in an empty string, I would expect this to work.

share|improve this question

closed as off topic by gbn, Ward, voretaq7 Dec 15 '12 at 5:14

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Is the SP definition identical on both servers? – Massimo Jul 20 '11 at 7:51
Completely identical. I even tried re-running the setup scripts on the customer server to be sure. – Graffen Jul 20 '11 at 7:54

There is no setting that affects this. There never has been.

The code (c#, other SQL, Excel, whatever) that calls the stored procedure is different between the 2 systems, even if the the actual stored procedure is identical.

share|improve this answer
The system is deployed on our end and theirs using the same installer so I find it difficult to see how the code should differ? – Graffen Jul 20 '11 at 7:56
@Graffen: the code is different. There is no setting. Go and check: don't assume. – gbn Jul 20 '11 at 8:04
Fine, there is no setting. But the code is completely identical. That was naturally the first thing I checked yesterday when I started looking into this. Sorry for wasting your time. – Graffen Jul 20 '11 at 8:29
The calling code too? Or just the stored procedure? – gbn Jul 20 '11 at 8:30
The calling code and the stored procedures are identical. I windiff'd the files yesterday to be sure. – Graffen Jul 20 '11 at 8:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.