Data that is in the process of being read cannot be deleted, detached, or archived. There will be locks on the data as long as the data is being read (for example, a query on the batch is being run) and therefore the action (delete, detach, or archive) will fail. As soon as the read is done (that is, the query is completed), the locks are released and the action (delete, detach, or archive) can be performed.