exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 96 discussion

Actual exam question from Microsoft's 70-762
Question #: 96
Topic #: 1
[All 70-762 Questions]

DRAG DROP -
You have two databases with the following settings:

You run the following Transact ""SQL statements:

You need to select data from DiskTable and insert the data into MemTable. You must complete the insertion operation into MemTable as an explicit transaction without immediate durability.
Which four Transact-SQL segments should you use? To answer, move the appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: BEGIN TRANSACTION -

Box 2: UPDATE "¦ #Disktable -
Box 3: IF"¦ SELECT INTO "¦#Disktable
Box 4: .. DELAYED_DURABILITY = ON
The COMMIT syntax is extended so you can force delayed transaction durability. If DELAYED_DURABILITY is DISABLED or FORCED at the database level (see above) this COMMIT option is ignored.
Syntax:
COMMIT [ { TRAN | TRANSACTION } ] [ transaction_name | @tran_name_variable ] ] [ WITH ( DELAYED_DURABILITY = { OFF | ON } ) ]
References:
https://docs.microsoft.com/en-us/sql/relational-databases/logs/control-transaction-durability?view=sql-server-2017

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
EdwardWang
Highly Voted 5 years, 6 months ago
Switch Answer Area 2 and 3
upvoted 39 times
Andy7622
4 years, 8 months ago
so many upvotes . Can anyone explain why , please?
upvoted 1 times
databasejamdown
4 years, 8 months ago
You need to to drop and populate the temp table #DiskTable first because you use it to filter tme memory optimized table
upvoted 5 times
...
...
...
CBlaster
Most Recent 4 years, 6 months ago
EdwardWang is correct, switch 2 and 3. To migrate a disk-table to a memory optimized one, irrelevant of the MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT option, you need to pass the data to a table variable or a temporary table, since it is located in a different DB.
upvoted 4 times
geekeek1
4 years, 5 months ago
Agreed
upvoted 1 times
...
...
TrungMyLanTJ
4 years, 8 months ago
Can anyone explain why do we have to use temp table here ?
upvoted 1 times
giuPigna
4 years, 7 months ago
https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/cross-database-queries?view=sql-server-ver15 "You cannot easily copy data from a table in one database, to a memory-optimized table in another database". In fact the tables are stored in 2 different databases.
upvoted 7 times
HA2020
4 years, 5 months ago
where does it say in the question that there are 2 databases?
upvoted 1 times
HA2020
4 years, 5 months ago
just noticed the 'use db_name'
upvoted 1 times
...
...
...
...
Lukis92
4 years, 10 months ago
We don't need to use temp table, because database supports explicit transaction cross-container - MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT = ON.
upvoted 1 times
databasejamdown
4 years, 8 months ago
That's what I thought also, but I am not seeing any other compination of answers that make sense
upvoted 1 times
...
...
JohnFan
5 years, 3 months ago
Temporary tables are named either with # or ## as a prefix for local or global temporary objects, respectively.
upvoted 2 times
...
Bartek
5 years, 4 months ago
" .. without immediate durability." shouldnt the last part be ".. OFF" despite of "..ON" ?
upvoted 1 times
Froze
5 years, 2 months ago
It's OK. Should be ON. If you set the DELAYED_DURABILITY=ON SQL Server reduces frequency of flushing log records to disk. So without immediate durability.
upvoted 6 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 ...