exam questions

Exam DP-203 All Questions

View all questions & answers for the DP-203 exam

Exam DP-203 topic 2 question 101 discussion

Actual exam question from Microsoft's DP-203
Question #: 101
Topic #: 2
[All DP-203 Questions]

DRAG DROP
-

You are batch loading a table in an Azure Synapse Analytics dedicated SQL pool.

You need to load data from a staging table to the target table. The solution must ensure that if an error occurs while loading the data to the target table, all the inserts in that batch are undone.

How should you complete the Transact-SQL code? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
[Removed]
Highly Voted 1 year, 11 months ago
Given answer is wrong. It should be BEGIN TRAN as SQL pool in Azure Synapse Analytics does not support distributed transaction. https://learn.microsoft.com/en-us/azure/synapse-analytics/sql-data-warehouse/sql-data-warehouse-develop-transactions "Limitations SQL pool does have a few other restrictions that relate to transactions. They are as follows: No distributed transactions No nested transactions permitted No save points allowed No named transactions No marked transactions No support for DDL such as CREATE TABLE inside a user-defined transaction " Distributed Transactions are only allowed in SQL Server and Azure SQL Managed Instance: https://learn.microsoft.com/de-de/sql/t-sql/language-elements/begin-distributed-transaction-transact-sql?view=sql-server-ver16
upvoted 33 times
...
janaki
Highly Voted 1 year, 10 months ago
Its BEGIN TRAN then ROLLBACK TRAN
upvoted 12 times
...
17c5d1e
Most Recent 5 months, 2 weeks ago
The answers they provide here are a joke. The soltuion is Begin Tran not Begin Distributed Transaction. https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/develop-transactions
upvoted 1 times
...
e56bb91
9 months, 1 week ago
ChatGPT 4o code: BEGIN TRANSACTION; BEGIN TRY -- Insert data from staging table to target table INSERT INTO target_table (column1, column2, ...) SELECT column1, column2, ... FROM staging_table; -- Commit the transaction if no error occurs COMMIT TRANSACTION; END TRY BEGIN CATCH -- Rollback the transaction if an error occurs ROLLBACK TRANSACTION; -- Optionally, you can log the error or re-throw it -- SELECT ERROR_MESSAGE() AS ErrorMessage; -- THROW; END CATCH;
upvoted 1 times
...
Alongi
1 year, 2 months ago
BEGIN TRAN ROLLBACK TRAN
upvoted 1 times
...
be8a152
1 year, 2 months ago
BEGIN TRAN & ROLLBACK TRAN
upvoted 1 times
...
[Removed]
1 year, 3 months ago
It should be BEGIN TRAN and ROLLBACK TRAN
upvoted 1 times
...
kkk5566
1 year, 7 months ago
BEGIN TRAN ROLLBACK TRAN
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago