> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/database-devops/3.0/use-db-devops/deployment-pipeline-configuration/rollback-and-failure-strategies/failure-strategies.md).

# Failure Strategies in Database DevOps

In Database DevOps pipelines, failures may occur during execution due to invalid changes, dependency conflicts, or runtime issues. Harness provides rollback-focused failure strategies to help you manage such cases.

{% hint style="info" %}
This document focuses on failure strategies specific to Database DevOps steps. Go to [Failure Strategies](/harness-ai/use-harness-platform/pipelines/failure-handling/define-a-failure-strategy-on-stages-and-steps.md) to understand general failure handling in Harness pipelines.
{% endhint %}

### Supported failure strategies <a href="#supported-failure-strategies" id="supported-failure-strategies"></a>

#### Mark Failed Changeset Ran <a href="#mark-failed-changeset-ran" id="mark-failed-changeset-ran"></a>

The **Mark Failed Changeset Ran** option is available in the **Apply Schema** step under Harness Database DevOps.

When enabled, it ensures that failed changesets are marked as **ran** in the database changelog table, even if they don’t execute successfully.

* **When to use:**\
  Use this option when you want rollback steps to include failed changesets, so that rollback scripts can attempt to clean up any partial changes. This is particularly useful for databases that implicitly commit DML statements (such as Oracle), where rollback logic must handle partial failures.
* **Outcome:**
  * The failed changeset is flagged as **ran**, so it won’t be retried in future runs.
  * If a rollback step exists (and rollback scripts are defined), it will execute rollback logic for the failed changeset.

![Apply Schema with Mark Failed Changeset Ran enabled](/files/BujG7y4fIJdcRG6M9zxS)

{% hint style="info" %}
Go to [Mark Failed Changeset Ran](https://github.com/iKettles/harness-gitbook/tree/main/3k-database-devops/use-db-devops/deployment-pipeline-configuration/features/mark-failed-changeset-ran.md) to review the feature details.
{% endhint %}

#### Ignore <a href="#ignore" id="ignore"></a>

Skips the rollback attempt for the failed changeset.

* **When to use:**\
  If the rollback expression may not be valid due to an earlier failure (for example, if a tag before the update did not execute successfully).
* **Outcome:**\
  The failed changeset remains as-is, and the pipeline continues execution without reverting it.

![Ignore Failure Step](/files/UwlcTdfOqy9ujCSqp7w5)

{% hint style="warning" %}
Use this strategy carefully. Ignoring a failed rollback can leave your database in a partially applied state.
{% endhint %}

### Unsupported failure strategies <a href="#unsupported-failure-strategies" id="unsupported-failure-strategies"></a>

The following strategies are **not supported** in Database DevOps steps:

* Retry
* Mark as Success
* Stage-level failure handling

If these are configured at higher levels, Harness ignores them during Database DevOps step execution.

### Best practices <a href="#best-practices" id="best-practices"></a>

Follow these guidelines when configuring failure strategies in Database DevOps pipelines:

* Always test rollback scripts alongside forward changes to ensure safe recovery paths.
* Use `Ignore` only when rollback logic is invalid or unnecessary.
* Prefer `Mark Failed Changeset Ran` when you want to unblock pipeline execution but avoid reapplying the same changeset.

### Next steps <a href="#next-steps" id="next-steps"></a>

* Go to [Mark Failed Changeset Ran](https://github.com/iKettles/harness-gitbook/tree/main/docs/database-devops/features/mark-failed-changeset-ran/README.md) to configure changeset failure handling.
* Go to [Rollback for database schemas](/database-devops/use-db-devops/deployment-pipeline-configuration/rollback-and-failure-strategies/rollback-for-database-schemas.md) to set up rollback strategies.
