152 Variable and parameter in ssis
23:32
Пікірлер
@LocNguyen-cr7tm
@LocNguyen-cr7tm 14 сағат бұрын
why I see no any data connection afer clik "new" in OLE DB connection manager step ?? help me please
@geethathiyagarajan4912
@geethathiyagarajan4912 23 сағат бұрын
Why making changes in registry
@learnssis
@learnssis 23 сағат бұрын
So that the ssis should not try to check the metadata of only first 8 rows.
@jagadishm8264
@jagadishm8264 Күн бұрын
"INSERT INTO LOGS VALUES"('"+@[User::filepath]+"', "+(DT_WSTR,12)@[User::RecordCount]+",GETDATE())"
@balajirajagopal5742
@balajirajagopal5742 2 күн бұрын
Hi Bro , Currently I'm doing ssis package migration. The old package was created 2008 version . In my server has 2022 version . When I'm opening the package it has been upgraded . But not showing dtsx file The error is : The XML element DeploymentModelSpecificContent is missing from the file named: Pls help on this
@learnssis
@learnssis 2 күн бұрын
Open visual studio 2022, now open the .sln file created in Visual Studio 2008 in Visual Studio 2022 and see if that helps.
@balajirajagopal5742
@balajirajagopal5742 2 күн бұрын
@@learnssis I did the same . But got the above error
@learnssis
@learnssis 2 күн бұрын
@@balajirajagopal5742 I actually not migrated directly from VS 2008 to VS 2022 earlier, however I have tried migrating from VS 2008 to VS 2015 and it works if you don't have any third party component in the SSIS package. Maybe you can try migrating from VS 2008 to VS 2015 or VS 2013 and then from there (VS 2013 or VS 2015) try to migrate to VS 2022.
@venkatasureshkakumani8285
@venkatasureshkakumani8285 2 күн бұрын
very good
@learnssis
@learnssis 2 күн бұрын
Thank you.
@ChaimaHermi-zi8pq
@ChaimaHermi-zi8pq 2 күн бұрын
I'm having an issue with extracting the Excel file name in SSIS. I've used a Foreach Loop and a Derived Column, but it always defaults to the first file instead of the desired one. What is the solution to this problem?
@learnssis
@learnssis 2 күн бұрын
In the foreach loop container, in the variable mapping, map the FilePath ssis variable and also make the excel connection manager dynamic. You can watch below video to know how to configure this one. kzbin.info/www/bejne/inmcoad3oKh7hKM
@data-dynamo-guy
@data-dynamo-guy 2 күн бұрын
Thanks a lot, it reallyt well explained.
@learnssis
@learnssis 2 күн бұрын
Glad it worked for you.
@user-qs1cc6fq9y
@user-qs1cc6fq9y 3 күн бұрын
nicely explained!!! Can we import data from sap (fico) to sql server using ssis package?
@nareshyadala
@nareshyadala 3 күн бұрын
I was searchig for performance tunning vedios i found this ,i am not clear abut 2&3 points (2.if we create indexes on joins columns in the update will it impact performance,3.creating a new table in place of update for huge data loads),please ellobrate more or create one more vedio to understand better
@learnssis
@learnssis 3 күн бұрын
2. If have indexes on a table then it makes insert\delete\update run slower. 3. If you have a large table and you need to update a lot of columns, then instead of updating the data from one table to another, use a select query and join the tables together, now select the required columns from both the tables, like all non update columns from left table and the columns to be updated from right table and create a new table. Creating a new table will be faster as compare to updating so many columns in a table when data is huge and specially if you have indexes on the table. select a.column1, a.column2, b.column3, b.column4 into newtable from table1 a inner join table2 b on a.id = b.id
@nareshyadala
@nareshyadala 3 күн бұрын
@@learnssis 2.stmt for update statmt creating indexes is slow down the performance
@user-qs1cc6fq9y
@user-qs1cc6fq9y 4 күн бұрын
Hi Aqil, Amazing, your all video really appreciated.could you please help me on this to extract data from staging tables to partitioned tables with incremental load ?please suggest with example in SSIS. Thanks in advance.
@learnssis
@learnssis 4 күн бұрын
Hi, I have a video on loading data from sql staging table to another sql table with incremental load kzbin.info/www/bejne/bpW1ep2MnbCigdU If you want to learn about table partitioning then you can go through this blog www.sqlshack.com/how-to-automate-table-partitioning-in-sql-server/ And can watch this video on sql server table partitioning kzbin.info/www/bejne/iKnYZHybo9eAeKs
@user-qs1cc6fq9y
@user-qs1cc6fq9y 4 күн бұрын
@@learnssis thanks a lot ..but if you create a video related to staging table to partition table using SSIS ,it will be really appreciated. Actually ,I tried but not able to design the SSIS package. Request you to please create and share the SSIS package related this. Thanks in advance and really appreciated your support.
@TKJ
@TKJ 4 күн бұрын
Hi bro, do we have video on how fetch data from SAS using SSIS? If not can you tell me how to do it?
@learnssis
@learnssis 4 күн бұрын
Hi Bro, I don't have a video on fetching data from SAS. There is no inbuilt component on this. I saw some companies alike Cozyroc have some ssis components for it. Also I saw this blog, can you go through it and see if you find any helpful. I have actually never worked with SAS before. sqlserverjedi.wordpress.com/2012/02/08/loading-sas-files-with-ssis/
@mariahalt4603
@mariahalt4603 4 күн бұрын
This is an excellent video. Be sure to watch the last 3.5 minutes!!! It solved my problem by creating an Execute SQL Task to the Excel Connection Manager (not the db) that creates the Sheet needed to dynamically map the columns to the dynamic Excel file.
@learnssis
@learnssis 4 күн бұрын
Thank you Maria for sharing your experience. God bless you.
@prashanthtalla
@prashanthtalla 4 күн бұрын
Thanks a lot. How to create the Project Parameters that can be sourced from a config file like DBName, UserName, Passwd? And how to encrypt Passwd? In Informatica, you have a tool called pmpasswd using which we can encrypt the passwd and use it in the config file.
@learnssis
@learnssis 4 күн бұрын
In SSIS we can create the Project Parameters but the value to project parameters can be provided either from a sql query, or from a sql agent job. kzbin.info/www/bejne/Z3ilo4B4j7h0paM You can not provide the value to project parameter from a file. You can create SSIS variable and you can pass the value to ssis variable from batch file, sql agent job, xml config file.
@harishks308
@harishks308 5 күн бұрын
Thank you bro..crystal clear❤
@learnssis
@learnssis 5 күн бұрын
Thank you.
@jeevanprakashdash7146
@jeevanprakashdash7146 5 күн бұрын
How can I send a Stored procedure output in the email body and sent the notification
@learnssis
@learnssis 5 күн бұрын
Take a look at this email. kzbin.info/www/bejne/d6PIZH1oYr6fl8k
@fredatang4058
@fredatang4058 5 күн бұрын
thank you, very clear !
@learnssis
@learnssis 5 күн бұрын
You are most welcome.
@gayatrigawande9989
@gayatrigawande9989 6 күн бұрын
Your all video is very helpful
@learnssis
@learnssis 6 күн бұрын
Thank you Gayatri.
@pranishsonone7839
@pranishsonone7839 6 күн бұрын
Very thanks you very much
@learnssis
@learnssis 6 күн бұрын
You are most welcome.
@pranishsonone7839
@pranishsonone7839 6 күн бұрын
Thanks can if I need only one day data is it possible sir
@learnssis
@learnssis 6 күн бұрын
Yeah write the query to full only one day data.
@anmol3749
@anmol3749 6 күн бұрын
Thanks a lot Sir🧑‍💻
@learnssis
@learnssis 6 күн бұрын
You are most welcome.
@lanphanhoang8719
@lanphanhoang8719 6 күн бұрын
sir my db said The job failed. Check the event log on the destination server for details. what should i do now
@learnssis
@learnssis 6 күн бұрын
Right click on the sql job, go to history, expand the last execution result and check the error message. if you are running an SSIS package in the sql job, then you would need to go to ssis catalog, expand it, go to the project, right click on project, go to reports, all execution reports, you will see the error details there.
@knethra7
@knethra7 7 күн бұрын
Hi Sir, Suppose have 6 servers, every server having 3 databases in 3 databases having one same table. from this table using 3 select queries we will get different data like activeyes,activeNo, and activetotal. this whole data needs to load into one CSV file. After this will get new server.for this server also use same machanism. Without changing in the package how to add new server configuration in Package.
@learnssis
@learnssis 7 күн бұрын
If you have only one table from which the data will be exported then you can do this using a foreach loop container with one data flow task. 1. Create a sql table like Config_Server on any of the server. The table will have ServerName, DatabaseName. Now insert a record for each server and corresponding database. Thus for 6 servers the total entries will be 6*3 = 18 records. 2. Now use a foreach loop container with ado enumerator, and in the execute sql task before foreach loop container, use a select query and select the ServerName and databasename from the above config_server table. And create 2 ssis variable ServerName and Databasename and assign the value of server name and database name to the ssis variables inside the foreach loop container. 3. Now take a data flow task inside the foreach loop container and use the OLE Db source where you can select data from the sql table. Create an OLE Db connection manager, and make the connection manager dynamic by setting the ServerName property in expression from SSIS variable servername and InitialCatalog property dynamic from DatabaseName ssis variable. 4. Use the flat file destination to write the data to a csv file, make sure you uncheck the option owerwrite data in the flat file destination. 5. This way the loop will run 18 times and will append the data to a single csv file. In below video, I have taken data from multiple databases and merged to a single csv file, you will get an idea what I am talking about here kzbin.info/www/bejne/apfRhaunjNSDf8U If you are using the Cofig_Server table, then in future if you get a new server then you don't need to change the ssis package instead you can just add an entry for new server into config_server table.
@harshallucky
@harshallucky 7 күн бұрын
Bro nice job Kudos
@learnssis
@learnssis 7 күн бұрын
Thank you.
@tonydobler2193
@tonydobler2193 8 күн бұрын
I HAVE "Windows 11 Home Single Language". DEVICE NAME: Laptopnum02. NO PASSWORD FOR MY ACCOUNT. 1.CREATE A TEST *.CMD FILE . CREATE A *.TXT THEN CHANGED THE EXTENSION TO: *.CMD THIS MAKES THE *.CMD CALLED: creararchivo.cmd @echo off echo Este es el contenido del archivo creado por demo.cmd. > archivo_creado.txt echo Segunda línea en el archivo creado. >> archivo_creado.txt echo Tercera línea en el archivo creado. >> archivo_creado.txt I DISABLED MY ANTIVIRUS (AVAST) CREATE CREDENTIALS IN sqldeveloper BEGIN sys.dbms_credential.create_credential( username => 'brandon tony rojas', password => '123', database_role => 'SYSDBA', windows_domain => 'laptopnum02', enabled => true, credential_name => 'CREDENCIAL_PRUEBA' ); END; CREATE JOB. I have tried both ways, entering first with CMD then directly to the executable. But apparently it doesn't open any, access denied it tells me when I try directly to the executable, without credentials. But I checked my permissions on my WINDOW account: brandon tony roja, domain = laptopnum02 and everything was fine. BEGIN DBMS_SCHEDULER.create_job ( job_name => 'PRUEBA', job_type => 'EXECUTABLE', job_action => 'C:\BackupOracle\creararchivo.cmd',--'C:\WINDOWS\SYSTEM32\CMD.EXE', --number_of_arguments => 2, start_date => SYSTIMESTAMP, repeat_interval => 'FREQ=DAILY; BYHOUR=23', enabled => FALSE, auto_drop => FALSE, comments => 'Job para realizar backup diario' ); -- EJECUTAR COMANDOS DENTRO DEL SIMBOLO DEL SISTEMA --DBMS_SCHEDULER.set_job_argument_value ('PRUEBA', 1, '/C'); --DBMS_SCHEDULER.set_job_argument_value ('PRUEBA', 2, 'C:\BackupOracle\creararchivo.cmd'); dbms_scheduler.set_attribute('PRUEBA', 'credential_name', 'CREDENCIAL_PRUEBA'); DBMS_SCHEDULER.enable('PRUEBA'); END;
@user-gm9nd3dt7r
@user-gm9nd3dt7r 8 күн бұрын
For the excel connection string what value we need to set HDR= ??
@learnssis
@learnssis 7 күн бұрын
HDR=YES; kzbin.info/www/bejne/n2XddmyvhZeaqKM
@mateusnunes5747
@mateusnunes5747 8 күн бұрын
Is it possible to do this without using C# or an external tool?
@lourdumarym
@lourdumarym 8 күн бұрын
Hi
@learnssis
@learnssis 8 күн бұрын
Hello
@sri929
@sri929 8 күн бұрын
Hi. How to handle.. if we have got new column in the CSV file but we dont want to load that column in to the Table. currently our package getting failed when ever new column added to the CSV file. We would like to skip all those new columns and proceed with the existing columns which are mapped with destination DB columns. . COuld you pls hele me on this.
@learnssis
@learnssis 8 күн бұрын
SSIS is very metadata specific, if new columns will be added to flat file then the package will fail at flat file source, of course you can ignore the new columns to be inserted to sql server table, but you would need to refresh the columns in flat file connection manager and in flat file source once new columns got added to csv file or columns got deleted or columns got renamed in csv file.
@user-qs1cc6fq9y
@user-qs1cc6fq9y 8 күн бұрын
Great !!! Your video really amazing. I have one question,could you please help me to resolve. Actually want to develop a SSIS package for importing Customer where the data is provided from multiple flat file sources. The customer primary data like customer id, name from one file and address information from different file source. The customer address data also contain multiple address information for each customer. need to get the latest customer information and merge it with customer primary data and import it into destionation customer table. How to design such a logic and it must be recent customer infomation is imported ? Please explain by drawing a diagram.
@learnssis
@learnssis 8 күн бұрын
First import all flat files into individual sql table and then write a sql query to fetch data from respected tables and insert the data to your final table.
@user-qs1cc6fq9y
@user-qs1cc6fq9y 8 күн бұрын
@@learnssis can you share the SQL query to fetch latest address of the person.
@learnssis
@learnssis 8 күн бұрын
@@user-qs1cc6fq9y Is there any date column based on which we will know what is the latest address of the Person ?
@learnssis
@learnssis 8 күн бұрын
In this video, I have shown how to find unique most recent records from the table. kzbin.info/www/bejne/mXjOmXx9pq6WgKs
@user-qs1cc6fq9y
@user-qs1cc6fq9y 8 күн бұрын
@@learnssis no, there is no date column
@amitsrivastava6093
@amitsrivastava6093 8 күн бұрын
Hi Aqil , could you please suggest if possible. if i have 5 flat file and each has different different data like one fact table and dimensional table and want to merge all these into one flat file , is it possible to merge.
@learnssis
@learnssis 8 күн бұрын
You can merge them but in the Union All you need to select the column from each source. For example your one source can have firstname, but your second source might not have firstname, then you would need to select the appropriate column from second source other wise it won't merge the data for that column. If the column names in every source are same then they will be automatically mapped but if the column names are not same then you would need to map them manually.
@amitsrivastava6093
@amitsrivastava6093 8 күн бұрын
Hi Aqil,your knowledge is really amazing and the way you are explain its really awesome.
@learnssis
@learnssis 8 күн бұрын
Thank you Amit.
@jeevanprakashdash7146
@jeevanprakashdash7146 9 күн бұрын
I am getting ole db error so make the delay validation as true but still getting excel connection manager error
@learnssis
@learnssis 8 күн бұрын
Take a look at this video and try to use the template file. kzbin.info/www/bejne/qIjCeJybes98iZI
@johnnymondjila4102
@johnnymondjila4102 9 күн бұрын
Hi Aqil, thank you for the informative video. What if I want to read in the last row monthly? my sheet also has IDs.
@learnssis
@learnssis 8 күн бұрын
This code will loop through all columns in last row. string currentdatetime = DateTime.Now.ToString("yyyyMMddHHmmss"); string LogFolder = @"D:\Files\Logs"; // string FilePath = @"D:\Files\Email.csv"; try { string filePath = @"D:\Files\Email.xlsx"; string sheetName = "Sheet1$"; // Assuming your sheet name is "Sheet1" // Connection string for Excel 2007 or later versions string connectionString = $"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={filePath};Extended Properties='Excel 12.0;HDR=YES;'"; // Query to select only the last row from the sheet string query = $"SELECT TOP 1 * FROM [{sheetName}] ORDER BY ID DESC"; using (OleDbConnection connection = new OleDbConnection(connectionString)) { connection.Open(); // Execute the query OleDbCommand command = new OleDbCommand(query, connection); OleDbDataAdapter adapter = new OleDbDataAdapter(command); System.Data.DataTable dataTable = new System.Data.DataTable(); adapter.Fill(dataTable); // Check if any rows were returned if (dataTable.Rows.Count > 0) { DataRow lastRow = dataTable.Rows[0]; // Get the first (and only) row foreach (var item in lastRow.ItemArray) { Console.Write(item.ToString() + "\t"); } Console.WriteLine(); } else { Console.WriteLine("No data found in the sheet."); } } } catch (Exception ex) { using (StreamWriter sw = File.CreateText(LogFolder + "\\" + "ErrorLog_" + currentdatetime + ".log")) { sw.WriteLine(ex.ToString()); } }
@gerryc349
@gerryc349 9 күн бұрын
Spot on sir! Thank you!
@learnssis
@learnssis 9 күн бұрын
Thank you.
@VishalJaybhaye-kq4hh
@VishalJaybhaye-kq4hh 9 күн бұрын
SIr it is giving me this error when we created parameters for Ram person, Execute SQL Task: Executing the query "insert into Person values (?,?,?)" failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Task failed: Execute SQL Task. Can u pls tell me the issue?
@learnssis
@learnssis 9 күн бұрын
Are you using Go statement inside the query ? Do not use any go statements.
@user-hh6fs9hg4c
@user-hh6fs9hg4c 9 күн бұрын
Excellent explanation as usual, thanks Aqil sir
@learnssis
@learnssis 9 күн бұрын
You are most welcome.
@Chris-by8eh
@Chris-by8eh 11 күн бұрын
I dont want to click OK and have string truncated.
@learnssis
@learnssis 10 күн бұрын
then maybe you can use a derived column transformation and use substring function to get the specific length columns. For example substring(column_name,1, length of field) and maybe create a new column for every source column in derived column transformation.
@Chris-by8eh
@Chris-by8eh 10 күн бұрын
@@learnssis I found you can go to input/output in advanced options and set the width there. thanks
@learnssis
@learnssis 10 күн бұрын
@@Chris-by8eh Wow that's amazing. Thanks Chris for sharing this information. Actually I rarely work with xml files thus had not looked at all options there.
@Orange-xi3be
@Orange-xi3be 12 күн бұрын
You sir, are a lifesaver. Thankyouuu!!!
@learnssis
@learnssis 12 күн бұрын
Thank you.
@PreranaTathe
@PreranaTathe 13 күн бұрын
can you make one video or give me solution for below requirement, Description:- This is a request for the Implemention of the SSIS package which will serve the purpose of file processing involving the validations of the File Naming Conventions [Name+Date], File Headers and File Duplication. Package Implementation:- 1.Read the .csv file from the particular shared path and import the data into the destination database table [ModelData] Destination Table Name: ModelData Table Columns : 1.Primary Key: ModelID = IDENTITY(1,1) PRIMARY KEY 2.File Headers as Columns : ModelType ,ModelName, Brand, Company 3.Additonal Columns: 1.DateCreated [Current System Date] 2.FileName [Name of the File] 3.FileDate [Extract from File Name] 4.Record Count [Optional] [Number of Records Imported from the File] Log Table Name : ModelDataImportLog Table Columns : 1.Primary Key: LogID = IDENTITY(1,1) PRIMARY KEY 2.Other Columns:- 1.DateCreated [Current System Date] 2.FileName [Name of the File] 3.PackageName 4.Error_Message Below Validations need to in place the File Processing:=- 1.File Read: 1.Check the Source File path and look for the File Names with the naming Convention of: ImportFileForDataProcessing_YYYYMMDD.csv example: ImportFileForDataProcessing_YYYYMMDD.csv and ImportFileForDataProcessing_00230229.csv. If the File Name is not complying to the convention or the date is invalid in the name , log it to the log table with the message that File Name is invalid and move the file to the Destination Location. When Moving Append the Current TimeStamp to the File+InvalidName. Example: ImportFileForDataProcessing_YYYYMMDD_YYYYMMDD_InvalidName.csv 2.File Headers : 2.Check the File Headers in the input file .If the File headers are not compliant to the Headers , log it to the log table with the message that File Headers are incorrect and move the file to the Destination Location. When Moving Append the Current TimeStamp to the File+InvalidHeaders. Example: ImportFileForDataProcessing_YYYYMMDD_YYYYMMDD_InvalidHeaders.csv 3.Duplicate File Check: Check If the Source input File is already processed or not .If the file is already been processed earlier [Check from ModelData ] then move it to destination Location and log the details in the log table with the message that File is already processed. When Moving Append the Current TimeStamp+Duplicate to the File. Example: ImportFileForDataProcessing_YYYYMMDD_YYYYMMDD_Duplicate.csv
@hansithennakoon9705
@hansithennakoon9705 13 күн бұрын
where can i find the code sir?
@learnssis
@learnssis 13 күн бұрын
You can download it from the link in the description of the video. There is a google link drive, from where you can find a folder for each video.
@hansithennakoon9705
@hansithennakoon9705 13 күн бұрын
@@learnssis thank you
@pw.70
@pw.70 13 күн бұрын
As always, Aqil - solid info. Thank-you.
@learnssis
@learnssis 13 күн бұрын
Thank you.
@raghavendras8866
@raghavendras8866 13 күн бұрын
for those who cant see variable to set date value dropdown Click on the 'variable to set date values' input box, and use SCROLL THE WHEEL MOUSE to change between variables.
@Seasmoke_99
@Seasmoke_99 14 күн бұрын
Error code 1290
@230-umarmushtaq8
@230-umarmushtaq8 12 күн бұрын
It's because of restrictions in mysql workbench... For that you need to disable restriction mode related to error 1290 (related to file restrictions)
@shaikhafridi6568
@shaikhafridi6568 14 күн бұрын
Hi Aqil, can you make some videos on SSAS
@learnssis
@learnssis 14 күн бұрын
Sorry I have not worked on SSAS.
@RiadhCHIBANI
@RiadhCHIBANI 14 күн бұрын
Hi, great video, i had a problem , when i click on test conection i got an error "est connection failed because of an error in initializing provider. Délai d'attente de connexion expiré" anyone can help me pls
@learnssis
@learnssis 14 күн бұрын
Can you check the server name and database name ? Try to connect to the same server using sql server management studio ?
@RiadhCHIBANI
@RiadhCHIBANI 14 күн бұрын
@@learnssis i did the same you did i write SELECT @@SERVERNAME and i did copy paste, btw i made a local server and thank you for you response appreciate
@learnssis
@learnssis 14 күн бұрын
@@RiadhCHIBANI Right click on the connection manager, edit, uncheck the Work Offline option.
@ArwaAldoudOmer
@ArwaAldoudOmer 14 күн бұрын
Thanks, it was amazing. I followed the steps and it worked perfectly. Thank you 🥰
@learnssis
@learnssis 14 күн бұрын
Glad it worked for you.
@jennasyeda6613
@jennasyeda6613 14 күн бұрын
Superb, really outstanding, kindly make video on fetching data from external API.
@genoses5174
@genoses5174 15 күн бұрын
Hey great video But can I get txt file to add these data into the database , it will help me a lot Thanks
@learnssis
@learnssis 14 күн бұрын
First you can create the package as shown in the video, it will generate the files from adventureworks database and then you can create another package to import those files back to the database. Right now I don't have those files.
@Matthew_080
@Matthew_080 15 күн бұрын
It finally works for me :D Thank you very much for this tutorial!
@learnssis
@learnssis 15 күн бұрын
Glad it worked for you Matthew.
@tusharjadhav2589
@tusharjadhav2589 15 күн бұрын
Hi bro, I receive a task from where they want to load only latest date file to SQL server from FTP Server. How can we fetch only latest date file from FTP? using SSIS
@learnssis
@learnssis 15 күн бұрын
These are the 2 videos on downloading files from sftp server. In first one we are using batch file to download the file, in second video we are using C# code to download the file from SFTP server. In second video you can check the lastmodifieddate of a file and according to that you can download that file. kzbin.info/www/bejne/r4e2p36QmKmGi7s kzbin.info/www/bejne/aHnHoYCDhbKiZ6M In this video you can get the most recent file from a folder. kzbin.info/www/bejne/hWLbh5-Bpp2Wp7s So you need to modify the code as per your requirement. Once the file is downloaded from ftp server, then you can easily import it to sql server using a data flow task.