Skip to main content
Virtual mode has explicit recovery paths for common failure scenarios. SQLBuild blocks cleanly rather than leaving ambiguous state, and error messages point to the specific recovery action needed.

State corruption

State corruption is detected by schema validation during state migrate. If the current state schema is invalid, SQLBuild refuses to back it up (to avoid persisting a broken snapshot) and directs you to reset.

Warehouse drift

Lock conflicts

Only clear locks when you are certain the holding operation is no longer running.

Interrupted operations

There is no automatic resume command for interrupted operations. SQLBuild records the failure in state_operations and state_operation_events, preserves VDE refs and checkpoints, and leaves recovery to the operator. To inspect a failed operation:

Mode guards

SQLBuild blocks operations that don’t apply to the current mode:

Detached VDE guards

After sqb state detach, the VDE is marked detached and blocked from further virtual operations: The project can continue in standard mode or re-adopt to return to virtual mode.

Adopt guards

Detach guards

General recovery strategy

  1. Diagnose with sqb reconcile or by querying state tables directly
  2. Repair views with sqb reconcile repair-view for missing/broken logical views
  3. Rebuild with sqb build --select <model> for missing physical versions
  4. Roll back with sqb rollback to restore a prior finalized state
  5. Reset state with sqb state reset --auto-approve as a last resort (drops all virtual state)
When in doubt, sqb reconcile is the starting point. It reports what’s wrong without changing anything.