I am more than a little confused with an issue I have encountered 3 times in the past 2-3 months. The title of this question outlines the issue, but for more detail:
I have an SP which always returns results without issue when executed through SQL Server Mgmt. Studio, however very rarely (but enough to cause major headaches)- it will simply NOT return anything when it is called through a .NET console app.
I've checked the SQL Server and Windows Server error/application logs that I know of (SQL Server Logs and everything in Event Viewer on the Windows Server in which the SQL Server resides) and nothing appears amiss...
What in the heck could be the cause of this? The app, SP, and everything work just fine. It's just that when called from the .NET app, this SP fails to return data. I know the obvious solution would be to debug from VS and see the details of the connection (I also get no Exception when this happens) in the debugger from beginning to end of the SP execution, but this is not possible as the issue occurs out of the blue and is not reproducible. I want to prevent it from happening again.
Is this a possible spontaneously dropped SQL connection or what? Any thoughts, comments, and suggestions are greatly appreciated.