Error 861

Severity

16

Message text

Command Failed: Cannot bind object '%ld',  dbid '%d' to cache because you have an open cursor on the target object.   Retry the command after closing the cursor.

Explanation

You can use the stored procedure sp_bindcache to bind a database, table, index, or text or image object to a named data cache. If there is an open cursor on the target object, the cursor structures have an open descriptor for the object and there may be cache information stored there. Error 861 occurs when you use sp_bindcache or the configuration file to change object binding and Adaptive Server finds that the object has been opened by a cursor.

Action

Close the cursor and try the command again:

  1. Get information about cursors you have open:

    1> sp_cursorinfo null
    2> go
    
  2. If the output from step 1 shows an open cursor for the object you are trying to bind, close the cursor:

    1> close <cursor_name>
    2> go
    
  3. If the output from step 1 did not show an open cursor for the object you are trying to bind, this probably means someone else opened it. Use sp_lock to determine who has locks on the object. If you can determine who has the open cursor, ask them to close it.

  4. If you cannot determine who has the open cursor on the object you are trying to bind, shut down and restart Adaptive Server or wait and try again later.

  5. Try your command again.

Versions in which this error is raised

All versions