exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 45 discussion

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

Note: this question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in the series. Information and details provided in a question apply only to that question.
You are developing and application to track customer sales.
You need to create an object that meet the following requirements:
- Run managed code packaged in an assembly that was created in the Microsoft.NET Framework and uploaded in Microsoft SQL Server.
- Run within a transaction and roll back if a future occurs.
- Run when a table is created or modified.
What should you create?

  • A. extended procedure
  • B. CLR procedure
  • C. user-defined procedure
  • D. DML trigger
  • E. scalar-valued function
  • F. table-valued function
  • G. DDL trigger
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
The common language runtime (CLR) is the heart of the Microsoft .NET Framework andprovides the execution environment for all .NET Framework code. Code that runs within the CLR is referred to as managed code.
With the CLR hosted in Microsoft SQL Server (called CLR integration), you can author stored procedures, triggers, user-defined functions, user-defined types, and user-defined aggregates in managed code. Because managed code compiles to native code prior to execution, you can achieve significant performance increases in some scenarios.

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
Jay2
Highly Voted 5 years ago
DDL Trigger fo sho
upvoted 18 times
Luzix
4 years, 7 months ago
I think so
upvoted 1 times
...
...
Supersevi
Highly Voted 5 years, 2 months ago
Sorry, didn't see the requireent "Run when a table is created or modified", Same opinion than Froze should be DDL trigger. https://docs.microsoft.com/en-us/sql/relational-databases/triggers/ddl-triggers?view=sql-server-2017
upvoted 12 times
Luzix
4 years, 7 months ago
I think so
upvoted 1 times
...
...
Supersevi
Most Recent 5 years, 2 months ago
I think should be DML trigger. A CLR Trigger is a type of DML trigger that can be either an AFTER or INSTEAD OF trigger. A CLR trigger can also be a DDL trigger. Instead of executing a Transact-SQL stored procedure, a CLR trigger executes one or more methods written in managed code that are members of an assembly created in the .NET Framework and uploaded in SQL Server. https://docs.microsoft.com/en-us/sql/relational-databases/triggers/dml-triggers?view=sql-server-2017
upvoted 2 times
Hoglet
4 years, 6 months ago
DDL Trigger, not DML. Creating or modifying a table is a Data Definition action (DDL)
upvoted 3 times
...
...
SzalonyZielonyRobak
5 years, 3 months ago
Yep - it is correct. CLR (Common Language Runtime) trigger is a piece of code in .Net Framework that run other part of .Net Framework code - classes, methods etc. It will be slower then T-SQL triggers, but more powerfull. https://docs.microsoft.com/pl-pl/sql/database-engine/dev-guide/clr-triggers?view=sql-server-2014
upvoted 3 times
Froze
5 years, 2 months ago
Pointed answer (B) is CLR >procedure< - not a CLR trigger. Correct answer is CLR Trigger (DDL), but there is no such option. Maybe it will be available on real exam, so be prepared. If no, I would answer DDL trigger.
upvoted 16 times
BabyBee
4 years, 5 months ago
CLR DDL Trigger Instead of executing a Transact-SQL stored procedure, a CLR trigger executes one or more methods written in managed code that are members of an assembly created in the .NET Framework and uploaded in SQL Server. DDL triggers fire only after the DDL statements that trigger them are run. DDL triggers cannot be used as INSTEAD OF triggers. DDL triggers do not fire in response to events that affect local or global temporary tables and stored procedures. DDL triggers do not create the special inserted and deleted tables.
upvoted 3 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 ...