# Disaster Recovery

Data Stream as a stand alone product is not disaster tolerant but works in conjunction with industry leading products to form a disaster recovery process.

{% hint style="success" %}
Disasters are never a planned event but planning for one is critical to minimizing impact.&#x20;
{% endhint %}

## Microsoft SQL Agent

Data Stream recommends the use of [Ola Hallengren Scripts](https://ola.hallengren.com/).

{% hint style="warning" %}
Don't forget to set a backup schedule for each Microsft SQL Agent Job. \[[Reference](https://docs.microsoft.com/en-us/sql/ssms/agent/schedule-a-job?view=sql-server-2017)]
{% endhint %}

### Ola Hallengren Scripts

Download the scripts [here](https://ola.hallengren.com/scripts/MaintenanceSolution.sql).

<div align="left"><img src="/files/-LTdBESBUYugG6dkW14M" alt="Once you have successfully executed the Ola Hallengren Scripts, the Microsoft SQL server agent should contain the following jobs."></div>

## Load Balancing Fail-over

### Manual Fail-over

When the mirrored database is synchronized, the database owner or system administrator can initiate manual fail-over to the secondary server.

```sql
USE master;
GO

ALTER DATABASE [DataStream] SET PARTNER FAILOVER;
```

{% hint style="warning" %}
Validation of mirroring status is critical to a successful fail-over. \[[Reference](/support/disaster-recovery/load-balancing.md#validation)]
{% endhint %}

### Automatic Fail-over

Automatic fail-over occurs when the fast startup is disabled and computer is properly shutdown.

{% hint style="danger" %}
Automatic fail-over will not occur in a loss of power disaster.
{% endhint %}

#### Disabling Fast Startup

<div align="left"><img src="/files/-LThfA7TpEgvn-dFMemX" alt=""></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.getdatastream.com/support/disaster-recovery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
