Quantcast
Channel: SQL Server Setup & Upgrade forum
Viewing all articles
Browse latest Browse all 5760

Configuring Change Data Capture

$
0
0

Hey All,

I am new to administrating SQL servers and have been tasked with enabling change data capture after all the data one of our critical tables was somehow deleted.  I was directed to this link by a coworker, but he has never enabled CDC before and wished me good luck.  The document has helped me get to the point where I am ready to enable CDC on the table itself, but I am confused about the gating roles setting and how to configure it for my users.  I would like to make it so that anyone with the ability to write to the table is tracked, but I don't want to limit myself to only those people in that role.  I would like admins to be tracked as well for security reasons.

Here is an example of the command I need to execute:

USE MyDB  
GO  
EXEC sys.sp_cdc_enable_table  
@source_schema = N'database1',  
@source_name   = N'dataTable',  
@role_name     = N'MyRole',  
@supports_net_changes = 1  
GO

Should I worry about specifying the gating role, or should I list it as NULL?  Does NULL apply the tracking to everyone or no one?  Also, I may have to apply this to multiple tables.   Can I chain the tables in the source name or should I run this command for each table?

Thank you for your help and I look forward to your responses.


Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


Viewing all articles
Browse latest Browse all 5760

Latest Images

Trending Articles

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>