nerdexam
Microsoft

70-473 · Question #70

You have a Microsoft Azure SQL database named DB1 and a copy of DB1 named DB1Test. You use DB1Test to test the deployment of major updates to the database. You discover that DB1Test contains outdated

The correct answer is A. CREATE DATABASE DB1Test AS Snapshot OF DB1; B. CREATE DATABASE DB1Test AS COPY OF DB1;. To ensure a test database contains recent data, you must first delete the existing outdated database and then create a new copy from the source database.

Design and implement data storage

Question

You have a Microsoft Azure SQL database named DB1 and a copy of DB1 named DB1Test. You use DB1Test to test the deployment of major updates to the database. You discover that DB1Test contains outdated data. You need to ensure that DB1Test contains recent data from DB1. Which two statements should you execute? Each correct answer presents part of the solution. Not: Each correct selection is worth one point.

Options

  • ACREATE DATABASE DB1Test AS Snapshot OF DB1;
  • BCREATE DATABASE DB1Test AS COPY OF DB1;
  • CSELECT d.name AS DBName, d.state_desc FROME sys.databases d WHERE name - DB1Test';
  • DDROP DATABASEDB1Test;
  • EALTER DATABASE DB1Test SET ONLINE;

How the community answered

(27 responses)
  • A
    78% (21)
  • C
    11% (3)
  • D
    7% (2)
  • E
    4% (1)

Why each option

To ensure a test database contains recent data, you must first delete the existing outdated database and then create a new copy from the source database.

ACREATE DATABASE DB1Test AS Snapshot OF DB1;Correct
BCREATE DATABASE DB1Test AS COPY OF DB1;Correct

After the outdated `DB1Test` is dropped, `CREATE DATABASE DB1Test AS COPY OF DB1;` creates a fresh copy of the `DB1` database with its current data, fulfilling the requirement for recent data.

CSELECT d.name AS DBName, d.state_desc FROME sys.databases d WHERE name - DB1Test';

This statement is a `SELECT` query for checking database status and does not modify or refresh the database data.

DDROP DATABASEDB1Test;
EALTER DATABASE DB1Test SET ONLINE;

`ALTER DATABASE DB1Test SET ONLINE;` would only bring an offline database online and would not update its data from `DB1`.

Concept tested: Azure SQL Database copy and refresh operations

Source: https://learn.microsoft.com/en-us/azure/azure-sql/database/database-copy-how-to

Topics

#Azure SQL Database#Database copies#Database snapshots#Data refresh

Community Discussion

No community discussion yet for this question.

Full 70-473 Practice