Microsoft DP-800 Practice Test 12
Question 110
A database engineer at Seabrook University is investigating this case: A scalar function calculates a per-row discount on millions of rows. The relevant finding is: Row-by-row scalar execution can hurt throughput. What operational condition would provide the earliest useful regression warning?
- Monitor broken dependencies after deployment
- Monitor procedure version compatibility and failures
- Monitor parameter sensitivity and function regressions
- Monitor function CPU and query-plan regressions
Explanation
Correct Answer
D:
Row-by-row scalar execution can hurt throughput. Monitor function CPU and query-plan regressions. Scalar UDF inlining can let the optimizer account for eligible function logic in the calling query; non-inlineable row-by-row execution may otherwise dominate runtime.
Incorrect Answers
A:
“Monitor broken dependencies after deployment” concerns The view depends on an unstable schema; the reported problem instead is Row-by-row scalar execution can hurt throughput. Monitor function CPU and query-plan regressions. Scalar UDF inlining can let the optimizer account for eligible function logic in the calling query; non-inlineable row-by-row execution may otherwise dominate runtime.
B:
“Monitor procedure version compatibility and failures” concerns Client parses messages rather than explicit output fields; the reported problem instead is Row-by-row scalar execution can hurt throughput. Monitor function CPU and query-plan regressions. Scalar UDF inlining can let the optimizer account for eligible function logic in the calling query; non-inlineable row-by-row execution may otherwise dominate runtime.
C:
“Monitor parameter sensitivity and function regressions” concerns A multi-statement function performs slow intermediate table processing; the reported problem instead is Row-by-row scalar execution can hurt throughput. Monitor function CPU and query-plan regressions. Scalar UDF inlining can let the optimizer account for eligible function logic in the calling query; non-inlineable row-by-row execution may otherwise dominate runtime.
Question 111
Atlas Publishing is responsible for an Azure SQL or Microsoft SQL workload. A reporting API passes customer IDs to a reusable row-filtering routine. Operational evidence: A multi-statement function performs slow intermediate table processing. What initial check best narrows the technical cause without altering business data?
- Inspect function body and execution-plan inlining behavior
- Inspect trigger use of inserted and deleted sets
- Inspect estimates and cardinality for the current function
- Inspect nesting settings and trigger side effects
Explanation
Correct Answer
C:
A multi-statement function performs slow intermediate table processing. Inspect estimates and cardinality for the current function. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Incorrect Answers
A:
“Inspect function body and execution-plan inlining behavior” concerns Row-by-row scalar execution can hurt throughput; the reported problem instead is A multi-statement function performs slow intermediate table processing. Inspect estimates and cardinality for the current function. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
B:
“Inspect trigger use of inserted and deleted sets” concerns Trigger was written assuming a single row in inserted; the reported problem instead is A multi-statement function performs slow intermediate table processing. Inspect estimates and cardinality for the current function. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
D:
“Inspect nesting settings and trigger side effects” concerns Unexpected recursive firing causes repeated work; the reported problem instead is A multi-statement function performs slow intermediate table processing. Inspect estimates and cardinality for the current function. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Question 112
At Mountainview Realty, a reporting API passes customer IDs to a reusable row-filtering routine. The observed constraint is: A multi-statement function performs slow intermediate table processing. 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
- Define a view exposing only the approved columns and row predicate
- Accept a user-defined table type as a table-valued parameter where supported
Explanation
Correct Answer
A:
A multi-statement function performs slow intermediate table processing. Rewrite suitable logic as an inline table-valued function. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Incorrect Answers
B:
“Rewrite trigger logic as set-based operations over inserted and deleted” concerns Trigger was written assuming a single row in inserted; the reported problem instead is A multi-statement function performs slow intermediate table processing. Rewrite suitable logic as an inline table-valued function. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
C:
“Define a view exposing only the approved columns and row predicate” concerns Direct SELECT on base table exposes extra fields; the reported problem instead is A multi-statement function performs slow intermediate table processing. Rewrite suitable logic as an inline table-valued function. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
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 A multi-statement function performs slow intermediate table processing. Rewrite suitable logic as an inline table-valued function. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Question 113
A database engineer at Willow Creek Finance is investigating this case: A reporting API passes customer IDs to a reusable row-filtering routine. The relevant finding is: A multi-statement function performs slow intermediate table processing. What isolated pilot would provide the strongest evidence before rollout?
- Pass a synthetic batch and compare with individual calls
- Query the view using a low-privileged test account
- Exercise a controlled update in a test database
- Compare test execution plans under small and large parameter sets
Explanation
Correct Answer
D:
A multi-statement function performs slow intermediate table processing. Compare test execution plans under small and large parameter sets. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Incorrect Answers
A:
“Pass a synthetic batch and compare with individual calls” concerns Network round trips dominate request time; the reported problem instead is A multi-statement function performs slow intermediate table processing. Compare test execution plans under small and large parameter sets. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
B:
“Query the view using a low-privileged test account” concerns Direct SELECT on base table exposes extra fields; the reported problem instead is A multi-statement function performs slow intermediate table processing. Compare test execution plans under small and large parameter sets. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
C:
“Exercise a controlled update in a test database” concerns Unexpected recursive firing causes repeated work; the reported problem instead is A multi-statement function performs slow intermediate table processing. Compare test execution plans under small and large parameter sets. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Question 114
Granite Ridge Technology is responsible for an Azure SQL or Microsoft SQL workload. A reporting API passes customer IDs to a reusable row-filtering routine. Operational evidence: A multi-statement function performs slow intermediate table processing. Which acceptance result most directly demonstrates the requirement has been satisfied?
- Results match and plan avoids unnecessary function overhead
- Exactly one correct audit record per affected row is created
- Correct rows return with more accurate plan estimates
- Inputs remain data and only intended rows are accessed
Explanation
Correct Answer
C:
A multi-statement function performs slow intermediate table processing. Correct rows return with more accurate plan estimates. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Incorrect Answers
A:
“Results match and plan avoids unnecessary function overhead” concerns Row-by-row scalar execution can hurt throughput; the reported problem instead is A multi-statement function performs slow intermediate table processing. Correct rows return with more accurate plan estimates. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
B:
“Exactly one correct audit record per affected row is created” concerns Trigger was written assuming a single row in inserted; the reported problem instead is A multi-statement function performs slow intermediate table processing. Correct rows return with more accurate plan estimates. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
D:
“Inputs remain data and only intended rows are accessed” concerns Unsafe concatenation risks SQL injection; the reported problem instead is A multi-statement function performs slow intermediate table processing. Correct rows return with more accurate plan estimates. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Question 115
At Pinecrest Operations, a reporting API passes customer IDs to a reusable row-filtering routine. The observed constraint is: A multi-statement function performs slow intermediate table processing. What operational condition would provide the earliest useful regression warning?
- Monitor underlying schema changes that break the view
- Monitor parameter sensitivity and function regressions
- Monitor trigger duration and log growth
- Monitor function CPU and query-plan regressions
Explanation
Correct Answer
B:
A multi-statement function performs slow intermediate table processing. Monitor parameter sensitivity and function regressions. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Incorrect Answers
A:
“Monitor underlying schema changes that break the view” concerns Direct SELECT on base table exposes extra fields; the reported problem instead is A multi-statement function performs slow intermediate table processing. Monitor parameter sensitivity and function regressions. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
C:
“Monitor trigger duration and log growth” concerns Trigger was written assuming a single row in inserted; the reported problem instead is A multi-statement function performs slow intermediate table processing. Monitor parameter sensitivity and function regressions. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
D:
“Monitor function CPU and query-plan regressions” concerns Row-by-row scalar execution can hurt throughput; the reported problem instead is A multi-statement function performs slow intermediate table processing. Monitor parameter sensitivity and function regressions. An inline table-valued function presents its query to the optimizer without the opaque intermediate table of many multi-statement TVFs, improving cardinality planning.
Question 116
A database engineer at Marigold Banking is investigating this case: A service constructs dynamic SQL from user input. The relevant finding is: Unsafe concatenation risks SQL injection. What initial check best narrows the technical cause without altering business data?
- Inspect query input handling and EXEC statements
- Inspect nesting settings and trigger side effects
- Review transaction start/commit boundaries and error handling
- Inspect estimates and cardinality for the current function
Explanation
Correct Answer
A:
Unsafe concatenation risks SQL injection. Inspect query input handling and EXEC statements. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
Incorrect Answers
B:
“Inspect nesting settings and trigger side effects” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Unsafe concatenation risks SQL injection. Inspect query input handling and EXEC statements. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
C:
“Review transaction start/commit boundaries and error handling” concerns Partial updates violate business invariants; the reported problem instead is Unsafe concatenation risks SQL injection. Inspect query input handling and EXEC statements. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
D:
“Inspect estimates and cardinality for the current function” concerns A multi-statement function performs slow intermediate table processing; the reported problem instead is Unsafe concatenation risks SQL injection. Inspect query input handling and EXEC statements. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
Question 117
Riverbend Retail 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. Which proposed change is the most suitable response to the observed constraint?
- Accept a user-defined table type as a table-valued parameter where supported
- Return a stable output parameter or resultset contract
- Use parameterized sp_executesql or stored procedure parameters
- Avoid self-updating trigger design or add explicit guards as appropriate
Explanation
Correct Answer
C:
Unsafe concatenation risks SQL injection. Use parameterized sp_executesql or stored procedure parameters. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
Incorrect Answers
A:
“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 Unsafe concatenation risks SQL injection. Use parameterized sp_executesql or stored procedure parameters. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
B:
“Return a stable output parameter or resultset contract” concerns Client parses messages rather than explicit output fields; the reported problem instead is Unsafe concatenation risks SQL injection. Use parameterized sp_executesql or stored procedure parameters. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
D:
“Avoid self-updating trigger design or add explicit guards as appropriate” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Unsafe concatenation risks SQL injection. Use parameterized sp_executesql or stored procedure parameters. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
Question 118
At Prairie Logistics, a service constructs dynamic SQL from user input. The observed constraint is: Unsafe concatenation risks SQL injection. What isolated pilot would provide the strongest evidence before rollout?
- Call procedure with test values and capture declared outputs
- Submit benign quote-containing and injection-like test strings
- Exercise a controlled update in a test database
- Attempt a controlled breaking schema change in a test project
Explanation
Correct Answer
B:
Unsafe concatenation risks SQL injection. Submit benign quote-containing and injection-like test strings. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
Incorrect Answers
A:
“Call procedure with test values and capture declared outputs” concerns Client parses messages rather than explicit output fields; the reported problem instead is Unsafe concatenation risks SQL injection. Submit benign quote-containing and injection-like test strings. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
C:
“Exercise a controlled update in a test database” concerns Unexpected recursive firing causes repeated work; the reported problem instead is Unsafe concatenation risks SQL injection. Submit benign quote-containing and injection-like test strings. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
D:
“Attempt a controlled breaking schema change in a test project” concerns The view depends on an unstable schema; the reported problem instead is Unsafe concatenation risks SQL injection. Submit benign quote-containing and injection-like test strings. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
Question 119
A database engineer at Silverpine Labs is investigating this case: A service constructs dynamic SQL from user input. The relevant finding is: Unsafe concatenation risks SQL injection. Which acceptance result most directly demonstrates the requirement has been satisfied?
- Batch updates match expected rows with fewer round trips
- Inputs remain data and only intended rows are accessed
- Correct rows return with more accurate plan estimates
- Results match allowed fields and unauthorized columns remain inaccessible
Explanation
Correct Answer
B:
Unsafe concatenation risks SQL injection. Inputs remain data and only intended rows are accessed. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
Incorrect Answers
A:
“Batch updates match expected rows with fewer round trips” concerns Network round trips dominate request time; the reported problem instead is Unsafe concatenation risks SQL injection. Inputs remain data and only intended rows are accessed. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
C:
“Correct rows return with more accurate plan estimates” concerns A multi-statement function performs slow intermediate table processing; the reported problem instead is Unsafe concatenation risks SQL injection. Inputs remain data and only intended rows are accessed. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
D:
“Results match allowed fields and unauthorized columns remain inaccessible” concerns Direct SELECT on base table exposes extra fields; the reported problem instead is Unsafe concatenation risks SQL injection. Inputs remain data and only intended rows are accessed. Parameterized dynamic SQL separates user values from SQL syntax, preventing malicious text from being executed as a new command.
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.