# Recuperando Bando de dados Suspect

Rode esses comandos em sequência para realizar a recuperação do bando em suspensão. \
\[NOME\_DO\_BANCO] = Nome no SQL SERVER

<figure><img src="/files/WUGpI1yi7XBEvBpfje5p" alt=""><figcaption></figcaption></figure>

Ao rodar cada passo deve retornar a mensagem: "Command(s) completed successfully."

## Passo 1:

ALTER DATABASE \[NOME\_DO\_BANCO] SET EMERGENCY

## Passo 2:

ALTER DATABASE \[NOME\_DO\_BANCO] SET SINGLE\_USER

## Passo 3:

DBCC CHECKDB (\[NOME\_DO\_BANCO], repair\_allow\_data\_loss ) WITH ALL\_ERRORMSGS

## Passo 4:

ALTER DATABASE \[NOME\_DO\_BANCO]SET read\_write

## Passo 5:

ALTER DATABASE \[NOME\_DO\_BANCO]SET multi\_user\
\
Após todos darem certo o bando estará normal novamente.

## Passo 6:

Porem sugiro rodar mais esses comando para verificar se esta tudo certo mesmo.\
\
\--Set to single mode: ALTER DATABASE \[NOME\_DO\_BANCO] SET SINGLE\_USER;

DBCC CHECKDB ('\[NOME\_DO\_BANCO]', Repair\_ALL)

\--Set back into multi user mode: ALTER DATABASE \[NOME\_DO\_BANCO] SET MULTI\_USER;

<figure><img src="/files/T9e4lV8cvMFWifPvztQH" alt=""><figcaption></figcaption></figure>


---

# 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://suporte-conttrade.gitbook.io/utilidades/sql-server/recuperando-bando-de-dados-suspect.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.
