ssis

Time parsing Issue using DateTime.ParseExact()

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-21 22:05:11
问题 I have a Time Value stored as string with the format HH:mm I used the following code to parse it as date with Today Date DateTime.ParseExact("09:00","HH:mm",New System.Globalization.CultureInfi("En-GB")) The Result Is 2017-03-15 09:00:00 When Running this Code From another machine i get the following Result: 1899-12-31 09:00:00 I replaced my code to the following DateTime.ParseExact(DateTime.Now.ToString("yyyy-MM-dd") & " 09:00","yyyy-MM-dd HH:mm",New System.Globalization.CultureInfi("En-GB")

Unzip password protected file in SSIS using Ionic.Zip dll

血红的双手。 提交于 2020-01-21 21:49:02
问题 I got requirement to unzip a file which contains password protected text files in zip file.which have to be done in SSIS package.. I have googled and download a dll called Ionic.Zip to used in script task. i have used the below code using c# in script task.. using Ionic.Zip; public void Main() { Dts.TaskResult = (int)ScriptResults.Success; start obj= new start(); obj.decrypt(); } public class start { public void decrypt() { string sfilepath ="E:\\shekar\\CIF_Files\\USAGE.zip"; ZipFile

Passing a variable through DTEXEC with xp_cmdshell (SQL Server 2008)

孤人 提交于 2020-01-21 16:56:12
问题 I have created an SSIS package that imports an Excel file into my database. I have created a variable that I would like to use as the Excel filepath for the excel connection manager. The name of the variable in my SSIS package is "ExcelSource" and it is supposed to represent the full path. I would like to eventually set this dynamically because the filename contains a date. What is the T-SQL code to run this? Here is what I have so far: DECLARE @ssisstr VARCHAR(8000) , @packagename VARCHAR

generated excel from SSIS but getting quote in every column?

和自甴很熟 提交于 2020-01-21 05:32:10
问题 I have generated and excel from SSIS package successfully. But every column is having extra ' (quote) mark why is it so? My source sql table is like below Name price address ashu 123 pune jkl 34 UK In my sql table i took all column as varchar(50) datatype. In Excel Manager when it is going to create table Excel Destination took all column as same varchar(50) datatype. And in Data Flow I have used Data Conversion transformation to prevent unicode conversion error. Please advice where i need to

SSIS(2012版本)连接MongoDB,使用SSIS2012导入MongoDB

痞子三分冷 提交于 2020-01-20 01:59:00
引用至: https://arcanecode.com/2014/01/14/importing-mongodb-data-using-ssis-2012/ 1.版本号: SSIS:2012 MongoDB的C#驱动版本:1.7 下载地址: https://github.com/mongodb/mongo-csharp-driver/downloads 或者我上传到百度云盘: 链接:https://pan.baidu.com/s/1IZQ-wWLNDyABGXTQIBHfeg 提取码:dglw MongoDB版本:3.6.3 这里不介绍怎么安装MongoDB 2. 第一步:下载并安装CSharpDriver-1.7.0.4714.msi,以上下载的时候,使用这个msi的就可以了,另一个zip的就不需要,我就是备个份 第二步:非常重要:这里的驱动在1.5版本上面已经变了,不再自动安装GAC,但是SSIS又必须要这个,所以只有我们自己安装了 我们的CSharpDriver驱动默认的安装在 C:\Program Files (x86)\MongoDB\CSharpDriver 1.7 然后我们接下来需要 GACUTIL工具来安装驱动,打开CMD使用如下命令找一下这个工具,我的电脑位置在: C:\Program Files (x86)\Microsoft SDKs\Windows\v10

To run a SSIS package outside of SQL Server Data Tools you must install Move File to Archive of Integration Services or higher

妖精的绣舞 提交于 2020-01-19 05:55:27
问题 I am testing SSIS package that I upgraded from VS2005 project to VS2013 (package deployment model) project. This is very simple package which just processes files one by one from specific location and updates database based on those files and once done it moves file to archive or non-parsing directory based on outcome. And I am getting odd error and I cant find solution for that. Issue is my package runs fine and it does exactly what it suppose to do (extracting data from file and inserting

SCOPE_IDENTITY() for bulk insert in SSIS

点点圈 提交于 2020-01-17 09:09:51
问题 In SSIS, I am able to make an insert of rows and retrieve their SCOPE_IDENTITY using OLE DB Command Task which calls stored procedure, but this is not bulk insert, it's slow load. Is it possible to get id of inserted rows using bulk insert in SSIS? Example: When inserting Customer, first I have to insert record in Person table and then use this FK in Customer table. UPDATE: Here's a structure of Person and Customer tables that need to be populated from external source. One option is to have

SCOPE_IDENTITY() for bulk insert in SSIS

点点圈 提交于 2020-01-17 09:09:50
问题 In SSIS, I am able to make an insert of rows and retrieve their SCOPE_IDENTITY using OLE DB Command Task which calls stored procedure, but this is not bulk insert, it's slow load. Is it possible to get id of inserted rows using bulk insert in SSIS? Example: When inserting Customer, first I have to insert record in Person table and then use this FK in Customer table. UPDATE: Here's a structure of Person and Customer tables that need to be populated from external source. One option is to have

How do I extract file name from a path within an SSIS package?

拜拜、爱过 提交于 2020-01-17 08:43:10
问题 I would like to know how to extract the file name using SSIS from the below given paths: Paths: O:\SourceFiles\Primary\care\ALC121.csv O:\SourceFiles\Primary\care\COPL119.csv I would like to insert the names and the full path into a table as shown below: Table data: QueryName FileName --------- --------------------------------------- ALC121 O:\SourceFiles\Primary\care\ALC121.csv COPL119 O:\SourceFiles\Primary\care\COPL119.csv 回答1: I'm assuming that the full file names are coming in off the

Running SSIS package on SQL 2014

泄露秘密 提交于 2020-01-17 06:14:27
问题 I created a new sql job in SQL2014 with an SSIS package created in SQL 2005. The job is failing with this error: Source: Ready data to zip Ready data to zip Description: There was an exception while loading Script Task from XML: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: