Summer Sale Limited Time 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = simple75
Pass the Microsoft Certified: Azure Database Administrator Associate DP-300 Questions and answers with Dumpstech
Task 2
You need to configure differential backups for the db1 Azure SQL database to be once a day instead of twice day. You may need to use SQL Server Management Studio and the Azure portal.
Options:
See the explanation part for the complete Solution.
Requirement: Configure differential backups for Azure SQL Database db1 to run once a day instead of twice a day.
Correct setting: Change Differential backup frequency from 12 Hours to 24 Hours.
Azure SQL Database supports differential backup frequency of either 12 hours or 24 hours. A 12-hour frequency means twice per day; a 24-hour frequency means once per day. Microsoft also notes that 24-hour differential backup frequency can increase restore time compared with 12-hour frequency.
Method 1 — Azure Portal Method
This is the best method for the simulation.
Step 1: Open the Azure SQL logical server
Sign in to the Azure portal.
Search for SQL servers.
Open the logical SQL server that hosts database db1.
Do not start from SQL Server Management Studio for this task. The differential backup frequency is an Azure SQL backup policy setting, not a normal T-SQL database setting.
Step 2: Open the Backups page
In the SQL server left menu, select Backups.
Select the Retention policies tab.
Microsoft’s documented portal path is to go to the logical SQL server, select Backups, then select the Retention policies tab.
Step 3: Select database db1
In the list of databases, locate db1.
Select the checkbox next to db1.
Select Configure policies from the action bar.
Step 4: Change the differential backup frequency
In the policy configuration pane:
Find Differential backup frequency.
Change it from:
12 Hours
to:
24 Hours
Leave the PITR retention period unchanged unless the task specifically tells you to change it.
Select Apply or Save.
Microsoft’s documented option is exactly 12 Hours or 24 hours under Differential backup frequency.
Method 2 — Azure CLI Method
Use this if the simulation provides Cloud Shell.
az sql db str-policy set \
--resource-group < resource-group-name > \
--server < server-name > \
--name db1 \
--retention-days < current-retention-days > \
--diffbackup-hours 24
Example:
az sql db str-policy set \
--resource-group RG1 \
--server sql60152867 \
--name db1 \
--retention-days 7 \
--diffbackup-hours 24
Microsoft documents az sql db str-policy set with --diffbackup-hours 24 for changing active database differential backup frequency. Valid values are 12 or 24 hours.
Be careful: do not guess the retention days blindly in a real environment. In the exam lab, use the existing retention value shown in the portal unless the task also asks you to change retention.
Method 3 — PowerShell Method
Use this if Azure PowerShell is available.
Set-AzSqlDatabaseBackupShortTermRetentionPolicy `
-ResourceGroupName " < resource-group-name > " `
-ServerName " < server-name > " `
-DatabaseName " db1 " `
-RetentionDays < current-retention-days > `
-DiffBackupIntervalInHours 24
Microsoft documents Set-AzSqlDatabaseBackupShortTermRetentionPolicy with -DiffBackupIntervalInHours 24 for setting Azure SQL Database differential backup frequency.
SSMS / T-SQL Clarification
For this task, SSMS is not the right tool to change the setting.
There is no normal ALTER DATABASE T-SQL command in Azure SQL Database to change automated differential backup frequency. Microsoft documents this change through:
Azure portal
Azure CLI
PowerShell
REST API
not SSMS/T-SQL.
You may use SSMS only to confirm the database exists and is accessible, but the backup frequency setting must be changed from Azure management tools.
Task 9
You need to ensure that when non-administrative users query the SalesLT.Customer table in db1, email addresses are obscured. For example, an email address of alice@contoso.com must appear as aXXX@XXXX.com.
You may need to use SQL Server Management Studio and the Azure portal.
Options:
See the explanation part for the complete Solution.
Configure Dynamic Data Masking on the email column in:
SalesLT.Customer
The column is normally:
EmailAddress
Use the built-in masking function:
email()
Microsoft documents that Dynamic Data Masking hides sensitive data in query results for nonprivileged users without changing the stored data. The built-in email() masking function exposes the first letter and returns the masked format aXXX@XXXX.com, which exactly matches the requirement.
Method 1 — SSMS / T-SQL Method
This is the fastest and most reliable method.
Step 1: Connect to db1
Open SQL Server Management Studio.
Connect to the Azure SQL logical server that hosts db1.
Open a query window against database:
db1
Step 2: Apply the email mask
Run:
ALTER TABLE [SalesLT].[Customer]
ALTER COLUMN [EmailAddress]
ADD MASKED WITH (FUNCTION = ' email() ' );
This adds a Dynamic Data Masking rule to the EmailAddress column. The actual email address remains stored in the table, but users without permission to view unmasked data will see the masked value. Microsoft’s documented syntax for adding an email mask is ALTER COLUMN Email ADD MASKED WITH (FUNCTION = ' email() ' ).
Step 3: Verify that the column is masked
Run:
SELECT
OBJECT_SCHEMA_NAME(mc.object_id) AS schema_name,
OBJECT_NAME(mc.object_id) AS table_name,
c.name AS column_name,
mc.masking_function
FROM sys.masked_columns AS mc
JOIN sys.columns AS c
ON mc.object_id = c.object_id
AND mc.column_id = c.column_id
WHERE OBJECT_SCHEMA_NAME(mc.object_id) = ' SalesLT '
AND OBJECT_NAME(mc.object_id) = ' Customer '
AND c.name = ' EmailAddress ' ;
Expected result:
schema_name SalesLT
table_name Customer
column_name EmailAddress
masking_function email()
Step 4: Test as a non-administrative user
If you have a test user, run:
EXECUTE AS USER = ' TestUser ' ;
SELECT TOP (10)
EmailAddress
FROM SalesLT.Customer;
REVERT;
Expected output should look like:
aXXX@XXXX.com
bXXX@XXXX.com
cXXX@XXXX.com
A user with administrative privileges, db_owner, or UNMASK permission can still see the original email value. Microsoft states that users with administrative rights such as server admin, Microsoft Entra admin, and db_owner can view the original unmasked data.
Method 2 — Azure Portal Method
Use this if the simulation expects portal configuration.
Step 1: Open db1
Sign in to the Azure portal.
Search for SQL databases.
Open database:
db1
Step 2: Open Dynamic Data Masking
From the db1 page:
Security > Dynamic Data Masking
Microsoft states that for Azure SQL Database, Dynamic Data Masking can be configured in the Azure portal from the SQL database configuration pane under Security > Dynamic Data Masking.
Step 3: Add a masking rule
Add a mask for the email column:
Setting
Value
Schema
SalesLT
Table
Customer
Column
EmailAddress
Masking field format
Masking function
email()
Then select:
Save
The portal may show the mask type simply as:
That is the correct option because it maps to the email() masking function.
Important Permission Check
Dynamic Data Masking only affects users who do not have permission to view unmasked data.
If a non-administrative user was previously granted UNMASK, remove it:
REVOKE UNMASK TO [UserName];
Or, if a role was granted UNMASK, revoke it from the role:
REVOKE UNMASK TO [RoleName];
Do not grant UNMASK to normal users. UNMASK allows users to bypass masking and see the original values. Microsoft documents that UNMASK permission controls whether users can view masked or original data.
Final Exam-Lab Action
Run this against db1:
ALTER TABLE [SalesLT].[Customer]
ALTER COLUMN [EmailAddress]
ADD MASKED WITH (FUNCTION = ' email() ' );
Then verify:
SELECT
OBJECT_SCHEMA_NAME(object_id) AS schema_name,
OBJECT_NAME(object_id) AS table_name,
name AS column_name,
masking_function
FROM sys.masked_columns
WHERE OBJECT_SCHEMA_NAME(object_id) = ' SalesLT '
AND OBJECT_NAME(object_id) = ' Customer '
AND name = ' EmailAddress ' ;
The task is complete when non-administrative users querying SalesLT.Customer.EmailAddress see masked email values such as:
aXXX@XXXX.com
Task 5
You need to configure a disaster recovery solution for db1. When a failover occurs, the connection strings to the database must remain the same. The secondary server must be in the West US 3 Azure region.
Options:
See the explanation part for the complete Solution.
To configure a disaster recovery solution for db1, you can use the failover groups feature of Azure SQL Database. Failover groups allow you to manage the replication and failover of a group of databases across different regions with the same connection strings1. You can also use active geo-replication as an alternative, but you will need to update the connection strings manually after a failover2.
Here are the steps to create a failover group for db1 with the secondary server in the West US 3 region:
Using the Azure portal:
Go to the Azure portal and select your Azure SQL Database server that hosts db1.
Select Failover groups in the left menu and click on Add group.
Enter a name for the failover group and select West US 3 as the secondary region.
Click on Create a new server and enter the details for the secondary server, such as server name, admin login, password, and subscription.
Click on Select existing database(s) and choose db1 from the list of databases on the primary server.
Click on Configure failover policy and select the failover mode, grace period, and read-write failover endpoint mode according to your preferences.
Click on Create to create the failover group and start the replication of db1 to the secondary server.
Using PowerShell commands:
Install the Azure PowerShell module and log in with your Azure account.
Run the following command to create a new server in the West US 3 region: New-AzSqlServer -ResourceGroupName < your-resource-group-name > -ServerName < your-secondary-server-name > -Location " West US 3 " -SqlAdministratorCredentials $(New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList " < your-admin-login > " , $(ConvertTo-SecureString -String " < your-password > " -AsPlainText -Force))
Run the following command to create a new failover group with db1: New-AzSqlDatabaseFailoverGroup -ResourceGroupName < your-resource-group-name > -ServerName < your-primary-server-name > -PartnerResourceGroupName < your-resource-group-name > -PartnerServerName < your-secondary-server-name > -FailoverGroupName < your-failover-group-name > -Database db1 -FailoverPolicy Manual -GracePeriodWithDataLossHours 1 -ReadWriteFailoverEndpoint " Enabled "
You can modify the parameters of the command according to your preferences, such as the failover policy, grace period, and read-write failover endpoint mode.
These are the steps to create a failover group for db1 with the secondary server in the West US 3 region.
Task 7
You need to capture the following information for all the databases on sql60l 52867;
• Queries to the databases
• Users that executed the queries
The captured information must be stored in sa60152867.
You may need to use SQL Server Management Studio and the Azure portal.
Options:
See the explanation part for the complete Solution.
Enable Azure SQL Auditing at the server level on the Azure SQL logical server:
sql60152867
and configure the audit destination as the Azure Storage account:
sa60152867
This is the correct solution because the task says all databases on sql60152867. Database-level auditing would only apply to one database. Server-level auditing applies to all existing and newly created databases on the logical server. Microsoft states that server auditing policies apply to all existing and newly created databases on the server. The default auditing policy includes BATCH_COMPLETED_GROUP, which audits queries and stored procedures executed against the database, plus successful and failed authentication events.
Azure Portal Method — Recommended for Simulation
Step 1: Open the Azure SQL logical server
Sign in to the Azure portal.
Search for:
SQL servers
Open the SQL logical server named:
sql60152867
Be careful with the name. In your prompt, it appears as sql60l 52867, but the earlier tasks strongly indicate the real server name is probably:
sql60152867
Use the SQL logical server that hosts the databases, not a single SQL database.
Step 2: Open Auditing
On the SQL server page:
In the left menu, go to Security.
Select Auditing.
Microsoft’s setup path is to navigate to Auditing under the Security heading in either the SQL database or SQL server pane. For this task, you must use the SQL server pane because the requirement covers all databases.
Step 3: Enable server-level auditing
Set:
Enable Azure SQL Auditing = On
or:
Auditing = On
depending on the portal wording.
This enables the server-level audit policy.
Step 4: Select Storage as the audit destination
Under Audit log destination, select:
Storage
Then choose the storage account:
sa60152867
Microsoft states that Azure SQL auditing can write database events to an Azure storage account, Log Analytics workspace, or Event Hubs. For this simulation, the destination must be the storage account sa60152867, so do not choose Log Analytics or Event Hub unless the task separately asks for them.
Step 5: Configure storage authentication
If the portal asks for authentication type, use one of these depending on what is available in the lab:
Option
Use when
Managed Identity
Preferred if available
Storage access keys
Use if the lab expects the older/default storage-key method
Microsoft recommends managed identity for storage authentication because storage access keys are a security risk. However, many exam simulations still accept the default storage-key flow as long as the audit destination is correctly set to the required storage account.
Step 6: Leave default audit action groups enabled
Do not remove the default audit action groups.
The default Azure SQL auditing policy includes:
BATCH_COMPLETED_GROUP
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
FAILED_DATABASE_AUTHENTICATION_GROUP
BATCH_COMPLETED_GROUP is the key one here because it captures completed T-SQL batches, meaning the queries executed against the databases. Authentication and principal fields identify the login/user context. Microsoft states that the default auditing policy audits all queries and stored procedures executed against the database, plus successful and failed logins.
Step 7: Save the auditing configuration
Select:
Save
Wait for the portal notification that the auditing settings were saved successfully.
That completes the required configuration.
Verification
Verify from the Azure portal
Open the SQL server:
sql60152867
Go to:
Security > Auditing
Confirm:
Auditing: On
Destination: Storage
Storage account: sa60152867
Scope: Server-level
Verify storage output
After users execute queries, audit files should appear in the storage account.
Open storage account:
sa60152867
Go to Containers.
Open:
sqldbauditlogs
Azure SQL audit logs written to Azure Storage are stored in a container named sqldbauditlogs. Audit logs are written as .xel files and can be opened with SQL Server Management Studio.
What Information Is Captured?
The audit log includes the exact fields needed for this task.
Required information
Audit log field
Query executed
statement / statement_s
Database name
database_name / database_name_s
User context
database_principal_name / database_principal_name_s
Login context
server_principal_name / server_principal_name_s
Session principal
session_server_principal_name / session_server_principal_name_s
Time of execution
event_time / event_time_t
Client IP
client_ip / client_ip_s
Microsoft’s audit log format documents statement as the T-SQL statement that was executed, database_principal_name as the database user context, and server_principal_name as the current login.
SSMS Method — Viewing the Audit Logs
SSMS is not the main tool to enable Azure SQL auditing in this simulation, but it can be used to read the .xel audit files after they are written.
Step 1: Download or access the .xel files
From the storage account:
sa60152867 > Containers > sqldbauditlogs
Download the .xel audit file, or access it through supported tooling.
Step 2: Open the audit file in SSMS
Open SQL Server Management Studio.
Go to:
File > Open > File
Select the .xel audit file.
Review fields such as:
statement
database_principal_name
server_principal_name
database_name
event_time
client_ip
This verifies that the queries and the users that executed them are being captured.
Azure CLI Method
Use this only if Cloud Shell is available and you know the resource group names.
az sql server audit-policy update \
--resource-group < resource-group-name > \
--name sql60152867 \
--state Enabled \
--storage-account sa60152867
Depending on the environment, you may also need to specify the storage endpoint and access key, or use managed identity configuration. In the portal simulation, the UI normally handles this for you.
PowerShell Method
Use this if Azure PowerShell is available.
Set-AzSqlServerAudit `
-ResourceGroupName " < resource-group-name > " `
-ServerName " sql60152867 " `
-BlobStorageTargetState Enabled `
-StorageAccountResourceId " /subscriptions/ < subscription-id > /resourceGroups/ < storage-rg > /providers/Microsoft.Storage/storageAccounts/sa60152867 "
This configures auditing at the server level, which is the correct scope for all databases.
Final Exam-Lab Action
Configure this in the Azure portal:
SQL server: sql60152867
Security > Auditing
Auditing: On
Audit destination: Storage
Storage account: sa60152867
Default audit action groups: Enabled
Save
That captures queries and the users who executed them for all databases on the SQL logical server and stores the audit records in sa60152867.
Task 9
You need to generate an email alert to admin@contoso.com when CPU percentage utilization for db1 is higher than average.
Options:
See the explanation part for the complete Solution.
To generate an email alert to admin@contoso.com when CPU percentage utilization for db1 is higher than average, you can use the Azure portal to create an alert rule based on the CPU percentage metric. Here are the steps to do that:
Go to the Azure portal and select your Azure SQL Database server that hosts db1.
Select Alerts in the Monitoring section and click on New alert rule.
In the Condition section, click Add and select the CPU percentage metric.
In the Configure signal logic page, set the threshold type to Dynamic. This will compare the current metric value to the historical average and trigger the alert when it deviates significantly1.
Set the operator to Greater than, the aggregation type to Average, the aggregation granularity to 1 minute, and the frequency of evaluation to 5 minutes.
Click Done to save the condition.
In the Action group section, click Create and enter a name and a short name for the action group.
In the Notifications section, click Add and select Email/SMS message/Push/Voice.
Enter admin@contoso.com in the Email field and click OK.
Click OK to save the action group.
In the Alert rule details section, enter a name and a description for the alert rule, choose a severity level, and make sure the rule is enabled.
Click Create alert rule to create the alert rule.
This alert rule will send an email to admin@contoso.com when the CPU percentage utilization for db1 is higher than average. You can also add other actions to the alert rule, such as calling a webhook or running an automation script
Task 1
You need to implement a disaster recovery solution by using active geo replication for an Azure Azure SQL database named db1. The replica must be in the East US or East US 2 Azure region on a server named sql60152867-dr.database.windows.net. You may need to use SQL Server Management Studio and the Azure portal.
Options:
See the explanation part for the complete Solution.
Requirement: Configure active geo-replication for Azure SQL Database db1. The geo-replica must be created in East US or East US 2 on the logical Azure SQL server:
sql60152867-dr.database.windows.net
The important point: in Azure SQL, the logical server name used in portal/T-SQL is usually:
sql60152867-dr
not the full FQDN.
Microsoft states that active geo-replication is configured per database, and a geo-secondary is created for an existing Azure SQL Database. After creation and seeding, changes from the primary are replicated asynchronously to the secondary.
Method 1 — Azure Portal Method
This is the safest method for the simulation if the portal is available.
Step 1: Open the primary database
Sign in to the Azure portal.
Search for SQL databases.
Select the database named db1.
Confirm you are looking at the primary database, not an existing secondary.
Step 2: Open the Replicas blade
In the left menu of the db1 database page, scroll to Data management.
Select Replicas.
Select Create replica.
Microsoft’s portal workflow is: open the database, go to Data management > Replicas, and choose Create replica.
Step 3: Configure the geo-secondary replica
On the Create SQL Database replica page, configure the target like this:
Setting
Value
Database
db1
Replica type
Geo replica / Active geo-replication
Target server
sql60152867-dr
Region
East US or East US 2
Database name
db1
Compute + storage
Keep same or compatible with primary
Elastic pool
Only choose this if the lab specifically requires an elastic pool
Do not create a failover group unless the task asks for one. This task says active geo replication, so configure a database-level geo-replica, not a failover group. Microsoft explicitly separates active geo-replication from failover groups and notes that active geo-replication is configured per database.
Step 4: Review and create
Select Review + create.
Confirm the target server is:
sql60152867-dr
Confirm the region is either:
East US
or
East US 2
Select Create.
Azure will create the secondary database and begin the seeding process. Microsoft notes that the secondary database has the same name as the primary by default and begins replication after it is created and seeded.
Step 5: Verify replication
After deployment completes:
Go back to the primary database db1.
Open Replicas again.
Under Geo replicas, confirm that a replica exists on:
sql60152867-dr.database.windows.net
Confirm the replica status is healthy, online, or synchronizing.
You can also open the target SQL server sql60152867-dr and verify that a database named db1 now exists there.
Method 2 — SSMS / T-SQL Method
Use this method if the portal is awkward or the exam simulation expects T-SQL.
Step 1: Allow SSMS connectivity
Before connecting with SSMS:
In Azure portal, open the primary SQL server hosting db1.
Go to Networking or Firewalls and virtual networks.
Add your client IP address.
Repeat this on the secondary server:
sql60152867-dr.database.windows.net
This matters because SSMS must be able to connect to the Azure SQL logical server.
Step 2: Connect to the primary server in SSMS
Open SQL Server Management Studio.
Connect to the primary Azure SQL logical server that hosts db1.
Use SQL admin credentials or Microsoft Entra admin credentials.
In Connection Properties, connect to the database:
master
This is important. For Azure SQL Database geo-replication setup through T-SQL, run the command from the master database on the primary server.
Step 3: Run the active geo-replication command
Run this query:
ALTER DATABASE [db1]
ADD SECONDARY ON SERVER [sql60152867-dr]
WITH (ALLOW_CONNECTIONS = ALL);
Microsoft documents that ALTER DATABASE ... ADD SECONDARY ON SERVER creates a secondary database for an existing Azure SQL Database and starts data replication. The official example also uses WITH (ALLOW_CONNECTIONS = ALL) to create a readable geo-secondary.
Step 4: Verify the replication link
Still connected to the primary server, run:
SELECT *
FROM sys.geo_replication_links;
Or use:
SELECT *
FROM sys.dm_geo_replication_link_status;
Microsoft lists sys.geo_replication_links and sys.dm_geo_replication_link_status as views used to return information about existing replication links and replication status.
Optional PowerShell Method
Only use this if the lab gives you Cloud Shell or PowerShell access.
New-AzSqlDatabaseSecondary `
-ResourceGroupName " < PrimaryResourceGroupName > " `
-ServerName " < PrimaryServerName > " `
-DatabaseName " db1 " `
-PartnerResourceGroupName " < SecondaryResourceGroupName > " `
-PartnerServerName " sql60152867-dr " `
-PartnerDatabaseName " db1 "
Microsoft identifies New-AzSqlDatabaseSecondary as the PowerShell cmdlet that creates a secondary database for an existing Azure SQL Database and starts replication.
Final Answer / What You Must Achieve
The task is complete when:
Database db1 still exists on the primary server.
A secondary database named db1 exists on:
sql60152867-dr.database.windows.net
The target server is in East US or East US 2.
The replica appears under db1 > Replicas > Geo replicas.
Replication status is healthy, online, seeding, or synchronizing.
You did not configure a failover group unless separately requested.
Task 10
You need to ensure that indexes are created automatically for all the databases on sql60152867. You may need to use SQL Server Management Studio and the Azure portal.
Options:
See the explanation part for the complete Solution.
Enable Automatic tuning at the server level and turn Create Index to On.
Microsoft states that Azure SQL Database automatic tuning can create indexes automatically, verify performance improvement, and roll back changes if performance regresses. Server-level automatic tuning settings are applied to all databases on the server by default, unless a database has its own override.
Azure Portal Method — Recommended for Simulation
Step 1: Open the SQL logical server
Sign in to the Azure portal.
Search for SQL servers.
Open:
sql60152867
Do not open only db1. The task says all databases on sql60152867, so configure this at the server level.
Step 2: Open Automatic tuning
In the SQL server left menu:
Go to Intelligent Performance.
Select Automatic tuning.
Microsoft’s documented path is to open the Azure SQL server in the portal and select Automatic tuning from the menu.
Step 3: Enable automatic index creation
On the Automatic tuning page, configure:
Setting
Value
Create index
On
Drop index
Leave unchanged unless required
Force last good plan
Leave unchanged unless required
The only required setting is:
Create index = On
Do not confuse this with Drop index. The task only asks to ensure indexes are created automatically.
Step 4: Apply the setting
Select Apply or Save.
Wait for the portal confirmation.
The setting is now configured at the SQL logical server level.
Important Database Inheritance Check
This is the part people miss.
Server-level automatic tuning applies to databases that inherit from the server. Microsoft states that individual databases can override server-level automatic tuning settings. Therefore, if the simulation shows any database with custom automatic tuning settings, set that database to Inherit from server or manually set Create index = On for that database.
For each database, the correct inherited state should be:
Automatic tuning = Inherit from server
Create index = Inherited / On
If a database is set to:
Custom
Create index = Off
then the server-level setting might not affect that database. Fix it.
Database-Level T-SQL Method
Use this only if the portal is unavailable or you need to correct a specific database override.
Connect to each database and run:
ALTER DATABASE CURRENT
SET AUTOMATIC_TUNING (
CREATE_INDEX = ON
);
Microsoft documents this exact syntax for enabling the CREATE_INDEX automatic tuning option by T-SQL on an individual Azure SQL Database.
To make an individual database inherit server settings, run:
ALTER DATABASE CURRENT
SET AUTOMATIC_TUNING = INHERIT;
But this must be executed inside each database, not from master as a single server-wide T-SQL command.
Verification with T-SQL
Connect to a database and run:
SELECT
name,
desired_state_desc,
actual_state_desc
FROM sys.database_automatic_tuning_options
WHERE name = ' CREATE_INDEX ' ;
Expected result:
name CREATE_INDEX
desired_state_desc ON or DEFAULT
actual_state_desc ON
If desired_state_desc is DEFAULT, that usually means the database is inheriting the server-level setting. The key result is:
actual_state_desc = ON
SSMS Clarification
SSMS can be used to verify or configure the setting per database using T-SQL, but it is not the best tool for the requirement as written.
Because the task says:
all the databases on sql60152867
the correct primary method is:
Azure portal > SQL server > Automatic tuning > Create index = On
Final Exam-Lab Action
Configure this:
SQL server: sql60152867
Automatic tuning
Create index: On
Apply
Then verify databases are inheriting the server setting or have CREATE_INDEX = ON.
That completes the task.
Task 2
You need to configure your user account as the Azure AD admin for the server named sql3700689S.
Options:
See the explanation part for the complete Solution.
To configure your user account as the Azure AD admin for the server named sql3700689S, you can use the Azure portal or the Azure CLI. Here are the steps for both methods:
Using the Azure portal:
Go to the Azure portal and select SQL Server – Azure Arc.
Select the server named sql3700689S and click on Active Directory admin.
Click on Set admin and choose your user account from the list of Azure AD users.
Click on Select and then Save to confirm the change.
You can verify the Azure AD admin by clicking on Active Directory admin again and checking the current admin.
Using the Azure CLI:
Install the Azure CLI and log in with your Azure account.
Run the following command to get the object ID of your user account: az ad user show --id < your-user-name > --query objectId -o tsv
Run the following command to set your user account as the Azure AD admin for the server: az sql server ad-admin create --server sql3700689S --object-id < your-object-id > --display-name < your-user-name >
You can verify the Azure AD admin by running the following command: az sql server ad-admin show --server sql3700689S
These are the steps to configure your user account as the Azure AD admin for the server named sql3700689S.
Task 3
You need to ensure that all queries executed against dbl are captured in the Query Store.
Options:
See the explanation part for the complete Solution.
To ensure that all queries executed against dbl are captured in the Query Store, you need to enable the Query Store feature for the database and set the query capture mode to ALL. The Query Store feature provides you with insight on query plan choice and performance for Azure SQL Database1. The query capture mode controls whether all queries or only a subset of queries are tracked2.
Here are the steps to enable the Query Store and set the query capture mode to ALL for the database dbl:
Using the Azure portal:
Go to the Azure portal and select your Azure SQL Database server.
Select the database dbl and click on Query Performance Insight in the left menu.
Click on Configure Query Store and turn on the Query Store switch.
In the Query Capture Mode dropdown, select All and click on Save.
Using Transact-SQL statements:
Connect to the Azure SQL Database server and the database dbl using SQL Server Management Studio or Azure Data Studio.
Run the following command to enable the Query Store for the database: ALTER DATABASE dbl SET QUERY_STORE = ON;
Run the following command to set the query capture mode to ALL for the database: ALTER DATABASE dbl SET QUERY_STORE (QUERY_CAPTURE_MODE = ALL);
These are the steps to ensure that all queries executed against dbl are captured in the Query Store.
Task 7
You plan to create an automation runbook that will create database users in db1 from Azure AD identities. You need to configure sq1370O6895 to support the creation of new database users.
Options:
See the explanation part for the complete Solution.
To configure sq1370O6895 to support the creation of new database users from Azure AD identities, you need to do the following steps:
Set up a Microsoft Entra tenant and associate it with your Azure subscription. You can use the Microsoft Entra portal or the Azure portal to create and manage your Microsoft Entra users and groups12.
Configure a Microsoft Entra admin for sq1370O6895. You can use the Azure portal or the Azure CLI to set a Microsoft Entra user as the admin for the server34. The Microsoft Entra admin can create other database users from Microsoft Entra identities5.
Connect to db1 using the Microsoft Entra admin account and run the following Transact-SQL statement to create a new database user from a Microsoft Entra identity: CREATE USER [Microsoft Entra user name] FROM EXTERNAL PROVIDER;6 You can replace the Microsoft Entra user name with the name of the user or group that you want to create in the database.
Grant the appropriate permissions to the new database user by adding them to a database role or granting them specific privileges. For example, you can run the following Transact-SQL statement to add the new user to the db_datareader role: ALTER ROLE db_datareader ADD MEMBER [Microsoft Entra user name];
These are the steps to configure sq1370O6895 to support the creation of new database users from Azure AD identities.