98-364 Exam QuestionsBrowse all questions from this exam

98-364 Exam - Question 157


You manage a SQL Server 2008 server that hosts a database named Sales.

Unauthorized modifications to some tables within the Sales database have resulted in some views no longer working.

You need to implement a method that will ensure that all modifications to any objects with the Sales database are logged.

What should you do?

Show Answer
Correct Answer: A

To ensure that all modifications to any objects within the Sales database are logged, you should create a DDL trigger with database scope. DDL (Data Definition Language) triggers are designed to log or act upon changes to the database schema, such as table modifications, which is the concern mentioned in the question. This type of trigger will capture events like CREATE, ALTER, and DROP statements at the database level. Therefore, for logging modifications to the database structure, a DDL trigger with database scope is the appropriate choice.

Discussion

2 comments
Sign in to comment
Buzzardonic
Jul 14, 2021

Surely the answer is B, as you would be logging the modification to a separate table using DML? Or is the question asking which of DDL and DML you would use to create the trigger?

wheredajuice
Jul 29, 2021

No it's DDL, because when you modify a table so that some views cease to work, you have used DDL to modify that table. If you just used DML to modify data in the table, the views would still work.