Red Gate forums :: View topic - Change Data Capture (cdc) System Tables aren't being created
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

Change Data Capture (cdc) System Tables aren't being created

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
bobkaine



Joined: 28 Oct 2013
Posts: 4

PostPosted: Mon Oct 28, 2013 6:51 pm    Post subject: Change Data Capture (cdc) System Tables aren't being created Reply with quote

We're using CDC for audit purposes.

When I create a new deployment package by right clicking the database in SSMS and select 'Publish [dbname] for Deployment', the package created doesn't include the CDC system tables.

Code:

2013-10-28 13:30:37 -04:00 DEBUG  Creating [cdc].[fn_cdc_get_all_changes_dbo_TchApplicationRole]
2013-10-28 13:30:37 -04:00 ERROR  Error while executing job: Create failed
Invalid object name 'cdc.dbo_TchApplicationRole_CT'.


As you can see above, it's attempting to create the CDC function, but since the function references the CDC tables that weren't created it fails.

How do I "fix" this?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1112
Location: My desk.

PostPosted: Thu Oct 31, 2013 1:47 pm    Post subject: Reply with quote

Hi,

The problem here is that our SQL Compare engine (which underpins DM and several other tools we provide) doesn't currently support handling System level objects.

Because of this, the relevant objects will need to be created by some other method before you deploy.

If you don't have many target DB's to deploy to, and they are likely to stay in place once initially configured, then it's perhaps easiest to manually create the system objects CDC requires.

If you're likely to deploy to more systems, then it would be more useful to include a "PreDeploy.ps1" powershell script in your package that would check for, and create if not present, the required objects by executing a query via SQLCMD.
Back to top
View user's profile Send private message
bobkaine



Joined: 28 Oct 2013
Posts: 4

PostPosted: Thu Oct 31, 2013 2:01 pm    Post subject: Reply with quote

Thanks for the quick response.

I was kind of suspecting something similar.

I'll determine which approach you suggested will work the best and proceed from there.

Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group