nerdexam
Microsoft

DP-300 · Question #399

DP-300 Question #399: Real Exam Question with Answer & Explanation

Resource Locks in Azure are the correct mechanism to prevent accidental deletion of resources like Azure SQL databases. By applying a 'Delete' lock (CanNotDelete) directly on db1 through the Azure portal under Settings > Locks, all users - including owners and administrators - ar

Submitted by joshua94· Mar 6, 2026Manage Azure identities and governance - specifically implementing and managing Azure resource locks to protect resources from accidental modification or deletion (AZ-104 Domain: Manage Azure Resources)

Question

SIMULATION You need to prevent users from accidentally deleting db1 from the Azure portal. You may need to use SQL Server Management Studio and the Azure portal. Answer: To protect your Azure resources, you can use Resource Locks. To prevent accidental deletion of an Azure database, use the Azure portal to create a "Delete" lock on the database or its parent resources, such as the SQL server or resource group. This lock will prevent any user, including owners, from deleting the database. Step 1: Navigate to the resource: Go to the Azure portal and locate the Azure SQL database you want to protect. You can do this by searching for "SQL databases" or navigating through your resource groups. [Select db1] Step 2: Open the Locks tab: In the database's overview, locate the "Locks" tab under the "Settings" section. Step 3: Add a new lock: Click the "Add" button to create a new lock. Step 4: Configure the lock: Lock Name: Give the lock a descriptive name (e.g., "PreventDeleteLock"). Lock Type: Select "Delete". Level: Set the level to "CanNotDelete". Notes (Optional): Add any relevant notes about the lock. Step 5: Apply the lock: Click "OK" to save the lock. Reference: https://techcommunity.microsoft.com/blog/adformysql/preventing-and-recovering-from-accidental- deletion-of-an-azure-database-for-mysq/4388503

Explanation

Resource Locks in Azure are the correct mechanism to prevent accidental deletion of resources like Azure SQL databases. By applying a 'Delete' lock (CanNotDelete) directly on db1 through the Azure portal under Settings > Locks, all users - including owners and administrators - are blocked from deleting the resource until the lock is explicitly removed. This is a non-destructive, reversible protection layer that does not affect normal read/write operations on the database, making it ideal for preventing accidental deletion without disrupting functionality.

Topics

#Azure Resource Locks#Azure SQL Database#Resource Management#Azure Governance

Community Discussion

No community discussion yet for this question.

Full DP-300 Practice
SIMULATION You need to prevent users from accidentally deleting... | DP-300 Q#399 Answer | NerdExam