Administering Microsoft SQL Server 2012/2014 Databases — Question 43
You administer a Microsoft Azure SQL Database database named Orders.
You need to create a copy of Orders named Orders_Reporting.
Which Transact-SQL command should you use?
Answer options
- A. BACKUP DATABASE Orders TO DISK = 'D:\Orders.bak' RESTORE DATABASE Orders_Reporting FROM DISK = 'D:\Orders.bak
- B. BACKUP DATABASE Orders TO DISK = 'D:\Orders.bak' CREATE DATABASE Orders_Reporting FROM DISK = 'D:\Orders.bak
- C. CREATE DATABASE Orders_Reporting AS COPY OF Orders
- D. BACKUP DATABASE Orders TO DISK = 'D:\Orders.bak' MIRROR TO DISK = 'Orders_Reporting
Correct answer: C
Explanation
The correct answer is C because the CREATE DATABASE command with AS COPY OF allows for a straightforward duplication of the existing database in Azure SQL Database. Options A and B are incorrect as they attempt to use backup and restore commands, which are not applicable for creating a copy in Azure SQL Database. Option D is also incorrect as it does not follow the proper syntax for creating a copy of a database.