Я пытаюсь вызвать процедуру удаленного хранилища, используя Hibernate.Удаленный sql-сервер - MS SQL Server 2000, а исходный сервер, с которого я вызываю процедуру, - MS SQL Server 2008. При попытке вызвать хранимую процедуру я получаю следующее сообщение об ошибке:
[2/29/12 16:44:57:971 MST] 00000016 SystemOut O 2012-02-29 16:44:57,971 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 7213, SQLState: S0001
[2/29/12 16:44:57:971 MST] 00000016 SystemOut O 2012-02-29 16:44:57,971 ERROR [org.hibernate.util.JDBCExceptionReporter] - The attempt by the provider to pass remote stored procedure parameters to remote server 'EDM-SNEC-DBA3' failed. Verify that the number of parameters, the order, and the values passed are correct.
[2/29/12 16:44:57:971 MST] 00000016 SystemOut O 2012-02-29 16:44:57,971 INFO [ca.ab.gov.acys.c3p.publicweb.controller.ChildParticipationEdit] - Caught exception while executing
SQLQuery: org.hibernate.exception.SQLGrammarException: could not execute query
SQLQuery sqlQuery = this.hibernateSession.createSQLQuery(" { call [dbo].[dc_C3P_get_child_id] " + "(:surname, :firstname, :birth_dt, :facility_id, :effective_dt, :child_id) }");`
Я передаю все необходимые параметры хранимой процедуре, которая выглядит следующим образом:
CREATE PROCEDURE dbo.dc_C3P_get_child_id
(
@surname char(25),
@firstname char(20),
@birth_dt datetime,
@facility_id numeric(8),
@effective_dt datetime,
@child_id numeric(8) OUTPUT
)
Любая помощь будет высоко оценена.
Заранее спасибо.