Microsoft DP-800 Practice Test 13
Question 120
Briarfield Foods is responsible for an Azure SQL or Microsoft SQL workload. A service constructs dynamic SQL from user input. Operational evidence: Unsafe concatenation risks SQL injection. What operational condition would provide the earliest useful regression warning?
- Monitor nested trigger failures and recursion errors
- Monitor broken dependencies after deployment
- Monitor unsafe dynamic SQL and execution failures
- Monitor procedure version compatibility and failures
Explanation
Correct Answer
C:
Unsafe concatenation risks SQL injection. Monitor unsafe dynamic SQL and execution failures. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
Incorrect Answers
A:
“Monitor nested trigger failures and recursion errors” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Unsafe concatenation risks SQL injection. Monitor unsafe dynamic SQL and execution failures. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
B:
“Monitor broken dependencies after deployment” concerns The view depends on an unstable schema; the reported problem instead is Unsafe concatenation risks SQL injection. Monitor unsafe dynamic SQL and execution failures. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
D:
“Monitor procedure version compatibility and failures” concerns Client parses messages rather than explicit output fields; the reported problem instead is Unsafe concatenation risks SQL injection. Monitor unsafe dynamic SQL and execution failures. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
Question 121
At Northstar Analytics, a funds-transfer procedure debits one row before a failed credit. The observed constraint is: Partial updates violate business invariants. What initial check best narrows the technical cause without altering business data?
- Inspect batch size and target procedure interface
- Inspect query input handling and EXEC statements
- Review transaction start/commit boundaries and error handling
- Inspect nesting settings and trigger side effects
Explanation
Correct Answer
C:
Partial updates violate business invariants. Review transaction start/commit boundaries and error handling. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
Incorrect Answers
A:
“Inspect batch size and target procedure interface” concerns Network round trips dominate request time; the reported problem instead is Partial updates violate business invariants. Review transaction start/commit boundaries and error handling. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
B:
“Inspect query input handling and EXEC statements” concerns Unsafe concatenation risks SQL injection; the reported problem instead is Partial updates violate business invariants. Review transaction start/commit boundaries and error handling. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
D:
“Inspect nesting settings and trigger side effects” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Partial updates violate business invariants. Review transaction start/commit boundaries and error handling. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
Question 122
A database engineer at Maple Harbor Research is investigating this case: A funds-transfer procedure debits one row before a failed credit. The relevant finding is: Partial updates violate business invariants. Which proposed change is the most suitable response to the observed constraint?
- Return a stable output parameter or resultset contract
- Wrap both changes in a transaction with proper rollback handling
- Avoid self-updating trigger design or add explicit guards as appropriate
- Accept a user-defined table type as a table-valued parameter where supported
Explanation
Correct Answer
B:
Partial updates violate business invariants. Wrap both changes in a transaction with proper rollback handling. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
Incorrect Answers
A:
“Return a stable output parameter or resultset contract” concerns Client parses messages rather than explicit output fields; the reported problem instead is Partial updates violate business invariants. Wrap both changes in a transaction with proper rollback handling. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
C:
“Avoid self-updating trigger design or add explicit guards as appropriate” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Partial updates violate business invariants. Wrap both changes in a transaction with proper rollback handling. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
D:
“Accept a user-defined table type as a table-valued parameter where supported” concerns Network round trips dominate request time; the reported problem instead is Partial updates violate business invariants. Wrap both changes in a transaction with proper rollback handling. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
Question 123
Juniper Commerce is responsible for an Azure SQL or Microsoft SQL workload. A funds-transfer procedure debits one row before a failed credit. Operational evidence: Partial updates violate business invariants. What isolated pilot would provide the strongest evidence before rollout?
- Pass a synthetic batch and compare with individual calls
- Induce an error after the first update in a disposable database
- Update multiple synthetic rows in a single statement
- Exercise a controlled update in a test database
Explanation
Correct Answer
B:
Partial updates violate business invariants. Induce an error after the first update in a disposable database. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
Incorrect Answers
A:
“Pass a synthetic batch and compare with individual calls” concerns Network round trips dominate request time; the reported problem instead is Partial updates violate business invariants. Induce an error after the first update in a disposable database. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
C:
“Update multiple synthetic rows in a single statement” concerns Trigger was written assuming a single row in inserted; the reported problem instead is Partial updates violate business invariants. Induce an error after the first update in a disposable database. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
D:
“Exercise a controlled update in a test database” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Partial updates violate business invariants. Induce an error after the first update in a disposable database. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
Question 124
At Summit Logistics, a funds-transfer procedure debits one row before a failed credit. The observed constraint is: Partial updates violate business invariants. Which acceptance result most directly demonstrates the requirement has been satisfied?
- Batch updates match expected rows with fewer round trips
- Caller reads expected ID/status without parsing print text
- The operation terminates once without duplicate side effects
- Neither side changes when the operation fails
Explanation
Correct Answer
D:
Partial updates violate business invariants. Neither side changes when the operation fails. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
Incorrect Answers
A:
“Batch updates match expected rows with fewer round trips” concerns Network round trips dominate request time; the reported problem instead is Partial updates violate business invariants. Neither side changes when the operation fails. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
B:
“Caller reads expected ID/status without parsing print text” concerns Client parses messages rather than explicit output fields; the reported problem instead is Partial updates violate business invariants. Neither side changes when the operation fails. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
C:
“The operation terminates once without duplicate side effects” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Partial updates violate business invariants. Neither side changes when the operation fails. An explicit transaction commits all related changes together or rolls them back when an exception occurs, preserving business invariants across statements.
Question 125
A database engineer at BrightPath Studios is investigating this case: A funds-transfer procedure debits one row before a failed credit. The relevant finding is: Partial updates violate business invariants. What operational condition would provide the earliest useful regression warning?
- Monitor uncommitted transactions and reconciliation errors
- Monitor nested trigger failures and recursion errors
- Monitor procedure version compatibility and failures
- Monitor broken dependencies after deployment
Explanation
Correct Answer
A:
For the transfer procedure, log failed commits, open or timed-out transactions and discrepancies between corresponding debit and credit ledger entries. The transaction must either commit both account changes or roll back both when the credit fails. A residual debit without the matching credit, even when the stored procedure returns an error, is the financial invariant that should trigger immediate investigation.
Incorrect Answers
B:
“Monitor nested trigger failures and recursion errors” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Partial updates violate business invariants. For the transfer procedure, log failed commits, open or timed-out transactions and discrepancies between corresponding debit and credit ledger entries. The transaction must either commit both account changes or roll back both when the credit fails. A residual debit without the matching credit, even when the stored procedure returns an error, is the financial invariant that should trigger immediate investigation.
C:
“Monitor procedure version compatibility and failures” concerns Client parses messages rather than explicit output fields; the reported problem instead is Partial updates violate business invariants. For the transfer procedure, log failed commits, open or timed-out transactions and discrepancies between corresponding debit and credit ledger entries. The transaction must either commit both account changes or roll back both when the credit fails. A residual debit without the matching credit, even when the stored procedure returns an error, is the financial invariant that should trigger immediate investigation.
D:
“Monitor broken dependencies after deployment” concerns The view depends on an unstable schema; the reported problem instead is Partial updates violate business invariants. For the transfer procedure, log failed commits, open or timed-out transactions and discrepancies between corresponding debit and credit ledger entries. The transaction must either commit both account changes or roll back both when the credit fails. A residual debit without the matching credit, even when the stored procedure returns an error, is the financial invariant that should trigger immediate investigation.
Question 126
Lakeview Services is responsible for an Azure SQL or Microsoft SQL workload. An UPDATE trigger logs each modified row incorrectly when batches contain many rows. Operational evidence: Trigger was written assuming a single row in inserted. What initial check best narrows the technical cause without altering business data?
- Inspect nesting settings and trigger side effects
- Inspect trigger use of inserted and deleted sets
- Inspect estimates and cardinality for the current function
- Inspect procedure signatures and caller expectations
Explanation
Correct Answer
B:
Trigger was written assuming a single row in inserted. Inspect trigger use of inserted and deleted sets. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
Incorrect Answers
A:
“Inspect nesting settings and trigger side effects” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Trigger was written assuming a single row in inserted. Inspect trigger use of inserted and deleted sets. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
C:
“Inspect estimates and cardinality for the current function” concerns A multi-statement function performs slow intermediate table processing; the reported problem instead is Trigger was written assuming a single row in inserted. Inspect trigger use of inserted and deleted sets. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
D:
“Inspect procedure signatures and caller expectations” concerns Client parses messages rather than explicit output fields; the reported problem instead is Trigger was written assuming a single row in inserted. Inspect trigger use of inserted and deleted sets. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
Question 127
At Crownridge Travel, an UPDATE trigger logs each modified row incorrectly when batches contain many rows. The observed constraint is: Trigger was written assuming a single row in inserted. Which proposed change is the most suitable response to the observed constraint?
- Rewrite suitable logic as an inline table-valued function
- Rewrite trigger logic as set-based operations over inserted and deleted
- Accept a user-defined table type as a table-valued parameter where supported
- Avoid self-updating trigger design or add explicit guards as appropriate
Explanation
Correct Answer
B:
Trigger was written assuming a single row in inserted. Rewrite trigger logic as set-based operations over inserted and deleted. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
Incorrect Answers
A:
“Rewrite suitable logic as an inline table-valued function” concerns A multi-statement function performs slow intermediate table processing; the reported problem instead is Trigger was written assuming a single row in inserted. Rewrite trigger logic as set-based operations over inserted and deleted. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
C:
“Accept a user-defined table type as a table-valued parameter where supported” concerns Network round trips dominate request time; the reported problem instead is Trigger was written assuming a single row in inserted. Rewrite trigger logic as set-based operations over inserted and deleted. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
D:
“Avoid self-updating trigger design or add explicit guards as appropriate” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Trigger was written assuming a single row in inserted. Rewrite trigger logic as set-based operations over inserted and deleted. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
Question 128
A database engineer at Oakridge Advisors is investigating this case: An UPDATE trigger logs each modified row incorrectly when batches contain many rows. The relevant finding is: Trigger was written assuming a single row in inserted. What isolated pilot would provide the strongest evidence before rollout?
- Test a controlled update in a test database
- Induce an error after the first update in a disposable database
- Pass a synthetic batch and compare with individual calls
- Update multiple synthetic rows in a single statement
Explanation
Correct Answer
D:
Trigger was written assuming a single row in inserted. Update multiple synthetic rows in a single statement. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
Incorrect Answers
A:
“Test a controlled update in a test database” addresses the trigger recursive update protection situation—unexpected recursive firing causes repeated work. The observed failure is: Trigger was written assuming a single row in inserted. Update multiple synthetic rows in a single statement. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
B:
“Induce an error after the first update in a disposable database” concerns Partial updates violate business invariants; the reported problem instead is Trigger was written assuming a single row in inserted. Update multiple synthetic rows in a single statement. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
C:
“Pass a synthetic batch and compare with individual calls” concerns Network round trips dominate request time; the reported problem instead is Trigger was written assuming a single row in inserted. Update multiple synthetic rows in a single statement. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
Question 129
Horizon Communications is responsible for an Azure SQL or Microsoft SQL workload. An UPDATE trigger logs each modified row incorrectly when batches contain many rows. Operational evidence: Trigger was written assuming a single row in inserted. Which acceptance result most directly demonstrates the requirement has been satisfied?
- The operation terminates once without duplicate side effects
- Batch updates match expected rows with fewer round trips
- Exactly one correct audit record per affected row is created
- Correct rows return with more accurate plan estimates
Explanation
Correct Answer
C:
Trigger was written assuming a single row in inserted. Exactly one correct audit record per affected row is created. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
Incorrect Answers
A:
“The operation terminates once without duplicate side effects” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Trigger was written assuming a single row in inserted. Exactly one correct audit record per affected row is created. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
B:
“Batch updates match expected rows with fewer round trips” concerns Network round trips dominate request time; the reported problem instead is Trigger was written assuming a single row in inserted. Exactly one correct audit record per affected row is created. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
D:
“Correct rows return with more accurate plan estimates” concerns A multi-statement function performs slow intermediate table processing; the reported problem instead is Trigger was written assuming a single row in inserted. Exactly one correct audit record per affected row is created. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
Question 130
At Brookfield Labs, an UPDATE trigger logs each modified row incorrectly when batches contain many rows. The observed constraint is: Trigger was written assuming a single row in inserted. What operational condition would provide the earliest useful regression warning?
- Monitor nested trigger failures and recursion errors
- Monitor parameter sensitivity and function regressions
- Monitor batch size and lock duration
- Monitor trigger duration and log growth
Explanation
Correct Answer
D:
Trigger was written assuming a single row in inserted. Monitor trigger duration and log growth. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
Incorrect Answers
A:
“Monitor nested trigger failures and recursion errors” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Trigger was written assuming a single row in inserted. Monitor trigger duration and log growth. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
B:
“Monitor parameter sensitivity and function regressions” concerns A multi-statement function performs slow intermediate table processing; the reported problem instead is Trigger was written assuming a single row in inserted. Monitor trigger duration and log growth. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.
C:
“Monitor batch size and lock duration” concerns Network round trips dominate request time; the reported problem instead is Trigger was written assuming a single row in inserted. Monitor trigger duration and log growth. INSERTED and DELETED may hold many affected rows. Set-based joins over those pseudo-tables handle multi-row UPDATE/INSERT operations correctly.