| According to the user guide, under 15.2.2.1. Rules/limitations for using stored procedures: "For Sybase or MS SQL server the following rules apply: The procedure must return a result set. Note that since these servers can return multiple result sets and update counts, Hibernate will iterate the results and take the first result that is a result set as its return value. Everything else will be discarded." The expected behavior is that the second ResultSet should be discarded and StoredProcedureQuery.hasMoreResults() should return false. If you are not seeing the expected behavior using 5.0.9, then please create a pull request with a unit test that reproduces your issue. An example of a unit test that uses a SQL Server stored procedure is org.hibernate.test.sql.hand.custom.sqlserver.SQLServerCustomSQLTest. [1] https://docs.jboss.org/hibernate/orm/5.0/userGuide/en-US/html_single/#sp_query |