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.
Question
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)- A78% (21)
- C11% (3)
- D7% (2)
- E4% (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.
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.
This statement is a `SELECT` query for checking database status and does not modify or refresh the database data.
`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
Community Discussion
No community discussion yet for this question.