-- COOOOOOOOOOOK ONEMLI EGER SISTEMINIZDE CLR kurulmus ise, once CLR procedurelarini silin, sonra Assemblies Siliyoruz.
https://www.youtube.com/watch?v=IJbAhfFRHdA -- Detaylı olan https://www.youtube.com/watch?v=wSQ1GXEwAUQ -- Kısa ve özet https://www.simple-talk.com/sql/learn-sql-server/introduction-to-change-data-capture-(cdc)-in-sql-server-2008/ -- makale Pinal Dave CDC is two level 1- Önce, üzerinde CDC olan database var mı onu kontrol edelim
NOT1: ALYWAS ON VARSA SYNCRONUS MODDAN ASYNCRONOUS MODA ÇEK !!!! NOT2: EGER VERITABANI UZERINDE SEMA DEGISIKLIKLERINI KONTROL EDEN BIR DATABASE TRGGIER VARSA MUTLAKA KAPAT !!!!!
DATABASE ENABLE ve DISABLE etmek EXECUTE sys.sp_cdc_enable_db; GO EXECUTE sys.sp_cdc_disable_db; GO
USE master GO SELECT [NAME], database_id, is_cdc_enabled FROM sys.databases GO 2- CDC 2 step dir. DB level ve table level -- Step 1- DATABASE LEVEL
-- ENABLE FOR DATABASE EXEC sys.sp_cdc_enable_db
-- System Tables altında bazı tablolar oluşturulur cdc.captured_columns -- This table returns result for list of captured column. cdc.change_tables -- This table returns list of all the tables which are enabled for capture. cdc.ddl_history -- This table contains history of all the DDL changes since capture data enabled. cdc.index_columns -- This table contains indexes associated with change table. cdc.lsn_time_mapping -- This table maps LSN number (for which we will learn later) and time.
-- A DISABLE FOR DATABASE EXEC sys.sp_cdc_disable_db
-- Step 2- TABLE LEVEL -- Önce track edilen tablo var mı kontrol ederiz. USE AdventureWorks GO SELECT [NAME], is_tracked_by_cdc FROM sys.tables GO
-- DISABLE FOR TABLE USE AtlantisDB GO EXEC sys.sp_cdc_disable_table @source_schema = N'dbo', @source_name = N'CandidateQulificationTempTable', @capture_instance = N'dbo_CandidateQulificationTempTable' GO