-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/feature-adventureworks' into develop
- Loading branch information
Showing
7 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# MBA-SQLCourse | ||
Repositório de material complementar para Estruturação e Manipulação de Dados em SQL | ||
# Repositório de material complementar para SQL | ||
|
||
* O conteúdo apresentado nesse repostório é disponibilizado aos alunos do **MBA em Ciência de Dados (PPGAd/UFF)**, pertinente à disciplina de ***Estruturação e Manipulação de Dados em SQL***. Para conhecer mais sobre o programa de pós-graduação, acesse a [página oficial](https://www.posadmuff.com.br). | ||
|
||
## **Material Complementar para SQL Server em Docker** | ||
|
||
* [Criar Ambiente SQL Server (Docker)](https://github.com/gassantos/MBA-SQLCourse/blob/main/SQLServer/Procedimento.md) | ||
* [Restaurar Backup no SQL Server (Docker)](https://github.com/gassantos/MBA-SQLCourse/blob/main/SQLServer/Restore.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Restauração de Backup no SQL Server via Azure Data Studio | ||
|
||
Após concluídas as etapas pertinentes ao [Procedimento SQL Server](https://github.com/gassantos/MBA-SQLCourse/blob/main/SQLServer/Procedimento.md), será iniciar os banco de dados (OLTP e DW) a partir dos arquivos de backup **_AdventureWorks_** disponíveis para o SQL Server 2017. | ||
|
||
Caso não tenha feito o download dos arquivos de backup mencionados, acesse os links abaixo: | ||
|
||
* [AdventureWorks (OLTP)](https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorks2017.bak) | ||
* [AdventureWorks (DW)](https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorksDW2017.bak) | ||
|
||
## **A) Enviar arquivo para MSSQL (Docker)** | ||
|
||
1. Vá até o diretório onde estão os arquivos de backup: | ||
|
||
Exemplo: ```bash cd ~/Downloads``` | ||
|
||
2. Acesse o *CONTEINER_ID* do MSSQL, executando: | ||
|
||
```bash | ||
docker ps | grep mssql | awk {'print $1'} | ||
``` | ||
|
||
3. E faça a cópia do arquivo de backup para o contêiner: | ||
|
||
```bash | ||
docker cp "diretorio-backup-file" conteiner_id:/home | ||
``` | ||
|
||
## **B) Restaurar backup via Azure Data Studio** | ||
|
||
1. Inicie o Azure Data Studio | ||
2. Vá em **SERVIDORES** e clique em **localhost** para conectar à instância | ||
3. Clique com o botão direito em *localhost* e vá em **Gerenciar** | ||
4. Agora você está na **Página Inicial** do SGBD, conforme a imagem: | ||
![Iniciar a restauração](images/Inicia-Restauracao.png) | ||
|
||
Comece o processo clicando em **Restaurar**. | ||
|
||
1. Selecione o backup que será utilizado, conforme o diretório enviado via **_docker cp_** e confirme em **OK**. ![Iniciar a restauração](images/Seleciona-Backup.png) | ||
2. Na etapa seguinte, defina a fonte de restauração como ***Arquivo de backup***. ![Iniciar a restauração](images/Restaura-Tela1.png) | ||
3. Após definida a fonte de restauração, as demais informações serão automaticamente preenchidas, então basta confirmar no botão **Restaurar**. ![Iniciar a restauração](images/Restaura-Tela2.png) | ||
4. Agora é só aguardar a **Restauração finalizar** e correr pro abraço :wink: ![Iniciar a restauração](images/Fim-Restauracao.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.