# Restore Server

If you remove a server mistakenly, you can still revert changes back from VirtualMetric Database. First you should connect to your current Microsoft SQL Server instance via [SQL Server Management Studio.](https://en.wikipedia.org/wiki/SQL_Server_Management_Studio)

## SQL Management

1. Open SQL Server Management Studio.
2. In the left menu, under **VIRTUALMETRICDB**, select Tables.

   <div align="left"><figure><img src="/files/lYDZf3Hokkpg34igfYVA" alt="" width="356"><figcaption></figcaption></figure></div>
3. Locate **dbo.Host** and right-click on it, then choose "**Edit Top 200 Rows**" from the menu.

   <div align="left"><figure><img src="/files/rBc0Rftoeu58KeDdBTUf" alt="" width="375"><figcaption></figcaption></figure></div>
4. Find the RecordStatus column; it will display a value of **4**.

   <div align="left"><figure><img src="/files/sVc3EQeL92NxcROWGYKP" alt=""><figcaption></figcaption></figure></div>
5. Change the RecordStatus value to **1** to set the server status as **Active**.

## IIS Manager

You must restart application pool of **VirtualMetric API** via **IIS Manager** to apply server restore.

1. Open IIS Manager on the VirtualMetric Standalone Server.

   <div align="left"><figure><img src="/files/1xGgjTKvK6xgAUB9Ncae" alt="" width="306"><figcaption></figcaption></figure></div>
2. In the left menu, click on "**Application Pools.**"

   <div align="left"><figure><img src="/files/bsYTSQiHvKCgJWWMUDWy" alt="" width="353"><figcaption></figcaption></figure></div>
3. Right-click on "**VirtualMetric API**" and select "**Recycle**" to restart the application pool.

<div align="left"><figure><img src="/files/7DfjAmFj1opCVuGy4aLE" alt="" width="375"><figcaption></figcaption></figure></div>

4. After the application pool restarts, return to the Server Management screen.
5. On the Server Management screen, click the **Refresh** button (represented by a circular arrow icon) in the **upper-right section**.

   <div align="left"><figure><img src="/files/lMVbjwZMsi7aSk6vuiqR" alt=""><figcaption></figcaption></figure></div>
6. You will see that the server entry is once again restored in the Server List.

{% hint style="info" %}
**Note:** After an accidental removal, you have a **15-minute window** to restore the server. If you don't restore it within this time frame, the VirtualMetric Cleanup Job will permanently remove the server.
{% endhint %}


---

# 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://docs.virtualmetric.com/settings/devices/server-operations/restore-server.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.
