Error :
- sp_cdc_enable_table – Error 6517: Failed to create AppDomain
Scenario :
- Working with a Change Data Capture (CDC) on few tables in a database with the below script:
USE [my_db]
GO
--Enable CDC on the database
EXEC sys.sp_cdc_enable_db
GO
--Enable CDC on the dbo.Wikitechy_table table
EXEC sys.sp_cdc_enable_table @source_schema = N'dbo'
,@source_name = N'Wikitechy_table'
,@role_name = NULL
,@supports_net_changes = 1;
--Change the retention time to 14 days
EXECUTE sys.sp_cdc_change_job @job_type = N'cleanup'
,@retention = 20160; --20160 minutes = 7 days
Error :
Msg 22832, Level 16, State 1, Procedure sp_cdc_enable_table_internal, Line 630.
Could not update the metadata that indicates table [dbo].[Wikitechy_table] is enabled for Change Data Capture. The failure occurred when executing the command ‘sp_cdc_create_change_enumeration_functions’. The error returned was 6517: ‘Failed to create AppDomain “mssqlsystemresource.dbo[runtime].1”.
- Exception has been thrown by the target of an invocation.’. Use the action and error to determine the cause of the failure and resubmit the request.
Reason for the error:
- Renaming the remote server raised this error. The error may occur even due to improper windows operating system version.
Fix 1 :
- Perform SQL Server Patch updates.
- Perform Windows patch updates.
- Update the renamed server names via sp_addserver command.
- Finally perform a system restart.
Fix 2 :
- Ensure that a patch for .NET is performed. Else perform it and reboot the system to avoid any errors.
Applies to sqlserver version :
- SQL Server 7.0 OLAP Tools
- SQL Server 2000 64-bit Edition
Related Error Tags :
- sql - Error while enabling CDC on table level
- Using Change Data Capture (CDC) in SQL Server 2008
- Change Data Capture - sys.sp_cdc_enable_db not creating CDC system tables properly
- ssis - How to fix the error 'Failed to create appdomain ssisdb.dbo