The query that I used for many years suddenly began to throw a strange error. When I made a cosmetic change to the request (1 + x instead of x + 1), the error no longer occurs. The saved process of which he complains no longer exists on the server!
I am very curious if anyone has any ideas on what the problem is and why this βchangeβ corrects this?
Request before:
UPDATE SOME_DB..JOB_QUEUE SET ERROR_COUNT = ERROR_COUNT + 1, JOB_START_TIME = '{1}' WHERE JOB_ID = {0}
Request after:
UPDATE SOME_DB..JOB_QUEUE SET ERROR_COUNT = 1 + ERROR_COUNT, JOB_START_TIME = '{1}' WHERE JOB_ID = {0}
The error it throws is:
Sybase.Data.AseClient.AseException: Procedure sp_net_dblatency expects parameter @heartbeat, which was not supplied.
I was wondering if anyone has any ideas what is going on here?
Edit This is where proc is stored.
create procedure sp_net_dblatency @heartbeat datetime as update DATABASE_1234..LATENCY set START_UTC_TIME=@heartbeat, END_UTC_TIME=getutcdate() where DATABASE_NAME=db_name() if (@@ROWCOUNT = 0) insert DATABASE_1234..LATENCY (DATABASE_NAME, START_UTC_TIME, END_UTC_TIME) values (db_name(), @heartbeat, getutcdate())
sql stored-procedures sybase sybase-ase
anthonybell
source share