Job is failing with the error: "Could not complete cursor operation because the table schema changed after the cursor was declared"

  •  Hi All,

    I have a job which is failing sometimes 🙁 with the error "Could not complete cursor operation because the table schema changed after the cursor was declared"

    The stored procedure has two cursors declared and each one query one table each.

    The application uses an account which does not have privileges to modify the tables.

    I need help in finding the root cause of the issue.

    If some one modifying the tables/procedure then.. where do I look at to confirm the same.. i.e. how do I find the last modification time & user for an object?

    If there can be another reason for the above error, under what reasons we can get the above error?

    Thanks in advance.

    Sony

  • You can get this error if a maintenance plan containing a re-index, or an auto-shrink

    starts running concurrently with your stored proc.

    You can eliminate this error by not using cursors.

  • If the previous does not solve the issue try setting up profiler to watch the activity while you reproduce the issue and review what is happening.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply