The cursor that is named in this DECLARE statement has also been named in a DECLARE statement that was executed earlier. Possibly the same DECLARE is being executed in a loop, or possibly the program meant to execute a FREE statement for this cursor but did not. Review the program logic to ensure that it executes only a single DECLARE for each cursor (except after freeing one).