How do you debug a stored procedure in a Microsoft SQL Server that's been called from a seperate java program?
I have a java program which at one point submits a query to my SQL server that triggers a stored procedure. I would like to debug this procedure when it’s called by the java program so that I can
- Check that different combinations of parameters it receives are what I expect
- Check the procedure behaves exactly as I would expect with a given set of parameters
I know I can debug the procedure on its own, via SQL Server Manager, but this wouldn’t let me debug it running in tandem with the java program.
Is there a way to be able to debug this SQL procedure at runtime with my java program?
2 Solutions collect form web for “How do you debug a stored procedure in a Microsoft SQL Server that's been called from a seperate java program?”
I would run SQL Server Profiler and and run your Java program. SQL Server profiler will let you see the stored procedure that will run with the params that were passed in.
There is a debugger that is available for SQL server. See https://technet.microsoft.com/en-us/library/Cc646008(v=SQL.105).aspx