70-473 · Question #118
You have a Microsoft Azure SQL database. You need to provide a copy of the database to an auditor. What should you do?
The correct answer is D. Run the BACKUP DATABASE statement and the RESTORE DATABASE statement. To provide an auditor with an independent copy of an Azure SQL database, performing a backup (e.g., exporting to a BACPAC file) and then restoring it to a new location or server is a standard and flexible method.
Question
Options
- ARun the CREATE DATABASE statement and use the AS COPY OF clause.
- BRun the CREATE DATABASE statement and use the AS SNAPSHOT OF clause.
- CRun the sp_detach_db stored procedure and the sp_attach_db stored procedure.
- DRun the BACKUP DATABASE statement and the RESTORE DATABASE statement.
How the community answered
(28 responses)- B4% (1)
- C4% (1)
- D93% (26)
Why each option
To provide an auditor with an independent copy of an Azure SQL database, performing a backup (e.g., exporting to a BACPAC file) and then restoring it to a new location or server is a standard and flexible method.
The CREATE DATABASE ... AS COPY OF statement creates a copy on the same logical server as the source database. While it creates a copy, it doesn't provide an independent or portable copy that can be easily given to an auditor who might need it in a separate environment or offline.
The AS SNAPSHOT OF clause is not a valid T-SQL command for creating a full database copy in Azure SQL Database. Database snapshots are primarily a feature of SQL Server on-premises, not Azure SQL Database PaaS.
sp_detach_db and sp_attach_db stored procedures are used for managing database files in SQL Server on-premises or IaaS VMs, not for Azure SQL Database, which is a platform-as-a-service offering.
While users cannot directly execute BACKUP DATABASE and RESTORE DATABASE statements on Azure SQL Database, the process of exporting a database to a BACPAC file serves as a logical backup, and importing that BACPAC file creates a restored copy. This 'backup and restore' concept provides an independent, portable copy suitable for an auditor, potentially to a different server or even offline.
Concept tested: Azure SQL DB logical backup and restore
Source: https://learn.microsoft.com/en-us/azure/azure-sql/database/database-export
Topics
Community Discussion
No community discussion yet for this question.