Error while configuring Change Data Capture (CDC) on Sql Server 2008
- Posted by Sqltimes
- On October 15, 2012
- 0 Comments
A few days ago, I was setting up Change Data Capture (CDC) on a new database on my machine and I ran into this error.
[sourcecode language=”sql”]
Msg 22830, Level 16, State 1, Procedure sp_cdc_enable_db_internal, Line 186
Could not update the metadata that indicates database ‘MyDB’ is enabled for Change Data Capture.
The failure occurred when executing the command ‘SetCDCTracked(Value = 1)’.
The error returned was 15404: ‘Could not obtain information about Windows NT group/user ‘AD\Sql1′, error code 0x6e.’.
Use the action and error to determine the cause of the failure and resubmit the request.
Msg 266, Level 16, State 2, Procedure sp_cdc_enable_db_internal, Line 0
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements.
Previous count = 0, current count = 1.
Msg 266, Level 16, State 2, Procedure sp_cdc_enable_db, Line 0
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1.
Msg 3998, Level 16, State 1, Line 1
Uncommittable transaction is detected at the end of the batch. The transaction is rolled back.
[/sourcecode]
This database ‘MyDatabase’ is created using domain account ‘AD\Sql1’ and I am setting up CDC using the same domain account (Windows Authentication). But for some reason CDC could not be enabled on this database. If you check the properties of this database you can see that the owner of this database is still ‘AD\Sql1’.
I am not sure why it is not able to obtain information about this domain account, but once I changed the owner from domain account to ‘sa’, it works !!
[sourcecode language=”sql”]
EXEC sys.sp_changedbowner ‘sa’
[/sourcecode]
Then try this and it works:
[sourcecode language=”sql”]
EXECUTE sys.sp_cdc_enable_db
[/sourcecode]
I need to figure out why this error happens and why changing the owner to ‘sa’ works.
Hope this helps,
0 Comments