 Hello, welcome to SSUnitech, social decide and this is continuation of SSIH tutorial. So today we gonna discuss about change data capture with initial load. If you haven't watched last video of this video series, so I would strongly recommend to watch that video where you can understand about the CDC and how we can enable the CDC at the database level as well as at the table level. So what is initial load? So it load all the data from the source to destination. So go to on SSMS and here as you can see this is our source table. So once our package will be executed then all these 12 rows will move to our destination and in our destination we don't have any data right now. So this is our plan. So here we need to use CDC control task. So what is CDC control task? So CDC control task is used to control the life cycle of CDC. It supports two different type of operations. First is synchronize of initial load and change processing. Second management of processing range and it will also deal with the error scenarios and recovery. So go to on SSGT to implement the package and understand. Let's create one more package. Then call this package as CDC initial load. Then here I used to use CDC control task. So that is all available over here. So I want to use CDC control task one and this is our second CDC control task. In between we need to use a data flow task. So these are the required tasks for the initial load. So first CDC control task source our package going to start and then our second will source our package as end. So before configuring CDC control task and data flow task I want to create connection managers. So right click and create a new OLEDB connection. And I would like to connect with SS unit that is fine click on OK. So I would like to rename this is for the source and let me create one more OLEDB connection for the same database and this time this is for the destination. Here we need to notice one thing for this CDC control task we need to create a connection manager with ADO.NET because it will accept only ADO.NET connection. Then new connection here we need to specify server name. So this is our server name that is fine and we want to connect with SS unit click on OK then I would like to click on OK. So this is for CDC control task. So I would like to rename this with CDC. Now let me configure CDC control task for start now double click on this CDC control task. So here as we can see SQL server CDC database ADO.NET connection manager. So by default we are having CDC because here we are having only one ADO.NET connection manager that is why by default we are having connection manager. Then we can see CDC control operations. So here we are having five control operations first is the mark initial load start. So this is for the record the log sequence number in the source database before initial load reads any data from the source table. So I am very happy to use this one and in our second we are having mark initial load end. So it will record log sequence number in the source database after initial load would be done. Next as we can see mark CDC start. So it will record the log sequence number and indicates the changes processing should start from the point forward. Next we can see get processing range. So it is used before a data flow so that CDC source knows what log sequence number should be read from. Next as we can see our last is mark processed range. So it is used after a data flow to indicate the last log sequence number that was processed. This is because the log sequence number that will be start from the range next time a get processing range operation is performed. So for this initial load I am going to use mark initial load start. Then here we need to specify a variable. As of now we don't have any variable so I would like to create a new variable. So click on new. So as we can see by default name is CDC state that is fine to me now click on OK. Then here connects a manager for the database where the state is stored that is CDC that is fine and here we need to specify the table. So we don't have any CDC table that will store the information. So let me create a new. So this is our CDC state table that is fine. Now we can run and CDC state table would be created. Now click on OK. So we have done our CDC control task start. Now we need to configure CDC control task end. This time CDC control operation would be mark initial load end that is fine. Then here I would like to use that variable which we have created in CDC control task start. Then I would like to use the same table CDC states now click on OK. So we have done our CDC control task start and CDC control task end. Now I would like to concentrate on Dataflow task. So here I just want to get data from SQL Server table. So I am very happy to use LEDB source. Then we want to load data into SQL Server table as destination. So LEDB destination. So double click on this LEDB source and here we have specified our source connection manager that is fine. Then here we need to select the table. So here we want to get data from employee source table. We are having 12 rows that is fine. Go to column. I am happy all these columns now click on OK. So we have done our source. Now we need to configure our destination. So connect with destination and double click on this destination. So our LEDB connection manager is destination that is fine click on OK. Then I want to load data in employee destination table. So we can select and go to on mapping. So in mapping as we can see we are having employee ID, employee name, salary and department. But is deleted column is ignored. And we have specified is deleted column default value is 0. So it will insert 0. Now click on OK. So we have done our package. Now save this package and I would like to execute our package. So package executed successfully. So data should be loaded in our destination table. Now we can stop this package and go to on SSMS. And here I would like to refresh this table by pressing control R. So we are having 12 rows. So 12 rows moved from source to destination. So let's have a look of CDC state stable. So this is our CDC state stable. So it has log sequence number that is this number. So once our package will be executed next time then this log sequence number will work. So I hope you have understand how we can do the initial load in CDC. In our next video we will discuss how we can deal with the incremental load insert and update. So thank you so much for watching this video. If you like this video please subscribe our channel to get many more videos. Don't forget to press the bell icon to get the notification of our newly uploaded videos. Thank you so much.