We are facing few problem with running a stored procedure through our java program in production. Same code works fine in all other environments (devl). even in production it works well except when there is lots of activity (Like some jobs trying to update database) going on in the database.
Exception we get is Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid column name:<column name>
The same procedures run within no time from Sql server console (not sure what our DBA is using).
Do you think of any reasons for invalid coulmn name exception for slow running queries?
Are you passing any parameters to the stored procedure? I have seen this happen when passing dynamically generated sql to a MS SQl server where the statement has an unmatched quote, or extra comma. The DBA should be able to profile the query to record what is actually being called.
Joined: Mar 29, 2006
Yes, there are parameters passed to this procedure. we also have this unmatched colon issue. But the error for that scenario is "Incorrect syntax". We have three production servers and this invalid column exception is happening only in one server. The classpath for All these server is same and also codebase. hence I don't see why this is happening on only one server.