The JDBC Sampler can only carry out stmt.executeQuery() on the query defined in the configuration. If this is run against MS SQL Server (and possibly other RDBMSs), it will cause the server have to parse the incoming stored procedure call each time and prohibit it from caching the compiled stored procedure. This is bad for performance and can give falsely low readings. JDBCSampler.java should be adjusted to use conn.prepareCall(...) instead, which correctly invokes stored procedures through an RPC call to the database server. This will require some changes to the GUI however.
Created attachment 17982 [details] JDBCSampler Patch for handling Calling Procedures
Created attachment 17983 [details] JDBCSamplerBeanInfo Patch for Calling Procedures
Thanks, I'm taking a look
Duh! I was confusing prepareCall() with prepareStatement(). I've checked the code into the 2.1 branch, and it is in the nightly build: 2-1.20060326 Please advise if it is working OK
Works ok. But not all JDBC drivers will invoke an RCP call to the server if the CallableStatement has no real parameters. Those are not currently supported see Bug 40825 (http://issues.apache.org/bugzilla/show_bug.cgi?id=40825) for more details.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1683