PdfPrep.com

Which stored procedure should you execute first?

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 this series. Information and details provided in a question apply only to that

question.

You have a database named DB1.

You need to track auditing data for four tables in DB1 by using change data capture.

Which stored procedure should you execute first?
A . catalog.deploy_project
B . catalog.restore_project
C . catalog.stop_operation
D . sys.sp_cdc_add_job
E . sys.sp_cdc_change_job
F . sys.sp_cdc_disable_db

Answer: D

Explanation:

Because the cleanup and capture jobs are created by default, the sys.sp_cdc_add_job stored procedure is necessary only when a job has been explicitly dropped and must be recreated.

Note: sys.sp_cdc_add_job creates a change data capture cleanup or capture job in the current database. A cleanup job is created using the default values when the first table in the database is enabled for change data capture. A capture job is created using the default values when the first table in the database is enabled for change data capture and no transactional publications exist for the database. When a transactional publication exists, the transactional log reader is used to drive the capture mechanism, and a separate capture job is neither required nor allowed.

Note: sys.sp_cdc_change_job

References: https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/track-data-changes-sqlserver

Exit mobile version