exam questions

Exam 70-767 All Questions

View all questions & answers for the 70-767 exam

Exam 70-767 topic 1 question 122 discussion

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

You are developing a Microsoft SQL Server Integration Service (SSIS) package. You enable the SSIS log provider for the Windows event log. You configure the package to use the ScriptTaskLogEntry event. You create a custom Script task.
You need to ensure that when the script completes, it writes the execution status to the event log on the server that hosts SSIS.
Which code segment should you add to the Script task?

  • A. System.Diagnostics.EventLog.WriteEntry("SSIS", "Script executed with return result" + ScriptResults.Success, System.Diagnostics.EventLogEntrytype.Information)
  • B. System.Diagnostics.EventLog.WriteEntry("SSIS", "Script executed with return result" + Dts.TaskResult, System.Diagnostics.EventLogEntryType.Information)
  • C. Dts.TaskResult = (int)ScriptResults.Failure
  • D. Dts.Events.FireInformation(0, "SSIS", "Script executed with return result" + Dts.TaskResult, String.Empty, 0)
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
References:
https://support.microsoft.com/en-gb/help/906560/how-to-write-information-to-the-application-event-log-by-using-a-scrip

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
DudeHere
Highly Voted 4 years, 5 months ago
answer is correct
upvoted 5 times
Mahmoudr
4 years, 4 months ago
which answer
upvoted 1 times
...
...
kma_goal
Most Recent 4 years, 10 months ago
I think correct answer is C
upvoted 2 times
eceb
4 years, 9 months ago
why?? could you be more specific? "You need to ensure that when the script completes, it writes the execution status to the event log on the server that hosts SSIS". if you use Dts.TaskResult = (int)ScriptResults.Failure the task will always return failure, not the real execution status.
upvoted 7 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